Execute the test from Gradle task & Allure report

We executed the API test via IDE. Now let us see how to execute the test via Gradle task & view the Allure report of it.

Alert !!

We need to replace gradlew file in the project with the file in ekam template in Github.

There is a defect, IntelliJ IDEA which is corrupting the gradlew file’s comments when the project template gets built. More details can be found here. Defect Details

Please copy the file or its content

from :

Ekam-Template/gradlew

to:

your projects gradlew file under the root folder of the project

Executing test via Gradle task

From the terminal, navigate to the root folder of the project and execute the below Gradle task

./gradlew clean runWebTests


NOTE:

  1. All the tests which are tagged as “api” would get executed.
  2. Please create additional Gradle tasks per your needs

Viewing the Allure reports

From the terminal, navigate to the root folder of the project and execute the below Gradle task

./gradlew allureServe

This would open up allure report like below: