Automated Software Testing

Part 1/1: This blog is to explain and help you understand what is automated software testing, where do we use it, what makes it a preferred choice over manual testing,how is it performed currently and its limitations

First of all, let us understand what do we do in manual testing??A test engineer will manually test the software (under test) – Pretty simple right! So what is that we do different in Automated testing?? The same testing action is performed using a script with no manual intervention. It means that the automation script here performs the action which is generally done by a human (engineer). This automation script can be in any of the existing programming languages like Java, Python, Ruby, Pearl, etc. Choice of the script language can be based on the requirement, applicability of the need, skill set and proficiency of the automation testing engineer with that particular programming language.

So the next question that might arise is where all we can use automation testing ?

It can be used toautomate web, mobile, desktop applications and APIs (Application Program Interface). This covers almost all areas of testing requirements. Isn’t it?

Though automated testing can perform the same action as manual testing, why should one get convinced to use it? One need to understand the merits of using it so that you can start using automated testing wholeheartedly.

Let me list down top 3 features ofautomated testing to help you evaluate its merits and have an informed choice.

1.) Fast and time saving– For any given set of test scenarios, Automation testing is much faster than manual testing. This in turn results in huge time savings as all test scenarios are tested at comparatively very less time.

2.) Wider test coverage – All possible test scenarios may or may not be covered in case of manual testing. Whereas automated testing enables better and wider test coverage. This is made possible with the comprehensive testing script which ensures that all scenarios are covered vis-a-vis scenarios tested on sampling basis in manual testing.

3.) Better accuracy– Manual testing is prone to human errors since it involves testing of similar scenarios which is repetitive and mundane in nature. This can be prevented in automated testing making the test results more accurate.

I hope this gave you a fair idea of why to go for automation testing. Now moving to the how part of it – Let us see an example to understand this clearly – eg. Test scenario is to log in to Gmail and verify whether the username is seen in the homepage (i.e the default inbox page)

One would have to go through the below steps in Manual Testing:

Navigate to Gmail login URL

Type username

Type password

Click login

Verify whether the username is displayed in inbox page

Now, let us see how the same thing can be done in automation testing:

Before performing the actual automation testing, it is important to understand some essential steps:

1. Tell yourscript to identify a field

Automation test script does not have the ability to identify things like username input field box, password input field box or the login button unlike humans (i.e.manual tester). So we need to teach the script (see this is how you end up talking to machines when you do too much coding :P) to identify the username, password or submit fields based on their attributes like name, ID, Xpath, CSS path, etc. (For beginners who are wondering what these attributes are?! – these attributes are nothing but identifications for a field. Each field in a html page will have multiple attributes associated to it – something similar to what we humans have as name, identification marks, aadhar number, etc.

So now you know how to teach/tell your script to identify any particular field.

2. Tell your script what action to perform

To send commands/actions to a field in a browser, any available web automation testing tools like Selenium Webdriver can be used. Almost all actions which can be done manually can be done using web automation testing tools. Selenium webdriver supports numerous programming languages including C#, Java, Python, Pearl, PHP and Ruby.