ElkArte Community

Project Support => General ElkArte discussions => Topic started by: live627 on December 04, 2016, 07:33:15 am

Title: Need documentation on running the tests
Post by: live627 on December 04, 2016, 07:33:15 am
How do I set up the environment?
Title: Re: Need documentation on running the tests
Post by: Spuds on December 04, 2016, 07:50:10 am
Are you wanting to run the phpunit tests locally?
Title: Re: Need documentation on running the tests
Post by: emanuele on December 04, 2016, 08:22:45 am
/me runs!
Title: Re: Need documentation on running the tests
Post by: live627 on December 04, 2016, 10:58:18 am
yup. i just need to know how to set the environment.
Title: Re: Need documentation on running the tests
Post by: Spuds on December 04, 2016, 01:13:23 pm
I use a vagrant box provisioned with a fresh Elkarte install (since the tests mess with the db you need a clean install).   I've provisioned it with Ubuntu so all the paths are basically the same as Travis etc.

In that vagrant box I of course have installed and run composer so all the phpunit dependencies are in place.

Then I just run phpunit from the command line from that box.

I don't test against more than one db or version of php, once I have a test running I abuse Travis for the full spectrum of test environments.