Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test object doesn't contains failed steps, if more scenarios are in one feature file #3219

Closed as not planned
Labels
@SroubekH

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /