General Anatomy of a test script you should be familiar with.

Sajitha Pathirana
5 min readApr 18, 2024

The sustainable and optimised ROI can be achieved from test automation, when you have a good backbone for the tests. While technologies, tools and frameworks used for automation help us in developing and maintaining robust automation projects, the true power of automation remains in the tiniest component of the automation Eco-system, the test script.

Test script is the primary piece that contains instructions on how to perform the test which mirrors the test case and when executed, test script mirrors the manual tester. Hence, it is extremely important to verify that the test script is performing exactly the same steps and produce same results without any discrepancy against manual testing.

General Anatomy of a test script you should be familiar with.

In reality, test scripts may not work as expected and could show discrepancies due to incorrect assumptions, issues due to test dependencies, test data mismatches and so on. Here, in this article, let’s focus on how to avoid these discrepancies by following a general script anatomy to structure the test such a way to avoid unexpected behaviors which will help to improve the efficiency and reliability of overall test suite reducing the execution time.

The best way to explain this would be to take a real-world test scenario.

--

--

Sajitha Pathirana
Sajitha Pathirana

Written by Sajitha Pathirana

A Test automation enthusiast, passionate to help the teams to enhance their testing journey with his decade of experience in the field.

No responses yet