Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Have a shared beforeEach/afterEach running tests with "shardTestFiles:true" #2016

@joaomqcunha

Description

@joaomqcunha

If we want a shared beforeEach function to run on all test specs of our test suite, we just need to create a file with a beforeEach function and make it execute at the beginning of the suite and "voilá".. we now have a shared beforeEach function. (This is also valid for afterEach function)

But... When we start running our tests with shardTestFiles:true this doesn't work, because each instance runs specific test-specs and we cannot guarantee that the file with the beforeEach function will run before each test-spec. Anyone knows a way to make it work?

A good way to make it work is having two more configurations on the "protractor.conf.js" file named: afterEach and beforeEach. Similar to what we have now for onPrepare. What do you guys think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions