mvn clean test site -Durl=TARGET_URL -Dbrowser=BROWSER_NAME -Dversion=BROWSER_VERSION -Dtest=TESTS_SCOPE -Dtimeout=TIMEOUT -DthreadCount=THREAD_COUNT
Where: Parameters for the API and UI tests:
- TARGET_URL - the target site URL
- BROWSER_NAME - target browser name ('chrome', 'firefox', 'ie', 'opera', or 'edge')
- BROWSER_VERSION - browser version, optional (the latest by default)
- TESTS_SCOPE - test name(s) to execute (e.g. 'MyFirstTest' or 'MyFirstTest#firstMethod' or 'MyFirstTest#firstMethod+secondMethod' or 'MyFirstTest#firstMethod,MySecondTest#firstMethod')
- TIMEOUT - the MAX timeout value (in seconds), optional (15 sec by default)
- THREAD_COUNT - specify how many threads should be allocated for this execution, optional (1 thread by default)
mvn clean test site -Durl=https://usource.com.ua/ -Dbrowser=chrome -Dtest=ExampleTest,ExampleTwoTest,ExampleThreeTest -DthreadCount=3
To get the execution report, use maven site
command and find the result in the target\test-report\report.html
file.
NOTE: It's required to install and add to the PATH:
Also, in order to be able to execute tests using the Scripted Pipeline, it is required to have Jenkins environment with a Pipeline type job (that will call the script from the project) and a Freestyle type job with the 'ATExecutor' name (as a main test executor, configured in the pipeline script).