当 showAllSteps: false 时,被调用特征文件的 Gherkin 步骤未显示在黄瓜并行 运行 报告中

Gherkin steps of called feature file are not shown in cucumber parallel run report when showAllSteps: false

我们正在使用 Karate

中提供的报告详细程度选项

我有一个 MarketingPreferenceTest.feature 呼叫 BBB.feature。

特点如下:

MarketingPreferenceTest.feature

Background:
    * url Url
    * table credentials
        |Email  |Password|
        |'aaa@test.com'|'test1234'|
    * def result = karate.callSingle('classpath:resources/BBB.feature',credentials)

Scenario Outline: Get MS
    Given path 'abc'        
    When method GET
    Then status 200

BBB.feature:

Background:
        * configure retry = { count: 5, interval: 1000 }
        * configure headers = { 'Content-Type': 'application/json'}
        * url authenticationUrl

    Scenario: Login
        Given path 'login'
        And request { email: '#(Email)' , password: '#(Password)' }
        And retry until responseStatus == 200 && response.loginResponse.loggedIn == true
        When method post

我的 karate.config 有

karate.configure('report', { showLog: true, showAllSteps: false } );

当我 运行 并行测试时,我想在 BBB.feature 的黄瓜报告中看到所有打印的 Given-When-Then。我如何实现它?

黄瓜报告如下所示,其中没有来自 BBB.feature 的步骤定义:

预期结果:希望看到我的报告中 BBB.feature 的步骤在下方的矩形框内标出

只需使涉及 callSingle 的步骤使用 Gherkin 关键字:

When def result = karate.callSingle('classpath:resources/BBB.feature',credentials)