Skip to content

Fail tests if runtime exceptions are thrown in BBC #1314

@yuri-sergiichuk

Description

@yuri-sergiichuk

Currently, it's possible to receive a false-positive test when one uses BBC tests and verifies the expected state of an entity with a sequence of events that first do a change and then undo the change if runtime exceptions are thrown in the middle of the events processing.

Such runtime exceptions are always wrapped into HandlerFailedUnexpectedly event and one may subscribe to it which is fine when we're running in Production. But while testing the app, in most cases we do want to fail a test case if smth went wrong.

The proposed solution is to allow configuring the BBC behavior with "strict" and "lenient" modes. By default, the BBC should be instantiated in "strict" mode when any runtime issue fails the test case. One should be able to switch to the "lenient" mode, e.g. if she wants to test that a particular HandlerFailedUnexpectedly event is thrown. In the "lenient" mode we only log runtime exceptions but do not fail the test cases automatically (the current behavior of the BBC).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions