[OJS] Running tests

Hi all,

i use ojs 3.1 and I try to run lib/pkp/tools/runAllTests.sh
What is the prerequisite for running this tests ?
they seem written for php 5.6 and selenium < 3…
With php 5.6.32 and lib/pkp/tools/runAllTests.sh -cC, all tests pass but there is 17 skipped tests : is it ok ?
I want to try all tests with selenium but what is the configuration needed ?
Do i need a working installation of OJS ?
are the tests destructive for the database ?
can you give a default config.inc.php for testing ?
is it possible to test with sqlite ? I prefer sometime use this DB for testing purpose

thank you in advance

ok sorry
I didn’t read informations in lib/pkp/tests/travis

Hi @kara28,

I would also suggest working with Travis, which is already configured (using .travis.yml) to run the tests. The test setup is complex so you may have trouble with dependencies on your local machine, but the Travis descriptor might be useful to provide a working example.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear all,

friday I tried to set up a local travis instance. I’ve never actually worked with Travis and I’m not very keen on learning how to use Travis. Especially when starting on a new plugin I think it would be great to have a local test environment so you can develop test driven from the start.

I tried several things to set it up with and without Docker (after we had a small workshop on Docker at the developer meet-up in Germany). But I didn’t come to a point where I could actually run the tests.

Has somebody of you a local testing environment and has hints (or a guide) how to set up such environment? Perhaps it would be possible to have a Docker container to easily setup a testing environment (inside a VM), especially for new developers.

Best regards
Markus

Hi @MarHerUMR,

There’s some documentation in the wiki – not sure if you’ve seen it yet: https://pkp.sfu.ca/wiki/index.php?title=Unit_Tests

Regards,
Alec Smecher
Public Knowledge Project Team

Side note: current document URL for tests is as follows: