iljapavlovs / kotlin-gradle-allure-junit5-parallel

Example project which uses Kotlin, Gradle, Allure, Selenide, Retrofit2 and Junit5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running

./gradlew clean test allureReport 

Running via env type

./gradlew clean test -Penv=<dev,acceptance> 

Resources

  • Allure + Gradle + Selenide + Retrofit2
  • Junit 5 parallel execution
    By default, JUnit Jupiter tests are run sequentially in a single thread. Running tests in parallel, e.g. to speed up execution, is available as an opt-in feature since version 5.3. To enable parallel execution, simply set the junit.jupiter.execution.parallel.enabled configuration parameter to true, e.g. in junit-platform.properties (see Configuration Parameters for other options).
    Once enabled, the JUnit Jupiter engine will execute tests on all levels of the test tree fully in parallel according to the provided configuration while observing the declarative synchronization mechanisms. Please note that the Capturing Standard Output/Error feature needs to enabled separately.
    Parallel test execution is currently an experimental feature. You’re invited to give it a try and provide feedback to the JUnit team so they can improve and eventually promote this feature.
    
  • Gradle`s Junit5 support
  • Passing System Properties from command line:
When you run gradle test -Darg1=smth, you pass system parameter arg1 to gradle jvm, not test jvm where tests are run. It is designed this way to protect tests from side effects.
If you need to propagete param to tests, use smth like this
test {
    systemProperty 'arg1', System.getProperty('arg1')
}

Allure

Issues:

  1. allure-framework/allure-java#278

About

Example project which uses Kotlin, Gradle, Allure, Selenide, Retrofit2 and Junit5


Languages

Language:Kotlin 100.0%