Skip to content

aquality-automation/aquality-selenium-java-template

Repository files navigation

Build Status Quality Gate Allure report

This template provides example projects for TestNG and Cucumber. To use it, you need to delete the unused module.

The Allure report is also used. If you don't need it, also delete it from the code.

Aquality Selenium Template Project

Template for aquality-selenium-java library.

Project structure

  • aquality-selenium-template - project related part with PageObjects, models and utilities
    • configuration/: classes that used to fetch project config from src/main/resources/environment folder
    • forms/: Page Objects
    • models/: classes that represent data models of the application under the test (POJO classes)
    • utilities/: util classes
    • src/main/resources/: resource files such as configurations and test data
  • aquality-selenium-template-cucumber - Cucumber implementation of the tests
    • features/: Gherkin feature files with test scenarios
    • hooks/: Cucumber hooks
    • runners/: Cucumber test runners
    • stepdefinitions/: step definition classes
    • transformations/: Cucumber data transformations
  • aquality-selenium-template-testng - TestNG implementation of the tests
    • steps/: step classes
    • utilities/: utils for testNG, such as JsonDataProvider and ModuleFactory
    • tests/: classes with test methods

Configuration

settings.json file contains settings of Aquality Selenium library. Additional information you can find here.

allure.properties is a part of Allure Report configuration. See details here.

Tests execution

Scenarios from feature files can be executed with TestNG plugin for IDE (Intellij Idea, Eclipse) or with Maven command mvn clean test where you can specify all necessary arguments.

If executed with Maven, tests will be run in 4 threads. To change the amount of threads add -Ddata.provider.thread.count property to the command. E.g. mvn clean test -Ddata.provider.thread.count=10.

Reporting

Allure Framework is used as a reporting tool. Report data will be placed in target/allure-results/ folder (you can change it in allure.properties file).

Run maven command mvn allure:serve to build and open report in web browser. To generate report in CI use corresponding plugin for your system.

License

Library's source code is made available under the Apache 2.0 license.