Before & After steps for tests
We plan to add an option to perform some actions before test execution and (always) after test execution.
This could be treated in a similar way to the setUp and tearDown functions in unit tests.
We plan to add an option to perform some actions before test execution and (always) after test execution.
This could be treated in a similar way to the setUp and tearDown functions in unit tests.
Log in to comment and vote
Comments3
Aug 21
PinnedShipped!
https://docs.bugbug.io/organizing-tests/suites#before-all-after-all-tests
David Rothman
May 22, 2025
I would use this to start a simulation for our hardware device monitoring feature that pull data from a Kinesis stream and pipes it to a websocket. The tests cannot run successfully without the test data being put into the kinesis stream. After the test I would use it to end the simulation and delete the data from the database that was generated from the simulation
Paweł Bylina
May 22, 2025
Thanks for the details!