Skip to content

Files

Latest commit

 

History

History

java-framework

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

The-Internet app testing

TAF: Java/Selenium/TestNG/Maven/Log4j2/surefire-report

Prerequisites

Already included in this package

  • ChromeDriver
  • WebDriver

Help

For help on using the run command, please refer to the run command help

./run -h

Installing

After installing and configuring the above pre-requisites, type the following:

git clone https://github.com/jpsugg/the-internet-tests.git
cd java-framework
chmod +x run
./run

Note: the run command pulls the docker images and configures the docker network automatically.

Running

  • Tests locally,

      ./run
    
  • Tests against a remote Selenium Grid,

      ./run -r 
    

Running faster

  • Tests locally; spawns 4 threads in parallel,

      ./run -T 4
    
  • Tests against a remote Selenium Grid; spawns 2 chrome-nodes in parallel with 3 max. concurrent sessions each,

      ./run -r -T 2
    

Note: all the above commands, start and stop the Webapp and the Selenium Grid automatically. Note2: The amount of chrome nodes that will successfully run your tests will depend on your machine. On my machine, running more than 4 nodes may turn tests unstable.

Stopping / Starting

  • To manually start/stop the Webapp and Selenium Grid, without running the test suite:

      ./run -G start         # Initializes a Selenium Grid with 1 Chrome node
      ./run -G start -T 7    # Initializes a Selenium Grid with 7 Chrome nodes
      ./run -G stop          # Terminates the Grid
    

Tests reporting

A test report can be found under:

target/surefire-reports/index.html

TestSuite structure

  1. Using ChromeDriver to write Tests for the following scenarios: