Unit and regression testing with OutSystems
Table of contents
OutSystems generates 100% standard mobile and web apps, with standard web stacks on the server side. As such, most testing tools on the market can be used for unit testing, regression testing, functional (user story) testing, integration testing and load testing.
Because of the visual development and continuous integrity validation built into OutSystems, users will soon see that the number of bugs introduced is much smaller compared to other technologies. Even when someone uses standard industry tools for testing, there will be fewer testing and fix cycles, which greatly reduces the associated development and delivery effort.
The Unit Testing Framework available in OutSystems Forge provides a complete framework for implementing, executing and managing unit tests. This is the equivalent to NUnit or JUnit and, for the other aspects, HP Quality Center, HP Load Runner, WAPT, Rally Quallity Manager and Selenium.
Teams find this approach particularly effective for calculation engines and for business service components. Having a good set of unit tests for a system can help greatly when it is time to change or refactor a system, as regression testing is automated and simple.
BDD / TDD
Behavior Driven Development and Test Driven Development practices allow you to foster a quality driven delivery process in your teams. Although the requirements for creating the tests do not vary a lot, the approach allows teams to focus the creation of tests for the most critical use cases.
The BDDFramework component in OutSystems Forge is an open source component that you can adapt to your own needs, but already provides an easy way to:
- Create test scenarios and steps that are conformant to the principles of Behavior Driven Development.
- Enable Test Driven Development - by defining scenarios and steps early in the app design stage and write the test code when the features have been implemented.
- Easily add scenarios and steps by dragging and dropping blocks (Scenario + Given / When / Then clauses).
- Having each test step is implemented in its own action, making sure that steps are sequential and occur in the same request.
- Enhance Test Maintenance - test outputs are identical to what is designed in the IDE, making it easy to pinpoint step failures and evaluate the code behind them.
- Support multiple tests in the same page and evaluating final stats (number of successful / failed tests).
The following video provides an overview of how the framework can be used to automate a test on a sample eCommerce application
Functional, User Interface, Regression
For functional and regression testing of OutSystems applications, we recommend using Selenium. Since OutSystems applications are standard web applications, any strategy currently used to test traditional web apps can be applied. OutSystems provides guidance and best practices on how to use Selenium to test OutSystems applications.