Unit Testing 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: Unit Testing and Continuous Integration (/showthread.php?tid=65765) |
Unit Testing and Continuous Integration - ComputingFroggy - 07-21-2016 Hi, I want to add Unit testing to my CI projects. I have seen there is ci-phpunit-test from kenjis. It seems nice however I came across TOAST and I quite like the 5 criteria that led to its creation:
I am not sure that ci-phpunit-test matches number 4. What are your thoughts about Unit Testing ? What tools do you use ? Going forward I want to perform continuous integration: any experiences on that ? I am thinking of using Jenkins. Cheers, L. RE: Unit Testing and Continuous Integration - mwhitney - 07-22-2016 I'm probably a little biased on this, having worked on CodeIgniter Testing Guide with Kenji. I think the whole premise of #4 is problematic, because you shouldn't be running tests in your production environment (except perhaps before it goes live), and it usually isn't difficult to have access to the CLI at least in your development environment. Anyway, while I haven't attempted it, it should be possible to implement a browser interface to run tests through PHPUnit/ci-phpunit-test installed. RE: Unit Testing and Continuous Integration - kenjis - 07-23-2016 Hi, If you really value #1, ci-phpunit-test does not fit you. Because ci-phpunit-test includes thrid-party libraries, now it has 294 php files in the Zip archive. And more, you need to install PHPUnit. About #4, you can run ci-phpunit-test/phpunit via your browser if you use VisualPHPUnit. |