This is the final post on Hybrid Framework Development. Here we will focus on different reports and logs that will be created after running our test.
- Before running our test, our ‘HybridFramework’ project structure will be displayed as below.
- We have 3 source folders, JRE System Library and Maven Dependencies, src and target folder,
pom.xml
file in our project. - Here we will execute using Chrome browser. For that we just need to update the property
<selenium.browser>CHROME</selenium.browser>
inside ourpom.xml
file. - After updating the
pom.xml
file, we have to ensure that the properties are updated in system.properties file inside ‘src/main/resources‘ source folder. Right click on ‘HybridFramework’ project and select Maven -> Update Project as displayed below. - After successful update, we can verify the same in system.properties file.
- Next task is to execute our test. Right click on ‘HybridFramework’ project and click Run As -> Maven Test.
- The test gets successfully completed and we can see that two tests are executed. The Logs are printed in console as well as in a log file.
- Refresh the project once we can see three more folders are created – RESULT_LOG, Screenshots, and test-output.
- The RESULT_LOG folder contains the Extent Report. As displayed below this HTML report has all the actions captured. Also as we coded in the action methods, screenshots are attached too. This report not only looks good but also share vital information of our test.
- The Screenshots folder stores all captured screenshots inside the project folder. This framework also ensures that the folders and reports are created based on execution date.
- The test-output folder contains not only the regular TestNG reports but also the log file of our execution. If we execute as Maven Test, the test-output folder will contain only the log file. Notice that we configured the log folder name and the log file name inside
Log4j.xml
. - The log file once opened will be displayed as below. Notice that it will capture all the log information as we coded inside Page Objects.
With this, we completed our Hybrid Framework Development. This framework can be successfully implemented for web-based projects that are planning to move from manual QA to Automation QA. This framework takes a modular approach and is very easy to maintain. Apart from that it also creates wonderful reports that can be shared across different teams.
In coming posts, we will cover on how to upload our project into a repository and then execute using CI tool. Sounds interesting, right?
Well, for that you need to keep following. Till then, Happy Learning!
The complete project is available on GitHub in below location:
https://github.com/autotestmadness/HybridFramework