-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SimpleTester Unit testing library
PiotrPiorecki edited this page Feb 20, 2013
·
24 revisions
Category:Library | Category:Library::Community | Category:Library::Tests
SimpleTester is a testing library for CodeIgniter, wrapping the SimpleTest framework.
- Download SimpleTester 1.1 here: File:simpletester1.1.zip
- Unzip file to the application folder.
- Download the latest SimpleTest framework here.
- Gunzip that file to application/libraries (a folder called “simpletest” should be created in application/libraries)
- Add “simpletester” to autoloading libraries in config/autoload.php
- Installation complete! Run your application. A small box should appear on the top right of the page, confirming that the default tests passed.
- Now you can check out the test file templates in application/tests, and the SimpleTester configuration file in config. Try to change a test in a template test file to see if the installation really works. By failing a test, a big red bar should appear on the top of the page.
- Put all your test files in “application/tests”. Use the template files for a quicker start.[/quote]
If you haven't heard of the SimpleTest framework before, it's well worth a look: http://simpletest.org/
If you develop on a machine where PHP doesn’t see the server IP as 127.0.0.1, the tests won't run automatically in the default configuration. You must change the configuration file to allow the IP your development machine has.