Test Automation Scripts
A test is considered as a single action or a sequence of actions, that defines whether a specific feature meets functional requirements.
It has multiple test files / packages / class files which will be executed based on the configurations defined in testng.xml.
Test Sample for Valid Data:-
Test Sample for Invalid Data:-
Why and How to Automation Test Scripts:
The actual task and the important task starts from here.
From here the user need to have the logical thinking and write a complex programs/test scripts which will get executed.
Here a Questions arises when people think of automation. How much percentage of programming knowledge needed to become Automation Analyst?
I can simply say “The More You Know The More You PLAY”
If the person is really strong in programming and logical thinking, he/she can simply play with any automation tool.
We should be able to tell the tool to execute the test cases in a very simple way and that code should be easily understandable to other users who look into it.
In Above example “Add Users With Valid Data”
To execute the test case, we need to login to the application. We also need to check if the user is already logged in or not. And the other we need to check is if the logged in person is having access to “Add Users” or Not. If the above Two Conditions are passed then we should execute the rest Else we should return the test as failed.