CodeceptJS
CodeceptJS copied to clipboard
Test object doesn't contains failed steps, if more scenarios are in one feature file
Hey, we are using gherkin for our scenarios, and in the after step, we send test results to our slack. Well, we noticed that if we use Scenario Outline, or we have more than one Scenario in the feature film, the test object doesn't have failed step in it anymore. Is there a way how to access it?
our after step:
After(async function (test) {
await sendReport(test.parent.feature.children[0].steps)
})
if there is only one test, the array contains objects like this;
{
"type": "Step",
"location": {
"line": 15,
"column": 5
},
"keyword": "Then ",
"text": "I verify that 'fail' cstep is reported",
"startTime": 1643285655688,
"match": "(./step_definitions/backend_steps/builders.steps.js:4:1)",
"status": "failed",
"err": {
"name": "AssertionError",
"message": "expected 'Achieved maximum number of attempts' to equal undefined",
"showDiff": true,
"actual": "Achieved maximum number of attempts",
"operator": "strictEqual",
"stack": "AssertionError: expected 'Achieved maximum number of attempts' to equal undefined\n at /mnt/c/code/test-automation-framework/step_definitions/backend_steps/builders.steps.js:6:19\n at processTicksAndRejections (internal/process/task_queues.js:93:5)\n at async runSteps (/mnt/c/code/test-automation-framework/node_modules/codeceptjs/lib/interfaces/gherkin.js:62:9)"
},
"endTime": 1643285671918
}
Details: nodeJs version: v14.15.0 CodeceptJs version: 3.2.3
This issue is stale because it has been open for 90 days with no activity.