An end to end Automation framework includes a complete agile test approach, the following are the steps to follow:
Agile Methodology: AGILE methodology is a practice that promotes continuous iteration of development and testing throughout the software development lifecycle of the project. Both development and testing activities are concurrent at the beginning itself
The Agile Methodology is divided into Sprints and each sprint is considered as Iterations, Each iteration has it's testing phase and development phase.
The user in the sprint gets a user story, he develops the logic functionality, it is considered as very small functionality like Login functionality, he develops login functionality and sends it to the tester to test it.
Now, the tester in the same sprint will test the functionality and if is there any issues then he will send back to the developer.
In the flight application, we have four epics such as
An Epic is a big chank of work that has one common objective, it can be a feature, it can be a customer request or the business requirement. All these epics have one common requirement that is Login. Each epic normally takes one sprint to complete.
Each Epic is Further divided into a user story. All these Epics and USerstories are first to come from the business, so the business user has to test Login functionality, Manage Booking, Search Flight and Logout functionality.
Each of these user stories has its own acceptance criteria, the acceptance criteria are nothing but, there are certain conditions if this condition is true then we can say that the user story is complete.
Below are the steps to follow while writing a sample manual test case:
|Test Case Name||Test Steps||Description||Expected Result|
|Book a flight-Round trip between To and From destination||Step-1||Open a browser and enter the URL <ngendigital.com/demo-application>||Flight application Login page will be displayed|
Enter email@example.com and password-abc123
|Flight application Homepage is displayed. Verify the page contains the Title-Book Your flight and a tab displaying 4 links-search flights, Manage Booking, Check-in, and Logout|
|Step-3||Click on the Link Manage Booking||Manage booking tab is displayed. It contains From and to destination. Start and Return Dates. checkbox for the Round trip, and Radio Buttons for Flight and Flight+Hotel|
|Step-4||Choose From-Toronto, To-Atlanta, start Date-2019/06/21, Return Date-2019/06/28. Check Round Trip and choose Flight radio button.click on getting Fare||A table displaying the Fare for the combination of the following Start and Return Dates. Start dates--19-jun,20-jun,21-jun,22-jun,23-jun,24-jun,25-jun,26-jun,27-jun,28-jun,29-jun,30-jun.|
|Step-5||Click on Confirm Booking||
The flight will be booked displaying the Message.-SUCCESS!! your flight is booked.
|Step-6||Click on Logout||The user is logged out. Verify the Login page is displayed.|
|Step-7||Close Browser||Browser is closed|
Open the ngendigital page and click on the demo application, log in to flight application page will open. Enter the required credentials, username:firstname.lastname@example.org, and password: abc123 and click on sign in.
Once you logged in, Book your Flight page will open, there you can see, Search Flight, Manage Booking, check-in and Log out options will be there.
Click on the Manage Booking and fill the required credentials
Select the Flight or Flight + Hotel and click on Get Fare, you will see the fare details, select any one of them and click on the confirm booking.
Once you click on to confirm a booking, a message will be displayed as shown below
We have seen that the Epic-login is having three user stories such as Login Existing User, Login New User Signup, Login Forgot Password.
Lets start working on Epic-Login and see how many test cases we can generate from the user story
The Login-story is having two main scenarios like Static validation and Client-Side Validation and Positive Test Case.
The static validation is nothing but it verifies that the object is present in the login page or not. It is totally having six test cases. Let us go through our first test case.
|Test Scenario||Test Case Name||Test Steps||Description||Expected Result|
|Static validation and Client-side validation||TC01-Login screen-Objects on the page||Step-1||Open the browser and enter the URL <www.ngendigital.com/demo-application>||The flight application login page will be displayed. Verify the page contains a box containing the title-My Account And containing two text boxes for Username and Password, and two buttons sign in and signup. The page contains a link for forgot password and displays the text. Forgot your password..? Click here.|
That means when you hit the URL in the web page, it should be displayed and the Flight application login page will be displayed and the box will be open which contain My Account
We have to verify each and everything over there.
Open the Ride editor and create a new test suite as Flight Application and then create our first test case as
TC01-Login screen-Objects on the page.
Now create a new Resource File as
Create a new keyword as Login and navigate to URL
Go back to commonkeywords and import the selenium library and go to navigate to URL keyword and create a link as shown below
Now, go to Flight application1 test suite and import the resource file and then go to our first test case TC01 and enter the keyword as
Lognandnavigatetourl, here you need not provide the URL and the browser name because we have created a new keyword.
This is all about the first step.
The second step is to Verify the page contains a box containing the title-My Account and containing two text boxes for Username and Password
Navigate to the Flight application page and right-click on the My Account and inspect the element and try to find whether the element is unique or not by writing the Xpath for that element.
Now go back to the commonkeywords and create another one user-defined keyword as a
change to iframe and give credentials inside the change to the iframe as shown below
And another one user-defined keyword as
Enter the credentials inside the
Objectonwebpage as shown below
And then go back to the ngendigital page and in the My Account page there another two other elements. Inspect these two elements and try to write the XPath for the same.
The next condition is to verify the element sign in and sign up keywords and write the XPath for the same. In the same way, write the Xpath for the Click here and the Forgot your Password element as well.
Now, we have three user-defined keywords, go to your test case and enter all the tree user-defined keywords. Save the test case and select and run the test case. In this way, you can simplify writing a test case.
|Test Scenario||Test Case Name||Test Steps||Description||Expected result|
|Static Validation and Client-side validation||TC02_Login screen-default text for username and password||step1||Open a browser and enter the URL <www.ngendigital.com/demo-application>||Flight application Login page will be displayed. Verify the username field contains the text-Email and password text is masked.|
That means when you navigate to the ngendigital.com/demo-application page, you can see that the email and password attribute values are masked over here and hence you need to verify that whether the attribute is containing the values email and password.
right-click on the email and inspect the element and write the XPath for the same.
In the above image, you can observe that value is an attribute and it contains the value as email and the password.
Go back to your Ride editor and create another one user-defined keyword in the
Defaultvalueusernamepassword and give the credentials as shown below.
Now, create a new test case
TC02_Login screen-default text for username and password
And write the test case as shown below and save then run the test case.
Once it starts executing the test case, it will verify the attribute values and hence the log report is
Let us move on to the third test case
|Test case Scenario||Test Case Name||Test Steps||Description||Expected Result|
|Static validation and client-side validation||TC03_User doesn't enter email||
||Open the browser and enter the URL <ngendigital.com/demo-applicattion>||Flight application Login page will be displayed|
Delete email and enter password-abc123.
|System Displays-please enter the username|
That means when we navigate to the ngendigital practice page and open the demo application, you will see email and password has been masked, just remove email and enter the password as abc123 and click on sign in the system will immediately display a message as please enter the username
Inspect the Login to Flight Application and then write the Xpath for the same and go back to the ride editor and enter the locator Xpath in the
navigatetourl user-defined key to verify every time you log in to the flight application.
And, create a new user-defined keyword for the second part(clearing the text email), first create a new user keyword as
EmptyUsername write scripts for clearing the email and then entering the password and then click on the Sign-in button and the last one verifying whether the test please enter username is present or not.
Inspect the element please enter username and write the XPath for the same and mention that in the user-defined keyword in case of getting the text.
Before that create new scalar variables as shown below
Now, go back to Emptyusername and use this scalar variable
Now, create a new test case as
TC03_User doesn't enter email
Select the test case and run, once the test case starts executing, Opens the ngendigital page and clears the email and then enter the password and displays the message "please enter username"
And the log report is:
The fourth test case is a negative test case, let us see the details below :
|Test Case Scenario||Test Case Name||Test Steps||Description||Expected Result|
|Static validation and client-side validation||TC04-User doesn't enter Password||Step-1||Open a browser and enter the URL <www.ngendigital.com/demo-application>||Flight application Login page will be displayed|
|Step-2||Enter email@example.com and delete the password. Click on Sign In||System Displays -please enter password|
Navigate to the ngendigital practice page, enter the email and delete the password, as soon as you click on the Sign In, the system will display the message as Please Enter Password.
Right-click on please enter the password and inspect the element and then write the Xpath for the same.
Now, go back to the ride editor and create a new user keyword as
And, create a new test case as
TC04-User doesn't enter Password and write the test scripts.
Now, select the test case and run, Once it starts executing, the ngendigital.com/demo-application page will open and it enters the Email and delete the password and click on Sign In and then displays the message please enter the password.
The Log report is:
In this test case, we are going to deal with deleting both email and the password.
|Test Case Scenario||Test Case Name||Test Step||Description||Expected Result|
|Static validation and client-side validation||step-1||Open a browser and enter the URL <www.ngendigital.com/demo-application>||Flight Application Login page will be displayed|
|TC05_User doesn't enter email or password||Step-2||Delete Email and Password. Click on Sign In||System displays please enter username and password|
In every test case, I am first executing the test scenario manually and then executing it automatically by writing the test case.
First, navigate to the ngendigital page and then delete the email and password and click on the Sign In. The system will display the message please enter username and password.
Right-click on the enter username and password and inspect the element and then write the test case for the same.
Now, create a new user-defined keyword as
Now create a new test case as
TC05_User doesn't enter email or password
Select the test case and run, once the test case starts executing, the ngendigital page will open and it will clears the email and password and then click on the Sign In button and finally displays the message as please enter username and password.
The log report is:
In this test case, we are dealing with when the user enters the email in the wrong format.
|Test Case Scenario||Test Case Name||Test Steps||Description||Expected Result|
|Static validation and client-side validation||TC06_User enters invalid email formats||Step-1||Open the browser and enter the URL <ngendigital.com/demo-application>||Flight application login page will be displayed|
|Enter support*ngendigirtal.com and password as abc123 and click Sign In||Invalid email format message will be displayed on the screen|
Navigate to the ngendigital practice page and then enter the username as support*ngendigital.com and the password as abc123 and click on Sign In, then the Invalid email format message will be displayed on the screen.
Right-click on the Invalid username/password and inspect the element and then write the Xpath for the same.
Go back to Ride editor and then create a new user-defined keyword as
Now, create a new test case as
TC06_User enters invalid email formats
Now, select the test case and run, once the test case starts executing the test case, it will open the ngendigital/demo-application and then it enters the username and password and click on the Sign In button and then displays the message as Invalid username/password.
The Log report of the test case is:
|Test Case Scenario||Test Case Name||Test steps||Description||Expected Result|
|Positive Test case||TC07_User Login with Valid username and password||Step-1||Open the browser and enter the URL||Flight application demo page will be displayed|
Enter firstname.lastname@example.org and password-abc123.
|The page contains a tab, containing 4 links Search Flight, Manage Booking, Check-In, Logout|
First, let us do this manually, navigate to the URL ngendigital/demo-application and enter email and password and click on Sign In. Once you logged in the flight application login page will be displayed. It contains four tabs such as Search Flight, Manage Booking, Check-In, and Logout.
And, as soon as you clicked on the Logout button the Login page will be displayed.
DataDriver is an alternative approach to create Data-Driven Tests with the Robot Framework. DataDriver creates multiple test cases based on a test template and data content of a CSV or Excel file. All created tests share the same test sequence (keywords) and differ in the test data. Because these tests are created on runtime only the template has to be specified within the robot test specification and the used data are specified in an external data file.