|
|
|
|
|
by avensec
103 days ago
|
|
The pattern can work, but the domain matters, the test type matters (unit, integration, ui) and the trade-off associated matter. e.g. If I am running a long-running UI-test scenario, I absolutely don't want test-5 to walk through 80% of the UI that was already exercised in tests 1-4. I am creating test coupling, but I'm saving cost/time by doing so. But, you'll also hear why not to do this, because it creates test coupling / breaks atomic tests, which is generally seen as bad. If that is a local integration test and those early steps run is millis? Then maybe we keep things uncoupled to allow the system to exercise the pathways without explicit expectations. |
|
I wouldn't have a problem with something like
The format is awful, but the idea is that most tests are of the form And, in that context, the GIVEN frequently contains noise not directly related to understanding what is being tested.I actually use the GIVEN/WHEN/THEN keywords in my tests, to make them easier to read