Run UI-Automation Tests

automationpractice.com-demo

Project stack :

Required environment

  • Docker (is optional for remote running)
  • Java 8

Setup Selonoid

 ./selenoid_start.sh
  • or run docker-compose file (not recommended for Windows) :
 docker-compose up
  • You can open Selenoid UI as localhost:8081 in browser

Import project (is optional)

  • should be imported as Gradle project with using Gradle wrapper
  • for run tests from IDEA You need to enable Annotation Processing
 Settings > Build > Compiler > Annotation Processors

Run tests from cli

commands syntax:

  • local run example (Chrome browser as default and without parallelism)
 ./gradlew clean test
  • local run with specific browser and parallelism
 ./gradlew clean -Pthread=2 testChrome
 ./gradlew clean -Pthread=2 testFirefox
  • remote run with specific browser and parallelism
 ./gradlew clean -Pthread=2 -Plaunch=remote testChrome
 ./gradlew clean -Pthread=2 -Plaunch=remote testFirefox

Generate Allure report

  • generate report after full test run
 ./gradlew allureReport
  • then run Allure web service
 ./gradlew allureServe