Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
785 views
in Technique[技术] by (71.8m points)

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

We are using the report verbosity option available in Karate

I have a MarketingPreferenceTest.feature calling BBB.feature.

The features are as below:

MarketingPreferenceTest.feature

Background:
    * url Url
    * table credentials
        |Email  |Password|
        |'[email protected]'|'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

My karate.config has

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

When i run the tests in parallel, i want to see all the Given-When-Then's printed in my cucumber report from BBB.feature. How do i achieve it ?

The cucumber report is shown below which doesn't have step definitions from BBB.feature :

Expected Result: Would like to see the Steps of BBB.feature in my report marked in a rectangle box below

Cucmber Report

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Just make the step involving a callSingle use a Gherkin keyword:

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...