Showing posts with label Gradle. Show all posts
Showing posts with label Gradle. Show all posts

Monday, July 30, 2018

Configure Cucumber using Gradle in Eclipse

To configure Cucumber using Gradle in Ecilpse, you may follow the same steps in Configure Selenium WebDriver using Gradle in Eclipse. The only thing you need to do is to add cucumber dependency in build.gradle file.

To get the latest cucumber dependency, you may check the Cucumber website here or search.maven.org by searching 'cucumber-java'. The latest version is 3.0.2.

And copy cucumber gradle config to build.gradle file.

dependencies {
    // testCompile 'io.cucumber:cucumber-java8:3.0.2'
    testCompile 'io.cucumber:cucumber-java:3.0.2'
    testCompile 'io.cucumber:cucumber-junit:3.0.2'
}

Wednesday, July 25, 2018

Testing Report using Gradle

After we execute all the test cases using Gradle "test" task, it will generate HTML reports for us, it shows how many tests failed and how many tests passed.

There are two ways to execute the Gradle "test" task.

1) Run Gradle test in eclipse

After finish running all test cases, it looks like this,


2) Execute "gradle test" in command line under the project directory

3) Open the report HTML file in the browser