Cross Browser Testing.
Applitools Hackathon
The next table compares some attributes to consider while choosing between a traditional or modern approach.
Attribute | Traditional | Modern |
---|---|---|
QA Seniority require | Semi Senior | Junior |
Maintainability | Low | High |
Running Time | 183 secs | 97 secs |
Code Lines | 885 | 248 |
# Locators | 37 | 5 |
Complexity | High | Low |
Spent time | 84h | 3h |
- Super easy to implement tests.
- Saves a lot of time in the test design and execution, this leads to save money.
- Test maintenance is almost null.
- The Issues report is very easy to do, is made up of text and an image that helps to understand it.
In the traditional testing methods apply the Factory Pattern. Eviting problems while designing the automated tests, these design patterns could immediately help by proving a formula / template & saves a lot of time and effort.
Traditional cross browsing tests must have parameters as the
browser type. For that reason, instructed TestNG to pass you
the browser type with the @Parameters
annotation and a testng.xml file.
Page Object pattern was used for the test implementation which goal was to model the pages and their behaviors to achieve clear test of writing, understanding, avoid duplicate code, and easy to maintenance.
\---src
\---test
+---java
| \---com
| \---handresc1127
| | ModernTestsV1.java
| | ModernTestsV2.java
| | TraditionalTestsV1.java
| | TraditionalTestsV2.java
| |
| +---pages
| | detailsPage.java
| | headerPage.java
| | homePage.java
| |
| \---utils
| | BaseTests.java
| | EyesManager.java
| | HackathonReports.java
| | PropertyLoader.java
| |
| \---webDriverFactory
| ChromeDriverManager.java
| DriverManager.java
| DriverManagerFactory.java
| EdgeDriverManager.java
| FirefoxDriverManager.java
|
\---resources
| author.png
| test.properties
| testngModernV1.xml
| testngModernV2.xml
| testngTraditionalV1.xml
| testngTraditionalV2.xml
|
\---drivers
+---linux
| chromedriver
| geckodriver
|
+---mac
| chromedriver
| geckodriver
| msedgedriver
|
\---windows
chromedriver.exe
geckodriver.exe
msedgedriver.exe
- Chrome V80+
- Firefox V75.0+
- Microsoft Edge V83+
- Java 11
- Config src\test\resources\test.properties
1. git clone
2. mvn clean install
- All tests
mvn test
- Google Chrome - ChromeDriver 83.0.4103.39
- Mozilla Firefox - GeckoDriver 0.26.0
- Microsoft Edge - MsEdgeDriver 83.0.478.50
- Henry Andrรฉs Correa Correa - Linkedin - [email protected]