Accelerating Automated Testing
With world going agile the need of test often has increased zillion times. Now the QA team should not ask a question "How should we keep up"? Rather we should be saying if not ahead we have all the capabilities to walk in parallel with development. Shift left is the buzz word but have we really shifted when it comes to execution. Most of the times found it tough to achieve. Whenever a QA is asked about expediting the test, the answer is Automation and that's correct. But the automation script which is designed based on UI is fragile and vulnerable. We need a testing approach which is robust and keeps the momentum with the increasing velocity and scope of development.
API test is the answer to such questions and building an automation framework which is capable of automating end to end functionalities using APIs would be much beneficial to the team. With this we can generate comprehensive and scalable tests within minutes. We can replicate the API tests before the APIs are live. We can have the tests ready when the APIs are streaming, and speed up the delivery process. Developers do perform tests on the APIs they’re developing, We can capture key request/response pairs and reuse them for test solution. The developers’ efforts can be converted into business-readable language using BDD approach and jump start the process which will reduce the learning curve for overall team.
Once framework is in place, Product owners, Non-technical testers, business analysts can easily review and extend the test cases without worrying about XPaths. API testing brings numerous advantages :
It is time effective as it consumes less time than manual functional testing or UI based automated testing. In UI based testing, elements of web page needs to be polled which slows down the complete process.
User interfaces tend to change, due to their dynamic nature or due to rapid change requests from users or other stakeholders. But APIs have a more stable interface. As a result, tests require less maintenance and produce fewer false negatives due to outdated tests.
Lets discuss the larger picture of How in layman term:
1) Create a framework which can read payloads and request calls from defined source. The validations needs to be performed on the responses as well
2) Identify test scenarios which needs to be automated
3) Follow the network calls, requests, payloads and responses. This will give an idea how system is creating or getting data from database or through other applications.
4) Create a test data sheet for request payload structure, and validations to be performed on responses
I have done this and seen a tremendous improvement. The overall Automated Regression cycle has come down by 700%. Yes that's true.