[Koha-bugs] [Bug 15323] ./t/Prices.t fails without a valid database

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 30 15:56:29 CEST 2016


--- Comment #14 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Tomás Cohen Arazi from comment #13)
> We should really have mocked unit tests for everything. Most of the problems
> we have with (db_dependent) tests are side-effects from previous tests. So,
> everything is much more complicated to debug than it should.

Side-effects from previous tests: might depend on how you arrange your tests.
You could just have the same effects when using SQLite inmemory. Some large
tests may need more than one rollback.

I am not saying that we should not try to make a test db independent. But imo
we need to balance the work of doing so (mocking all Context stuff etc.,
running Test::DBIx etc.) against the advantages we hope to achieve. And
although mocking may help focus on the specific test goal, not mocking might
help revealing other issues..

You are receiving this mail because:
You are watching all bug changes.

More information about the Koha-bugs mailing list