You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the test runner supports setUpAll / tearDownAll methods for test suites. The documentation for these implies that these methods are run ONCE for all tests that are executed, which isn't entirely correct. When you split your test suite up into separate test modules / files, each one has its own independent setUpAll / tearDownAll methods. This makes it impossible to run bootstrapping code once, and only once, for all tests that are executed by the test suite regardless of where they are defined. This would be a helpful feature to have.
Example use cases:
Suppose you have an entire suite of tests for a project, spread across multiple files / modules and they all make use of a Dockerized test environment. It stands to reason that you'd want to launch the Docker environment once at the start of the test suite, then run all tests against it, and then shut down the container once after all tests have been completed
Suppose you have a project which needs to interact with a remote API. It stands to reason that one might want to create a single HTTP session (ie: authenticated) to that service and then share the session across all tests in the suite. It would be helpful to construct and initialize this session once before any test in the suite begins, regardless of which file/module it is defined in, and then have that session shared across all tests, and then have the session closed once all tests are completed.
The text was updated successfully, but these errors were encountered:
Right now the test runner supports
setUpAll
/tearDownAll
methods for test suites. The documentation for these implies that these methods are run ONCE for all tests that are executed, which isn't entirely correct. When you split your test suite up into separate test modules / files, each one has its own independentsetUpAll
/tearDownAll
methods. This makes it impossible to run bootstrapping code once, and only once, for all tests that are executed by the test suite regardless of where they are defined. This would be a helpful feature to have.Example use cases:
The text was updated successfully, but these errors were encountered: