Poll: Do you write test code for your CodeIgniter application? You do not have permission to vote in this poll. |
|||
Yes | 12 | 52.17% | |
No | 11 | 47.83% | |
Total | 23 vote(s) | 100% |
* You voted for this item. | [Show Results] |
CodeIgniter Testing Guide - A New Book for Automated Testing |
Thank you for reading our book!
What is "ci_instance"? As far as I know, there is no CodeIgniter module for Codeception functional tests. (05-09-2016, 07:50 PM)kenjis Wrote: Thank you for reading our book! Well...i create a simple instance based on your contributions (https://github.com/davidsosavaldes/Craft...stance.php), with Codeception i can make unit and acceptance tests: And Luka gave us the functional tests: https://github.com/luka-zitnik/CodeIgniterModule
Well done Kenjis. I'll purchase a copy simply out of respect for you hard work.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
> what are the advantages of using "ci-phpunit-test" instead of "codeception" (acceptance and functional tests) with a "ci_instance" (unit tests) that loads all the components (database, session, helpers, models, etc) ?
First of all, I recommend Codeception for acceptance tests. Our book has a chapter for it. The advantages that I think: * No runkit required. * More tested by many users. * Has more hacks for improving testablities of CodeIgniter. * Functionality to inject mocks into controllers (functional tests). * Has documentation (and this Book). I'm not sure your approach has test isolation. I mean one test does not affect another test. But if you use runkit, you can probably do whatever.
(05-09-2016, 09:30 PM)kenjis Wrote: > what are the advantages of using "ci-phpunit-test" instead of "codeception" (acceptance and functional tests) with a "ci_instance" (unit tests) that loads all the components (database, session, helpers, models, etc) ? I think you have a point, thanks for sharing your knowledge and your experience with all of us, also congratulations for finishing your book, i purchased a copy because i follow your work from some time ago, keep up the excellent work (05-09-2016, 11:01 PM)samurat2000 Wrote: Thanks Kenjis, I'll purchase a copy Thank you! To all readers, testimonials is welcome: https://github.com/kenjis/codeigniter-te...e/issues/1 (05-10-2016, 08:01 AM)dsv Wrote: I think you have a point, thanks for sharing your knowledge and your experience with all of us, also congratulations for finishing your book, i purchased a copy because i follow your work from some time ago, keep up the excellent work Thank you! If you (or someone) love Codeception, I recommend you try to integrate Codeception with ci-phpunit-test. ci-phpunit-test is a kind of extension for PHPUnit. Codeception unit testing uses PHPUnit. So it seems it is not so difficult. And unit tests are more important than functional tests. You should write more unit tests, and your controllers should not be fat. |