TEST DRIVEN
DEVELOPMENT (TDD)
Jacqui Muller
JACQUI MULLER
UiPath MVP
Application Architect at Dimension Data
Decision Support Systems Lecturer at North West University
Python Lecturer at Brainster
Author of TheJPanda and JD Bots blogs
LinkedIn The JPanda JD Bots
TABLE OF CONTENTS
Build the test cases, and import
relevant test data into the UiPath
Studio
04
Run the test cases to evaluate the
validity of the code
05
Make code changes where
necessary
06
A short intro into TDD and how it
could apply to automation
development
01
A few advantage points that may be
realised when using TDD as a
development approach
02
Defining negative input tests, zero
value input tests and positive input
tests
03
What is TDD
Why it is useful in
automation
Define test cases
Build test cases
Test the code
Refactor
Test Driven Development (TDD) is an
approach to software development
and refers to the practice of creating test
cases first and developing the solution
further from the initial test cases.
THE PROCESS OF THE TDD APPROACH
UNDERSTANDING BUSINESS PROBLEM
The solution should
connect to an ERP system
to extract relevant data.
The report should be sent
to business stakeholders
The data extracted from the
ERP system should be
validated, using business
rules provided by business.
CONNECT TO ERP SEND REPORT
GENERATE A REPORT
BUSINESS RULES
In order to calculate
total revenue, the
following calculation
should be used:
(total income + gains) –
(total expenses + losses).
If total revenue is a
negative number an email
should be sent to finance
and executives.
The total credit amount and
total debit amount extract
from the ERP report should
be an exact match. In an
event where the amounts
don’t match, an email
notication should be sent to
the finance team to
investigate.
BUSINESS RULE #2
BUSINESS RULE #1
TEST CASES
BUSINESS RULE #1 – NT
BUSINESS RULE #1 – 0T
BUSINESS RULE #2 – NT
BUSINESS RULE #2 – P/0T
TEST CASE #1
Given that there is a difference when subtracting the
total credit amount from the total debit amount then
-1 should be returned, depicting that an email should
be sent to business.
Given that there is no difference when subtracting the
total credit amount from the total debit amount then
0 should be returned, depicting that an email should
be sent to business.
TEST CASE #2
Given that there is a negative value returned when the
total revenue is calculated, then the value should be
returned and an email should be sent to the
executives.
Given that there is a positive or value returned when
the total revenue is calculated, then the value should
be returned.
IDENTIFYING UNIT TESTS
Compare
Debits
and
Credits
SET UP TEST DATA
APPLYING TDD IN UIPATH
<Demo/>
THANKS!
Does anyone have any question?
il@freepik.com

Test Driven Development (TDD) with UiPath

  • 1.
  • 2.
    JACQUI MULLER UiPath MVP ApplicationArchitect at Dimension Data Decision Support Systems Lecturer at North West University Python Lecturer at Brainster Author of TheJPanda and JD Bots blogs LinkedIn The JPanda JD Bots
  • 3.
    TABLE OF CONTENTS Buildthe test cases, and import relevant test data into the UiPath Studio 04 Run the test cases to evaluate the validity of the code 05 Make code changes where necessary 06 A short intro into TDD and how it could apply to automation development 01 A few advantage points that may be realised when using TDD as a development approach 02 Defining negative input tests, zero value input tests and positive input tests 03 What is TDD Why it is useful in automation Define test cases Build test cases Test the code Refactor
  • 4.
    Test Driven Development(TDD) is an approach to software development and refers to the practice of creating test cases first and developing the solution further from the initial test cases.
  • 5.
    THE PROCESS OFTHE TDD APPROACH
  • 6.
    UNDERSTANDING BUSINESS PROBLEM Thesolution should connect to an ERP system to extract relevant data. The report should be sent to business stakeholders The data extracted from the ERP system should be validated, using business rules provided by business. CONNECT TO ERP SEND REPORT GENERATE A REPORT
  • 7.
    BUSINESS RULES In orderto calculate total revenue, the following calculation should be used: (total income + gains) – (total expenses + losses). If total revenue is a negative number an email should be sent to finance and executives. The total credit amount and total debit amount extract from the ERP report should be an exact match. In an event where the amounts don’t match, an email notication should be sent to the finance team to investigate. BUSINESS RULE #2 BUSINESS RULE #1
  • 8.
    TEST CASES BUSINESS RULE#1 – NT BUSINESS RULE #1 – 0T BUSINESS RULE #2 – NT BUSINESS RULE #2 – P/0T
  • 9.
    TEST CASE #1 Giventhat there is a difference when subtracting the total credit amount from the total debit amount then -1 should be returned, depicting that an email should be sent to business. Given that there is no difference when subtracting the total credit amount from the total debit amount then 0 should be returned, depicting that an email should be sent to business.
  • 10.
    TEST CASE #2 Giventhat there is a negative value returned when the total revenue is calculated, then the value should be returned and an email should be sent to the executives. Given that there is a positive or value returned when the total revenue is calculated, then the value should be returned.
  • 11.
  • 12.
  • 13.
    APPLYING TDD INUIPATH <Demo/>
  • 14.
    THANKS! Does anyone haveany question? il@freepik.com