User Tools



adventuregenerator:test_harness

Test Harness and Development Downloads

Setting up a PHP Development Environment

To develop your own generators, set up a local PHP test server. It helps to turn on all error and warning messages. The particulars of setting up a php development environment are beyond the scope of this article, but Google can help if you're a little stuck.

Installing the Test Harness

Download the Test Harness, Example Generators, and Interfaces by clicking here.

Then, download the above archive and extract it into your public_html (or whatever it is on Windows) directory. Then you should be able to access the test harness at http://localhost/~yourUserName/TestHarness/testharness.php .

When the test harness is run, it will do some shallow tests on all installed modules (mostly to check that your classes are named correctly and implement all the abstract methods that are defined in the interfaces.

Go do all that in a new tab, and come back here and continue when you can load the test harness in your browser.

Test Harness Directory Structure

Once you get to where you can load the test harness tool in your browser, open up a terminal or file manager and familliarize yourself with the test harness directory structure and included files.

The directory structure and files are documented here: Test Harness Directory Structure

Generator Structure

Once you are comfortable with the directory structure, you might want to look at the high-level Generator Structure.

Writing your Own Generator

This is the part you've been waiting for, eh?

There are two types of generators that are documented at the moment, Dressing generators and Encounter generators.

Dressing Generators

The interfaces for dressing generators are currently in a state of flux, so we recommend against developing dressing generators at this time. ;<

Encounter Generators

adventuregenerator/test_harness.txt · Last modified: 2012/02/08 15:19 by leaf