Skip to content

SimpleTester Unit testing library

World Wide Web Server edited this page Jul 4, 2012 · 20 revisions

SimpleTester is a testing library for CodeIgniter, that wraps the Simpletest framework.

[b]Installation instructions[/b]

  1. Download SimpleTester 1.0 here: File:SimpleTester-1.0.zip

  2. Unzip file to the application folder.

  3. Download the latest SimpleTest framework [url=http://simpletest.org/en/download.html]here[/url].

  4. Gunzip that file to application/libraries (a folder called “simpletest” should be created in application/libraries)

  5. Add “simpletester” to autoloading libraries in config/autoload.php

  6. Installation complete! Run your application. A small box should appear on the top right of the page, confirming that the default tests passed.

  7. 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.

  8. Put all your test files in “application/tests”. Use the template files for a quicker start.

If you haven't heard of the SimpleTest framework before, it's well worth a look: [url=http://simpletest.org/]http://simpletest.org/[/url]

[b]Note for machines with IP != 127.0.0.1[/b]

If you develop on a machine where PHP doesn’t see the server IP as 127.0.0.1, you must change the configuration file to allow the IP your development machine has.

Clone this wiki locally