In this post, I would like to show how I have implemented automated continuous regression testing process in my project. It is based on the Hybrid framework, I had implemented. I would request you to read the post on Hybrid Framework first if you have not.
Problem Statement:
- We follow agile methodology & we have a release once in every 4 weeks. For every release, we push tons of new features into the existing application.As part of the addition of new features/requirements, we also introduce new defects in the existing application.
- When we have 2 weeks for development, 1 week for QA & 1 week for deployment activities for a release, It is very hard to complete all the testing on all the new requirements & the regression testing to ensure that existing requirements of the application are still working as expected.
- New code is pushed to the QA environment daily! So, even if some test cases pass today, they might fail the next day as code is frequently modified!!!
- No one wants defect to be found in the last min as it is very costly to fix & it will also affect the release plan and subsequent releases. Detect defects as soon as they are introduced!!
Continuous Integration :
While developing a software, developers might check-in their code very often a day (at least once). This integration should be verified (using build tools, unit & integration tests) to ensure that software is not broken/developers do not introduce any defect. This process is called Continuous Integration & It is development practice to detect these code integration related issues as early as possible in the software development life cycle.
Above process is helpful in finding all the unit testing / integration testing related issues earlier. It might not find all the functional issues. Why do we, automation engineers, not follow the similar process to detect application functional defects earlier?
Automated Continuous Regression:
I have 5000 test cases in our automation regression suite which, an automated testing tool ,will take 90 hours to execute all the test cases as most of the test cases are very complex!!! All the 5000 test cases are split into multiple suite files based on the business functionality as given below in the picture 1.
We create a separate jenkins job for each suite file.(We use QTP for a project & Selenium-WebDriver for other. We use hybrid framework for both. So this process is not specific to QTP projects. It can be used for any automation testing project).
Each Jenkins job is scheduled to run daily @ 7PM by then we would have received the latest build from the development for the day with all the defect fixes. We have 10 slave machines connected to the jenkins master. So the entire automated regression suites are run daily by the jenkins master on different slave machines. By next day morning, All the 5000 test cases would have been executed & results would be ready ready for analysis.
Advantages:
- Huge effort saving by automating 5000 test cases.
- 0 hr spent in regression testing + few hours for result analysis.
- Immediate feedback – Any new defects introduced today will be caught by next day morning.
- Reduced time to market
- Improved the code quality.
- It has greatly reduced the unnecessary dependency on the QA team for the Regression status.
- Testing team focuses more on testing the new features planned for the release. Does not have to really worry about the regression testing.
Overall Application Regression Health Check:
I have NodeJS server running which serves this dashboard by querying the data from MongoDB which shows overall application functionality health check status. I have a multiple suites / jenkins jobs. Without this dashboard, Checking individual jobs/emails for my application status was very difficult.
Dashboard:
We also have created below matrix to display all the test case execution results for the past few weeks. This is helpful in triaging failed test cases. To know the build version in which a functionality was broken. So that developer can look into the code change happened on that date and easily fix the issue.
Summary:
Implementing this process is not very difficult for your organization. This post only shows a very high level idea about the process. If you are interested in implementing something similar for your organization, Please refer to below posts of TestAutomationGuru.
- QTP/UFT – Jenkins Integration
- Passing Parameters to UFT test from Jenkins
- Github / SVN integration for UFT scripts
Happy Testing 🙂
Hi,
I have a question here,Every time when development team check-in changes build servers build that software .
But the built software must be deployed on Test Servers right? Who will do this job? this also part of CI and development team responsibility?
Without new updated/deployed software on Test Servers how salve machines execute tests on latest version of software?
Could please answer my question
Thanks,
Raj
I have 2 kinds of automated test.
do you have any documentation how to configure slaves, are the slaves are VMs or docker containers.. any real time example with configuration details would be really helpful
Thanks
Nanada
I have all types of slaves – Physical, VM, docker containers etc. I will think about this and share if i can create a post on this. I use jenkins for CI – jenkins site has clear information on this. Are you looking for anything specific.?
I’m working on integrating UFT with Jenkins for CI. My UFT regression test has to run once a deployment is done in our testing environment. (I
The regression suite tests APIs using UFT GUI Test (I’m not going to use API test, so pls dont suggest that 🙂 ) and I write the pass/fail status of each test case in a separate excel file called ‘TestResults.xlsx’. I’m not aware how to upload this TestResult excel into Jenkins after the test run is done.
Appreciate any help.
You should be able to archive the files in the workspace. Check ‘archiving test results’ of this post
Thanks. I had a look at archiving test results in your post. I understand that the files to be archived should be available within the jenkins workspace folder (Please clarify if this is master machine’s workspace or slave machine’s workspace ).
I’m saving the testresult excel in slave machine under the path D:/UFT/MyProject. So in this case how can I archive this file?
Simply where ever the job is run. If it runs on slave, then the slave workspace.
Thanks a lot vlns :). As my automation test runs in the slave machine, I kept my xlsx file in the workspace path of slave and it got uploaded to Jenkins after the run.
Great. You can also create a HTML file as the result and send it to the whole team. Check here – http://www.testautomationguru.com/qtpuft-sending-out-email-with-test-results-using-jenkins/
This is really great informative post
I am so proud of you and your efforts and work make me realize that anything can be done with patience and sincerity. Well I am here to say that your work has inspired me without a doubt.
DevOps Training in Pune