Skip to content

U-TOR/java-selenide-automation

Repository files navigation

Sample Selenide UI Automation Test Framework Build Status

This is a project for running Selenide automated UI tests on TestContainers

Required tools

  • JDK 8
  • Maven
  • Docker

Testing Environents

Tests can be executed on:

  • Local Chrome and Firefox (requires chromedriver and geckodriver installation and availability in PATH)
  • Headless Chrome and Firefox (same requirements)
  • Docker container (requires Docker)
  • Selenoid cluster (requires Docker and docker-compose)
  • Zalenium cluster (requires Docker and docker-compose)
  • SaaS solutions

Predefined browser resolutions:

  • 640x360
  • 800x600
  • 1024x768
  • 1280x720
  • 1366x768
  • 1600x900
  • 1920x1080
  • 3840x2160

How to run

  1. Start Docker service
  2. Run tests:
mvn clean test -Pbrowser.chrome -P environment.local.container
  1. Build reports to temp folder and view in browser:
mvn allure:serve
  1. Build reports and save to target/site
mvn allure:report

Sample Allure report can be found on http://sample-selenide-automation.surge.sh

Environment specific notes

Selenoid Cluster

  1. Pull browser images before running tests:
    docker pull selenoid/vnc_firefox:76.0
    docker pull selenoid/vnc_chrome:81.0
    
  2. Run docker-compose
    docker-compose -f selenoid-docker-compose.yml up
    

Checkstyle

Project uses Google Code style. See https://google.github.io/styleguide.

IntelliJ IDEA setup

  1. Open Settings -> Editor -> Code Style.
  2. In Scheme settings (settings icon on right side) -> import schemes-> intellij idea code style xml.
  3. Select $PROJECT_DIR/intellij-java-google-style.xml.
  4. in Scheme dropdown select the GoogleStyle IDE (newly added style). Click on apply and close.

Validating project style

mvn checkstyle:check

Travis CI Integration

This project is integrated with Travis CI, see https://travis-ci.com/vikmaksimenko/sample-selenide-automation