[Koha-bugs] [Bug 19821] Run tests on a separate database

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 15 11:16:10 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19821

--- Comment #40 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Hi Marcel,

Thanks for your interest :)

(In reply to Marcel de Rooy from comment #38)
> I am not sure if we should have coupled the option of a test database and
> the selenium test environment on this report.

I am not sure I understand your concern, one this report we are not talking
about selenium tests. On bug 19185 we are going to use this enhancement to test
the onboarding and installation process.

> The two config options database and database_test do not seem a good idea to
> me, intuitively. It looks more like a hack? (Also taken in consideration
> that git grep shows me that the database config variable is used in more
> places.)

It does not sound bad for me. We specify in our config the name of the DB for
tests. We could have hardcoded here in the code, but seemed better to make it
configurable.
What did you git grep exactly? To get the dbh you must call C4::Context->dbh,
nothing else.

> On another report we already had a discussion about the rollback of changes
> for selenium tests. I think we'd better separate the test suite from the
> selenium tests. And actually, we have already the tools to create separate
> instances for selenium and testing. With a separate KOHA_CONF in the
> webserver configuration selenium can be run on its own. Same for
> t/db_dependent. Only thing is that we want to do it faster. But does that
> justify a bunch of code changes that might jeopardize code quality?

We could improve it later. So far it the safest and easiest way to test the
onboarding and installation process. It seems a fundamental to back the RM
before they roll a new release. Keep in mind that the original idea is to make
the onboarding and installation process run for all languages.

> This needs (imo) more serious thought and a broader discussion.

IIRC the discussion has been launched on koha-devel about 2 years ago ;)

(In reply to Marcel de Rooy from comment #39)
> And for less changes what about mocking C4::Context->config for the database
> entry?

That was the original idea, see "Bug 19821: Do not modify KOHA_CONF, use new
database_test entry instead".

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


More information about the Koha-bugs mailing list