Skip to content

Add beforeAll and afterAll scripts to Collection runs to help with Setup and Teardown #6423

Open
@akrueger

Description

Is your feature request related to a problem? Please describe.
I cannot easily handle setup and teardown tasks for my API testing without polluting my API documentation (see alternatives considered below).

Describe the solution you'd like
A beforeAll and afterAll script for Collections. The beforeAll script runs once immediately before the entire collection and the afterAll script runs once at the very end of the Collection.

Describe alternatives you've considered
Adding extra folders at the beginning and end of my API collection. The downside is that these folders are then published and look like they are part of the API--they are not, they are just used for setup and teardown of tests.

Additional context
The documentation for Jest explains the idea:

https://jestjs.io/docs/en/setup-teardown

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions