Cross Browser Testing using Testsigma
With the constant expansion of the Internet and the proliferation of a number of different browsers, cross browser testing is more important than ever.
Join the DZone community and get the full member experience.Join For Free
Introduction to Automated Testing – Cross Browser Testing
The growth of the Internet in last five years has been nothing less than phenomenal. According to the Web browser market share reports by W3counter.com, Google Chrome dominates the Web browser market share, followed by Safari, Firefox, Internet Explorer, and Opera. This mandates for testing of a web application before release to ensure that they appear and function flawlessly for all the users who might be using any of these browsers. The reason for this requirement is that every web browser interprets code distinctively and therefore the functionality and appearance may vary slightly.
Testing of an application across multiple browsers is a tedious task. Considering the fact that there is a need for continous testing in today's agile development environment, the difficulty only increases. Testsigma simplifies the job by providing multiple browser environments which are easier to manage. It also assists in managing a cloud infrastructure if you don't have the physical infrastructure for running parallel browser sessions on multiple devices.
We will discuss Cross Browser Testing for our already created Test Cases using Testsigma in this article.
Automated Cross Browser Testing in 3 steps
For performing Cross Browser Testing in Testsigma, we need to perform the following steps:
- Create one or more Test Cases and add some Test Steps inside it.
- Create a Test Suite add the previously created Test Case/Cases to it.
- Create an Execution and create separate Execution Environments for multiple web browsers.
1. Create a Set of Test Cases
If you are not familiar with creating Test Cases in Testsigma, please check out our previous DZone article - Web Application Automated Testing With Testsigma to gain some insight into the process of creating and executing a simple Test Case in Testsigma.
Let us assume we have already created a Test Case to check the login page of Testsigma in three web browsers, Chrome, Firefox and Internet Explorer. You can add more browsers to the list.
The Test Steps are shown in the below image:
Once the Test Cases are created and Test Steps are added to it, you can move onto creating a Test Suite to group the Test Cases.
2. Create a Test Suite
Test Suites are used to group a set of Test Cases for Execution. We need to create a Test Suite even though we have only a single Test Case in this example. Test suites are mandatory for execution since every Execution takes a Test Suite as input.
To create a Test Suite, you can navigate to the Test Suites page by going through:
Applications > Select Application > Select Version > Test Suites
1. Click on Create button on the top right corner to create a Test Suite.
2. Enter the Test Suite Name, Description, Prerequisite and then click on Click here to Select Test Cases.
3. Choose Test Cases page opens up. Click on the down-arrow beside the Requirement name to expand the list of Test Cases.
Note: Since we have not created any requirements explicitly, our Test Case is listed under the Default Requirement. If you have created a requirement yourself, you might have a different Requirement name.
4. Select the Checkbox beside the Test Case/Cases that you want to select and click Done button.
5. We will be taken back to the Create Test Suite page once again and the page would look as shown below:
Click on the Create button to create the Test Suite. We would get a success notification for Test Suite creation and the page redirects to Test Suites page.
Now we can move onto the final step, creating an Execution and adding multiple Execution Environments to it. We need to create a separate Execution Environment for each of the web browsers in which we want to run the Tests.
3. Create an Execution and Add various Browser Execution Environments
To create an Execution, you can navigate to the Executions page by going through:
Applications > Select Application > Select Version > Executions
1. Click on the Create button in the top right corner to create an Execution. Create Execution page would open up as shown below:
2. Enter the required details such as Execution Name, Execution Model, etc. We will select the Execution Model as Testsigma Lab for this example.
3. Click on Create Execution Configuration to open the Create Execution Configuration page. In this page, we can specify the Operating System and Browser settings for each Execution Environment.
Execution Configuration for Mozilla Firefox
4. After entering the required details, select the Test Suite to be included in the Execution Configuration and click on the Create button. We will select the Test Suite created in previous section.
5. We need to repeat the above steps (Steps 3 & 4) to create more Execution Configurations for each of the Browsers.
Once all the required Web Browser Execution Configurations are added, it will look similar to the below image:
Here, we have created three Execution Configurations, or three Execution Environments, for Google Chrome, Mozilla Firefox and Internet Explorer.
6. Now, click on the Create button to create the Execution.
7. We will be taken to the Executions page. Click on Run Now button to execute the Tests now or schedule it for later.
Once the Test starts running, wait for some time and click Refresh. Depending on the number and complexity of Steps it will take some time to complete. On an average, a test of 5 steps will be complete in less than 20 seconds.
After the Execution is completed, click on View Reports to go to the Run Results page.
You can click on the Run ID under the Execution Result and on the next page, click on Test Case name under the Test Case Results to see a Teststep-wise report of the Test Execution.
Please check Testsigma Knowledge Base for more detailed articles. If your query persists, feel free to contact us at email@example.com.
Happy Automated Testing!
Opinions expressed by DZone contributors are their own.