This project presents automated regression tests for a technical test written in JAVA using Maven and the following dependencies:
- Selenium webdriver
- webdrivermanager
- TestNG
This project has four directories (pages, tests, suites, and utility) that have JAVA or XML classes.
This directory has the generic classes that we use in a routine:
- Messages: This file centralizes all the output messages that we use in the test cases.
- Locators: This file centralizes all the locators of the HTML elements that we use in the test cases.
- Base: This file contains the encapsulation of selenium methods to interact with the components of the graphical interface of web pages.
This directory has the suite case in XML format. the testng.xml file orchestrate all test cases defining parameters and tests necessary for each of them.
This directory has all the specific functionalities. In all those classes, the * test * tag is validating test behaviors, the beforetest prepare the test environment and the aftertest close the webdriver and each web pages opened in tests.
This directory has all the tests separated by the page to which each of it corresponds.
To run this project you need to follow the next steps
- You could import the TestNG library into the project (optional)
- You must update the Maven project
- You could run the project as TestNG Suite running the testng.xml file
- You could run the project as Maven running the whole project as a Maven test.
To run this project you need to follow the next steps
- Clone this repository
- Open a terminal into the project
- run the command line below
mvn dependency:resolve
mvn dependency:resolve-plugins
mvn clean install
To run this project you to follow the next steps:
- Clone this repository
- Attach it into a CircleCI project
- Change the browser parameter to
Chrome CircleCI
in thesrc/suites/testng.xml
file
And CircleCI recognize the file .circleci/config.yml
to execute the test by a pipeline in a docker container.
To run this project you to follow the next steps:
- Clone this repository
- Create a job into Jenkins
- Attach the file
jenkinsfile
And Jenkins execute the test by a pipeline running the test every night at 11PM.
- Locate the ‘Help’ option on the menu bar and click it.
- Select the option ‘Install New Software’.
- Click the ‘Add’ button on the appeared installation box.
- You will see an ‘Add Repository’ dialog box, where you need to provide the Name and Location.
- Type ‘TestNG’ in the Name field and ‘http://beust.com/eclipse’ in the Location field.
- Click ‘OK’ button.
- The given URL will be populated on the “Work with” field.
- Check the box next to TestNG and click ‘Next’
- Keep clicking ‘Next’ until you reach a License Agreement dialog box.
- Accept the license agreement and click ‘Finish’.
- This will begin the installation process. Wait until it gets finished.
- In case you get a security warning pop-up, click OK. Else, skip this step.
- You will get a ‘Software Updates’ dialog box prompting you to restart Eclipse. Click ‘Yes’.
- Once your Eclipse has been restarted, you can see TestNG has been successfully installed. For this, click Window->Preferences and you can see TestNG included in the list.