This project contains a suite of automated tests for the website Automation Exercise. The tests are written using Selenium WebDriver with JavaScript and are structured using the Page Object Model (POM) pattern for better maintainability and readability. Mocha is used as the test framework, Chai for assertions, and Mochawesome for generating beautiful test reports.
- Node.js
- NPM (Node Package Manager)
- A supported web browser (e.g., Firefox, Chrome)
git clone [email protected]:Tyler-Kuhn/selenium-autoExercise-tests.git cd selenium-autoExercise-tests
npm install
npm test This command will run all the tests using Mocha with Mochawesome reporter integrated.
- Test results are displayed in the terminal.
- Mochawesome generates a more detailed HTML report. After the test run, you can find the report in the
testReport
folder.
- Generating Reports: Mochawesome is configured to generate detailed HTML reports for each test run.
- Report Location: The HTML report and its assets are saved in the
testReport
directory in the project root. - Viewing Reports: Open the
testResults.html
file in any web browser to view the report.
-
Pages Directory (
/pages
):- Contains classes for each page of the website, encapsulating page-specific elements and actions.
-
Tests Directory (
/tests
):- Contains test scripts that use methods from the page classes to interact with the web application.
-
firstTest.js
:- An example test script demonstrating how to use the page classes and perform basic assertions.
-
package.json
&package-lock.json
:- Lists project dependencies and their specific versions.
- Page Object Model (POM): Enhances test maintenance and reduces code duplication.
- Selenium WebDriver: Provides powerful tools for browser automation.
- Mocha & Chai: Offers a robust testing framework with expressive assertions.
- Mochawesome: Generates beautiful and comprehensive HTML reports for your test runs.
Contributions to this test suite are welcome. Please follow the standard Git workflow for contributions:
- Fork the repository.
- Create a new branch for your feature.
- Commit your changes.
- Push to the branch.
- Create a new Pull Request.
Specify the license under which this project is available, such as MIT, GPL, etc.