Test Automation

An extra gear in the software lifecycle

Scenario

In the software lifecycle, the testing phase often represents a bottleneck in terms of both cost and time. This happens because tests are carried out manually and need to be repeated multiple times for every modification made to the software. The repetitive and intensive nature of these operations can lead to human errors and slow down the software release process. 

To overcome these limitations, Technology Reply proposes the adoption of end-to-end automated testing for large-scale projects. This approach not only significantly reduces the time required to execute tests but also increases their coverage and reliability.

Solution

The approach chosen for implementing automated tests is BDD – Behavior Driven Development, which involves creating individual test scenarios based on the functional behavior defined in the requirements.  For each test scenario, the implemented framework simulates user operations on the new application and includes a series of assertions to verify the successful execution of the actions performed. 

For defining the test scenarios, the Gherkin natural language was chosen, allowing the definition of the required behavior without specifying technical details or implementation information. This language is used by numerous market tools for tracking and monitoring tests. 

To implement the automated test execution framework, Cucumber was selected as the interpreter for the Gherkin-written scenarios, Java as the implementation language, and Selenium as the supporting library for Front-End navigation. The framework has been integrated with the quality management system used by the client to enable real-time extraction of test run results. This solution was implemented in a refactoring project for a complex finance platform for a well-known Italian bank with excellent results. It was designed to be used with a wide range of input parameter combinations, in this case, the details of the products requested by the client, allowing numerous runs to be executed without the need to modify the code.

To achieve this goal, a database support model was created for the framework, where data for mass executions can be loaded, and specific data for individual runs can be configured.

Advantages of the Proposed Solution 

  • Efficiency and Scalability: The use of automated tests and the Gherkin language significantly reduces the time and costs associated with manual testing, while also improving the scalability of the testing process. 

  • Adaptability and Flexibility: The framework is designed to easily handle various combinations of input parameters, making it simple to adapt to new requirements and scenarios without needing to modify the code. 

  • Integration and Monitoring: The integration with the client's quality management system enables continuous and real-time monitoring of test results, facilitating the management and analysis of outcomes. 

  • Use of Established Technologies: The choice of Cucumber, Java, and Selenium ensures a high level of reliability and support, leveraging well-established and well-documented technologies.

Origins and next steps

Technology Reply has overseen the implementation of the suite of automated tests currently used for executing non-regression scenarios.

This approach has improved the efficiency and accuracy of the testing process, ensuring greater reliability in verifying software changes. 

The next steps involve introducing artificial intelligence into two stages of the automation testing process: 

  • Automatic generation of test scenarios in Gherkin language. The goal is to automate the modeling and writing of scenarios based on the functional analysis document. By using artificial intelligence algorithms, it will be possible to extract functional specifications and translate them into test scenarios defined in natural Gherkin language. 

  • Automatic implementation of test scenarios defined in Gherkin language. Once the test scenarios are generated, artificial intelligence will be used to automate their implementation. This process involves translating the scenarios into executable code, integrating automation libraries like Selenium for Front-End navigation. Automating this phase will further accelerate the testing process and reduce the risk of manual errors.

Expected Benefits 

  • Efficiency: Automating the phases of generating and implementing test scenarios will significantly reduce the time and resources required for testing. 

  • Improved Coverage: The use of artificial intelligence will enable coverage of a greater number of test scenarios, including those that might be overlooked in a manual process. 

  • Reliability: Reducing manual errors and increasing accuracy in the testing process will help improve the overall reliability of the software. 

  • Scalability: Automation will allow the handling of an increasing number of tests with ease, supporting the scalability of the development and testing process. 

Advantages

The use of generated automated tests will allow the client, with the support and expertise of Technology Reply, to achieve several advantages

Reduction in Time and Costs for Non-Regression Testing

Test automation enables rapid execution of non-regression tests, significantly reducing the time and resources required compared to manual testing. 

Faster Software Release Cycles

By using automated tests, the testing phase can be shortened, allowing software release activities to be moved up. This leads to greater agility in development processes and the ability to respond more quickly to market demands.

Increased Test Coverage

By adjusting input parameter configurations, it is possible to schedule multiple runs with varying data combinations. This approach ensures broader and more in-depth test scenario coverage, improving the overall quality of the software. 

Greater Accuracy of Results

Automated tests provide more reliable results compared to manual testing, which is more prone to human error. Automation ensures a higher level of precision and reliability, helping to quickly identify and fix any defects in the software.