Skip to content

Configuration

gavinbunney edited this page Feb 15, 2011 · 16 revisions

Configuration

Once Madcow is setup and running correctly, the configuration files within the conf directory will need to be changed for the particular site that you are working on.

URL Configuration

To assist in managing multiple target environments, Madcow supports single or multiple URL property files. These property files are used to substitute the URL being invoked by the invokeUrl command.

Single URL Property File

For instance, having a hard-coded URL for a Create Address page, invokeUrl = http://test-site/address/create can be expressed as invokeUrl = TEST_SITE/address/create where the TEST_SITE key is defined in the URL mappings file TEST_SITE=http://test-site

For this example, when Madcow is executing the invokeUrl command, it will substitute TEST_SITE with http://test-site

Filename format

For a single URL property file, it must be named madcow.url.properties. There is no restriction on the number of key/value pairs in the property file.

Multiple URL Property Files

As Madcow supports multiple URL properties files, you can therefor have a collection of url files, each with a unique URL, using the same identification key to allow quick switching between target environments, without any need to change individual invokeUrl commands.

Each URL property file must be suffixed with .madcow.url.properties, however, when specifying which to use, it is only the name in front of the .madcow.url.properties postfix that is used.

So if we had two URL property files, one named development.madcow.url.properties and the other integrated.madcow.url.properties, they are referred to by development and integrated respectively.

In order to specify which URL property file to use, set the URL filename on the command line / set the relevant ant property.

Using the shell script:

./runMadcow.sh -u development
./runMadcow.sh -u integrated

Or as an ant property:

ant run-all-tests -Dmadcow.url.properties.file="development"
ant run-all-tests -Dmadcow.url.properties.file="integrated"

Filename format

For multiple URL property files, each must be suffixed with .madcow.url.properties. There is no restriction on the number of key/value pairs in the property file.

Database Configuration

TODO - madcow.database.properties

Clone this wiki locally