Skip to content

The example of Test Automation Framework on Java, TestNG, Selenide, ExtentReports, Maven and Log4J.

License

Notifications You must be signed in to change notification settings

Zhuravl/Java-TestNG-Selenide-ExtentReports-Maven-Log4J

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Usource Test Automation Framework Example

To launch tests, execute command (from the project root directory):

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)

An example params for launching the example test using Chrome browser and the default params:

mvn clean test site -Durl=https://usource.com.ua/ -Dbrowser=chrome -Dtest=ExampleTest,ExampleTwoTest,ExampleThreeTest -DthreadCount=3

Test Execution Report:

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).

About

The example of Test Automation Framework on Java, TestNG, Selenide, ExtentReports, Maven and Log4J.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published