Wednesday 5 July 2023

How To Design Automation Frameworks with Minimum Automation Suite Run Time

When you are designing UI test automation framework for any micro services architecture based application, then how you will design, so that your automation suite run time will be minimum?

Obvious answer is run test cases in parallel. Apart from that, how you will design your automation framework, so test cases run in faster way?

As per me, I will create automation framework such way that we can leverage APIs (As it is micro service based architecture) in test cases. Write test case such way that all the preconditions will be done by API and then perform actual part of test case through UI.
Let's take an example, assume there is test case which required to create one record in system and then perform some operations on that record. Here, create record in system is precondition. So, I will do that thing through API first then login application through UI and perform actual operation and verification. It will take less time then run test case full in UI mode.

Here, you might have question that if create record from UI is not working then it will be miss. No. We can create small smoke suite in CI/CD which will be always triggered before full automation suite is triggered. If there is any failures in smoke suite then full automation suite will not trigger.
So, all basic functionality like Login, Logout, CRUD operations will be test through UI in smoke suite. Smote suite should be run in maximum 10 minutes. So, you don't required to do that from UI in all your test cases.

In that way, you can also maximum utilize your selenium grid architecture. AS, any browser session will open only for main test cases operation, precondition will be always done through API.

So, this way we can create hybrid automation framework (UI + APIs) and decrease automation suite run time.

No comments:

Post a Comment

Popular