简体   繁体   中英

Allure @Step does not appear in the allure report (Selenide TestNG Gradle Allure)

Help solve the following problem: Test run through the command ./gradlew luma_magento_ui: test The report is successfully generated, but Step does not appear in the test case.

   @Step("registration user")
    public Response registerNewUser(Customer customer) {
        return setup()
                .body(customer)
                .when()
                .post("/rest/V1/customers");
    }

build.gradle

 buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "io.franzbecker:gradle-lombok:2.1"
        classpath "io.qameta.allure:allure-gradle:2.5"

    }

}

subprojects {
    apply plugin: 'java'
    apply plugin: 'io.franzbecker.gradle-lombok'
    apply plugin: 'io.qameta.allure'

    test{
        useTestNG()
    }

    allure {
        version = '2.7.0'
        configuration = 'compile'
    }
    repositories {
        jcenter()
    }
    dependencies{
        compile group: 'io.qameta.allure', name: 'allure-testng', version: '2.12.1'
        compile group: 'org.testng', name: 'testng', version: '6.14.3'
    }


}

Project - https://github.com/dissid/luma_magento

I made a similar example which is working properly and steps are included in the report. Please take a look at the code:

import static io.qameta.allure.Allure.step;

@Test
public void test1_login () throws TestException {

    step("Login to app");
    LoginPage loginPage = new LoginPage(super.driver,20);
    loginPage.login();

    step("Open main page");

    step("Logout from the app");

}

This will work with runtime dependency of aspectjweaver

Check out this demo project with Gradle + TestNG and Allure reporting:

https://github.com/unnatisolanki64/allure-testng-gradle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM