Gianluca Ghettini
Gianluca Ghettini

Reputation: 11628

Protractor is running all the before() when running one single e2e test

I have a bunch of e2e Protractor tests (each one with its own before(), after(), Given(), When() and Then().

I've seen that before each single e2e test is executed, Protrator runs every Before() it sees, even the ones that doesn't belong to the test. Is that an expected behavior of Protractor?

It is caused by some naming clash in the Scenario strings?

Upvotes: 2

Views: 245

Answers (1)

cvakiitho
cvakiitho

Reputation: 1396

This is not on Protractor, as it is on Cucumber.

And yes:

Before hooks will be run before the first step of each scenario. https://github.com/cucumber/cucumber/wiki/Hooks

Upvotes: 2

Related Questions