【问题标题】:Allure @Step does not appear in the allure report (Selenide TestNG Gradle Allure)Allure @Step 没有出现在诱惑报告中(Selenide TestNG Gradle Allure)
【发布时间】:2019-06-04 15:06:59
【问题描述】:

帮助解决以下问题: 通过命令 ./gradlew luma_magento_ui 测试运行:test 报告生成成功,但是测试用例中没有出现Step。

   @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'
    }


}

项目 - https://github.com/dissid/luma_magento

【问题讨论】:

    标签: java gradle testng allure selenide


    【解决方案1】:

    我做了一个类似的例子,它工作正常,报告中包含了步骤。请看代码:

    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");
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-17
      • 2022-01-23
      • 1970-01-01
      相关资源
      最近更新 更多