I'm creating some integration tests to check integration between my database and application.
In my test suite, I've got an initial test which creates and tests a connection to my database, and then a test that pings my database. I then have various other queries to my db.
I want this test suite to exit if one of the first two tests fails. This is to avoid wasting time and adding logs to my test setup (since all the queries will fail if theres no working connection).
However, I would like all other tests to run, IF the other tests that fail are not of the first two (so general queries are allowed to fail and other tests will run, connection setup should fail fast).
There's a --fail-fast flag that is close to what I want, but this exits if ANY test fails. I want my other test suites to still run even if this database integration test suite fails (on connection, or by query).
I think the only way to do it would be to annotate the connection or ping test cases in some way, but I can't find out how.
Aucun commentaire:
Enregistrer un commentaire