CodeIgniter Forums
PHPUnit or CI Unit test classes ? (and continuous integration) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: PHPUnit or CI Unit test classes ? (and continuous integration) (/showthread.php?tid=1655)



PHPUnit or CI Unit test classes ? (and continuous integration) - ComputingFroggy - 03-30-2015

Hi,

I want to write unit testing for my CodeIgniter project ... in order to eventually be able to perform Cotinuous Integration.

What's the usual decision: to use PHPUnit or to use CI unit test classes ?

As for continuous integration: any advices ? Jenkins or something else ?


Thanks in advance for your advices,
[email protected]


RE: PHPUnit or CI Unit test classes ? (and continuous integration) - kilishan - 03-30-2015

Out of those two options - go with PHPUnit. It's pretty much the standard out there and has many more features than CI Unit test classes.

Alternatively, I've become a pretty big fan of Codeception personally. It's built on top of PHPUnit but offers a lot more. Though it can be tricky to get working correctly with Travis.

Also - Jenkins is the standard if you're going to host your own Continuous Integration server. Can't fail there.


RE: PHPUnit or CI Unit test classes ? (and continuous integration) - kenjis - 08-23-2015

If you go with PHPUnit and use CI 3.0, I recommend to try ci-phpunit-test: http://kenjis.github.io/ci-phpunit-test/
It is very easy to install and easy to write tests.