-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Hi again. May I ask if there is a reason why all steps are listed as plain list in test results?
I tried the following:
public final class CucumberTest: XCTestCase {
override public class var defaultTestSuite: XCTestSuite {
....
// Instead of this:
// allGeneratedTests.forEach { suite.addTest($0) }
// Call this:
generateAlltests(suite)
return suite
}
static func generateAlltests(_ rootSuite: XCTestSuite) {
for feature in Cucumber.shared.features.taggedElements(with: Cucumber.shared.environment, askImplementor: false) {
let className = feature.title.toClassString() + readFeatureScenarioDelimiter()
for scenario in feature.scenarios.taggedElements(with: Cucumber.shared.environment, askImplementor: true) {
let childSuite = XCTestSuite(name: scenario.title.toClassString())
var tests = [XCTestCase]()
createTestCaseFor(className: className, scenario: scenario, tests: &tests)
tests.forEach{ childSuite.addTest($0) }
rootSuite.addTest(childSuite)
}
}
}
And my test reports become much nicer, see screenshot.
Does it make sense to continue to improve in this direction?
Metadata
Metadata
Assignees
Labels
No labels
