Home The TDD (Test-Driven Development) Approach for RPA Testing

The TDD (Test-Driven Development) Approach for RPA Testing

by sol-admin

Test-Driven Development (TDD) is  is a software development process relying on software requirements being converted to test cases before the software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. This is as opposed to software being developed first and test cases created later. Here is a brief review of the TDD methodology (which can also be applied to RPA testing) from Jacqui Muller, an Application Architect at Dimension Data, originally posted in UiPath Community Blog.

“For every small functionality of a solution, TDD starts with designing and developing tests. In traditional software development, developers use this approach to develop functionality enclosed in test cases to identify which code succeeds and which code fails. Failed test cases require new logic to be implemented or existing logic to be enhanced for the test to succeed. If an automated test fails to avoid duplicated code, the TDD framework indicates developers to write new code. Tests are requirement conditions that need to be validated as either passed or failed. The aim of TDD is to keep code simple, accountable, and bug-free.

“An important aspect of TDD is negative testing. Since the approach to TDD is to make a test fail, negative tests should be created to ensure that as many potential failures are catered for as possible. This helps form a more robust code unit.”

The implementation of the TDD holistically in a solution is represented in the figure below:

“It is important to note that tests are invoked by a separate code block specifically responsible for testing the code units. The tests are in no way linked to or invoked by Main. Main invokes the same code units invoked by the tests. However, Main is not involved in TDD. Mainly what is executed from a published RPA bot, whereas tests are run during development and debugging.”

Learn more about the TDD approach to RPA on the source page.