I have three feature files - preTest.feature,postTest.feature and tests.fetaure. I'm doing callonce for preTest.feature and configured afterFeature for postTest.feature in tests.feature. These two called feature files are getting executed fine but in report detailed steps aren't coming of both preTest.feature and postTest.feature files. Steps are coming only of tests.feature. How to show all steps even called feature files in Karate report?
preTest.feature
Feature: Pre test suite test cases
Background:
* print 'setup tasks'
Scenario:
Given url URL
When method 'GET'
Then status == 200
Scenario:
Given url URL
When method 'GET'
Then status == 200
postTest.feature
Feature: Post test suite test cases
Background:
* print 'clean up tasks'
Scenario:
Given url URL
When method 'GET'
Then status == 200
Scenario:
Given url URL
When method 'GET'
Then status == 200
tests.feature
Feature: Test suite test cases
Background:
* print 'all test cases'
* def dataReturnedFromPreSetupTests = callonce read('classpath:preTest.feature')
* configure afterFeature = function(){ karate.call('classpath:postTest.feature', preSetupData); }
Scenario:
Given url URL
When method 'GET'
Then status == 200
Scenario:
Given url URL
When method 'GET'
Then status == 200
I tried putting Gerkin keyword too for called feature files but it dint work for me. For example added below line in tests.feature -
When def dataReturnedFromPreSetupTests = callonce read('classpath:preTest.feature')