Codementor Events

Overcoming Automated Regression Testing Challenges in Agile

Published May 09, 2019Last updated May 10, 2019
Overcoming Automated Regression Testing Challenges in Agile

How do we overcome Regression Testing challenges and ensure that any change does not impact the quality of the software deliverable?

Agile development is acclaimed for delivering working software frequently, adding or enhancing features at the interests of the customer.
We need to plan our Regression Testing effectively to cater to the changing demands in Agile and ensure quality.

Let us start with one of the major challenges of Regression Testing.

Optimizing and selecting the right test cases

Like discussed in Why Automate Regression Testing in Accelerated Agile Delivery Cycles, by repeatedly running full Functional Testing, one cannot do away with Continuous Regression Testing.
The test cases that are affected due to one change may not be the same for another and identifying the relevant affected test cases is a major problem in Regression Testing.

What we can do
Identify prospective test cases that can be reused in the upcoming regression cycles and group them.

Prioritize test cases(also the ones that have an impact on business) that may be affected due to a new function addition or update or edit and only run these instead of running a complete test suite with irrelevant test cases and overloading. Save time and keep the regression modules short as running them repeatedly is time intensive and expensive.

As new features and changes are implemented in the software product, they are integrated with the existing functionalities. These existing areas are more prone to issues. Analyze the impact of changes and integrations of different modules with respect to change, prioritize and act on them accordingly. The idea is to identify the affected regions and analyze how the changes, new features, or bug fixes might have impacted the existing features and functionalities.

Regularly monitor and perform periodic cleanup for removing obsolete and duplicate test cases from the regression test suites. The number of test cases will only increase with time and we may lose track of what’s going on, especially if the project is big.

If the Automated regression testing is done on a consistent basis, it will be easier to optimize and maintain the right test cases.

Test Authoring time

Regression Testing requires a lot of rework. It could be difficult to keep up with the pace of delivery in Agile with the huge scripting time required to test a simple functionality and rewriting every one of the affected tests. Updating and maintaining huge scripts at any time requires an understanding of the existing code. Reading through a complex code, tweaking the variables and functions every time can be frustrating.

For someone new to the team, identifying affected test cases would not be easy.

Selenium is among the most popular and widely used web automation testing tool. Selenium demands technical expertise and third party tool integrations to become fully functional. But one major disadvantage of Selenium is the huge test authoring time(coding) required.

Automated tests are created as they can easily be repeated and extended to perform tasks impossible with manual testing. If we could cut down on the test authoring time, we could enjoy the full benefits of automating the process.

What would be a better alternative?
With the advent of Scriptless Automation Testing tools, automated tests can easily be written using natural language which makes it easy for anyone to refer to the tests and also make changes easily any time.

Record and Playback are also a popular option that records user actions and generates scripts automatically but isn't the best approach to do regression tests especially if the application is likely to undergo frequent changes.

Scriptless Automation testing allows for better participation from SMEs, Manual Testers, Stakeholders. This is particluarly good since they are responsible for establishing and implementing quality testing and compliance processes for organizations.

You may refer to a more detailed discussion on what features are ideal for a scriptless automation testing tool.

Scriptless_Testsigma.jpg

Communication gap

Effective communication forms the basis of the success of Agile. Continuous engagement with the team ensures that the client expectations are met allowing testers find quick solutions to issues and ensuring that the deliverables meet customer expectations. Quite often, major issues or bugs are not identified at an early stage because of a lack of communication though not deliberate.

A solution?
A useful communication tool is a must and will be a huge plus for teams working on the same project spread across different geographical regions best if the regression testing tool integrates with them to help understand the status of the project and broadcast changes.

Examine and choose the right test automation tools

We need to choose Automated Regression Testing tools that make the re-editing or rework of Regression Testing easier.

Testsigma creates Regression test plans automatically and suggests affected areas and also advice fixes so you can spend less time identifying them.

The main challenges with conventional test automation solutions are building a robust and maintainable automation framework and managing the “likely to change” objects and ui-identifiers. The automated tests must be reusable and maintainable and non-resistant to changes in the application UI(automatically ensure that the automated tests remain stable)

Auto healing ui_testsigma.jpg

Ensuring that a website functions as expected in all major browsers and mobile devices or tablets across different screen resolutions and sizes is challenging for testers in agile projects to manage and run them in parallel. It is particularly daunting to perform Regression Testing across browsers and devices.

Managing environment specific datasets and variables that are likely to change in multiple execution environments at each stage like Development, Testing, Staging, Production is also crucial. Check if the automated regression testing tool offer real devices for testing to speed up your run times. You can get the vendors to demonstrate how implementing their tool will minimize risk and improve the release quality.

Also, choose an automated regression testing tool that can integrate with tools such as Jenkins so you can run your regression tests continuously right from the first build incrementally and collate the results on a consistent loop integrated with the testing server which helps in getting actionable feedback allowing dev teams to act on them immediately in contrast to late hitting bugs towards the end of the sprint.

Reduce the Dev/Test-complete gap

Regression tests need to be run after every development iteration and also after changes are made. If you could start writing test scripts even without the application UI, you could save a lot of time instead of waiting for the UI or the functional module to be available. Refer my article in Codementor that discusses this.

The delivery pipeline should trigger regression tests automatically whenever a successful build is made. A shorter feedback loop between developers and testers eventually helps in identifying and fixing errors quickly and also save time compared to postponing them to the end of the cycle.

Build Automation In-sprint

Automation usually lags by at least one sprint. Teams take the risk of ignoring regression testing of the new feature at the end of the cycle due to the amount of manual effort and time required. Instead, the tester can begin building the skeleton of an automated test and fill in the objects/element ui identifiers later when the application UI is ready.

Once the UI is close to done, all participants should be working more closely to complete the UI mapping. This ensures the tests are completely automated along with the development and ready to run through continuous integration.

By the time the code is complete and ready to be committed, there are unit tests, API tests, and a handful of automated UI tests. The feature is all set for automated regression testing and then to move to the production.

Regression testing is now faster and the development flow will be smooth.

Deal with changing Requirements

The Agile methodology allows for change in requirements even late in the development. Scrum teams need to be prepared to accept the late change in requirements. When the requirements change, especially towards the end of the sprint and a particular functionality hasn’t been tested well, the team should make informed decisions whether to release the feature or push it to the next sprint based on the criticality of that function/feature. If this is the case, you could do a heads off by performing basic Sanity testing of the changes and not go into deeper levels of testing.

It can also be the case that the user stories/requirements are not recorded appropriately and, the team missed out on critical functionalities. This can also happen as a result of not involving testers in the early planning/designing phases or due to improper documentation.

Many a time, product requirement documents are too often read once and left which isn’t ideal for an Agile process. This creates a challenge for testers because there is a lack of understanding of the requirements and proper test cases are not constructed.

Perform some Exploratory Testing

When everything goes fine, you could do some free unrestricted or “not bound by rules” testing with less or no documentation. You can see if you missed out on anything or an unused feature.

It would be wise to set a dedicated time for some exploratory testing complementary to Regression Testing to explore other areas of the software like a real user would.

The purpose of regression testing is to unmask abnormalities, unexpected behavior as a result of change, updates, or re-releases. For this, it is required that every relevant test case that has direct or indirect impact is run within the limited span of time in the sprint.

You could schedule regression tests in parallel to be able to run it more often without manual intervention but supervision.

Build Regression tests in-sprint.jpg

Image courtesy: Background vector created by iconicbestiary – www.freepik.com

Discover and read more posts from Lavanya
get started
post commentsBe the first to share your opinion
Show more replies