Skip to content

How to setup a feature with multiple scenarios? #67

Description

@vuhi

Hello team, I am new to e2e. I have a feature file with multiple scenarios like this:

**Feature**: I would like to login

**Scenario**: Success Login (no active session)
Given ... scenario 1
Then ... scenario 1
When ... scenario 1
  
**Scenario**: Success Login (active session)
Given ... scenario 2
Then ... scenario 2
When ... scenario 2

**Scenario**: Failed Login
Given ... scenario 3
Then ... scenario 3
When ... scenario 3

I have a step file like this:

Given('... scenario 1, () => { });
Then ('... scenario 1, () => { });
When ('... scenario 1, () => { });

Given('... scenario 2, () => { });
Then ('... scenario 2, () => { });
When ('... scenario 2, () => { });

Given('... scenario 3, () => { });
Then ('... scenario 3, () => { });
When ('... scenario 3, () => { });

My questions are:

  • Will the step file run each scenario independently?
  • Is it possible to run each scenario independently in just one step file?
  • If not, how can I run each scenario independently (setup config, file)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions