Firstly, you have to clone the repository to get the project structure.
The project uses TestNG and it is configured to exetcute the tests using the maven test command. You will be able to execute it going to project directory (use promp cmd) and executing there the maven command. If you want to execute a concreted test suite you can do it executing mvn clean test -Dtest.suite=[testSuiteName].xml
pom.xml is located in the root path of the project. There, there are defined versions of plugins and technologies, parameters for test executions and dependencies.
Important parameters to execute tests:
- browser: Browser used to launch tests. Allowed values: Firefox, Chrome
- local.OS: OS used to launch tests. Allowed values: Windows , MAcOS
- webdriver.chrome.driver: Path in which the Chrome driver is.
- webdriver.firefox.driver: Path in which the Firefox driver is.
- files/software: In this folder we store the browser drivers (geckodriver versions , chromedriver versions)
- suites: Here you can group sets of tests to run it together.
- log4j.properties: This file sets the logging properties, in this case the output to console.
- test.properties: In this file we store some common tests properties.
- pageObject: Here you have every PageObjects. All PageObjects extends BasePageObject, it has important functions.
- testSets: Here you can find the tests classes. @before and @after methods are defined here. All tests classes extends DefaultTestSet.
- utils:
- Inizialization - Contains the main selenium webdriver configuration.
- DataUtils - Class that contains useful methods to provide to us mock data.