Lab Assignment for Software Testing Tools
Prepared By – Dr. Manisha Patil , Assistant Professor, ICCS.
Steps to record and Run Automated test case for Even-Odd Code
using Selenium Plugin for Chrome Browser
1) [Link]
2) After Installation you can find it here as shown below (Click on extensions)
3) Select Selenium
4) Once it is opened
5) Click on Record a new Test in a new Project
6) Type project name e.g. Even_Odd Project 1
7) [Link] - Enter URL
8) Add New Test Case
9) Write test case name e.g. PQR , click on OK
10) Copy this code from one text file ( Keep the text file ready and copy the code too using
Ctrl + C before you start recording)
import [Link].*;
public class Main
{
public static void main(String[] args) throws IOException {
int a;
BufferedReader br = new BufferedReader (new InputStreamReader([Link]));
[Link]("Enter a:");
a = [Link]([Link]());
if( a%2 == 0)
[Link]("Even");
else
[Link]("Odd");
}
}
11) start recording as below
12) It will open online GDB, control + v will paste your code
13) Click on the button Run in online gdb
14) All these once recorded, come back to selenium to stop the recording
15) Click on the Test case which you have recorded now e.g. PQR
16) Now click on the button Play (Run Current Test)
17) PQR test completed successfully
Reference Link : [Link]
--------------xxxxxxxxxxxxx-----------------