These code segment are my practice for automation testing about website.
I would like to design the testing framework to slove the testing problems.
Idea: Selenium with JAVA + Grid + TestNG + data driven testing + Extentreport + log management + screenshot
TestNG.xml is the configuration file. I use this file to set my report related information, browser type and test case.
This file is also the program entry. It can be executed via the eclipse-TestNG suite.
This file is the test suite.
It includes the grid setting, webdriver environment setting and extentReport setting.
This file is the main test case.
It will implement and verify the login test case.
loginTestCase: It uses the LoginPage module to run login test
loginDataProviderCase: It uses the data driven testing module to run exception test
This file is the login testing module.
It includes information of WebElements and functions.
For example:
1.findElement by id or xpath
2.login/logout function
This picture is the testing result.
After run the testing script, it will produce the testing report.
This module is Extentreport