Poll: Do you write test code for your CodeIgniter application?
You do not have permission to vote in this poll.
Yes
52.17%
12 52.17%
No
47.83%
11 47.83%
Total 23 vote(s) 100%
* You voted for this item. [Show Results]

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter Testing Guide - A New Book for Automated Testing

#51
Thank you for reading our book!

What is "ci_instance"?

As far as I know, there is no CodeIgniter module for Codeception functional tests.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#52
(05-09-2016, 07:50 PM)kenjis Wrote: Thank you for reading our book!

What is "ci_instance"?

As far as I know, there is no CodeIgniter module for Codeception functional tests.

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:

[Image: codeception-mmvc-test.png?dl=1]

And Luka gave us the functional tests:

https://github.com/luka-zitnik/CodeIgniterModule
Reply

#53
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!
Reply

#54
> 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.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#55
Thanks Kenjis, I'll purchase a copy
Reply

#56
(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) ?

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.

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 Smile
Reply

#57
(05-09-2016, 09:06 PM)albertleao Wrote: Well done Kenjis. I'll purchase a copy simply out of respect for you hard work.

Thank you!
And I believe the book is useful for you.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#58
(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
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply

#59
(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  Smile

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.
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.