tags:

views:

228

answers:

2

I its default configuration fitnesse automatically adds the Test property to all pages ending in "Test".

However, in the project I'm working I have to add the Test property to all pages ending in "Tests". Unfortunately, renaming all pages so that they end in "Test" is not a option for me.

A: 

Set the pages test property in one of the following ways: 1. Visit the page, click properties, select the test checkbox.
2. Vist the page with ?properties, select the test checkbox
3. Modify the properties.xml file associated with the page to include the tag inside the block.

Method 3 would be the easiest to automate for a large number of files.
Could probably do this with a grep file utility to do a mass search and replace.
Or a script (powershell) or program to read the files and add this tag if needed.

Lee
The problem is that we have a huge amount of pages, and setting the property manually would be excessively time consuming.
Alceu Costa
Updated my answer, but why/how did you get so many pages that don't have this property set???
Lee
+1  A: 

Since the 2008xxxx versions of Fitnesse any page that starts or ends with Test is automatically set to be a test page and any page starting or ending in Suite is set to be a suite. This is done on the creation of the page and probably will not work by just renaming the page.

Note: If you have a large number of test pages to retrofit, you could use wingrep/grepwin (or some other tool that can do large scale file search and replace, I personally use grepwin) and manipulate the properties.xml by inserting

<Test>true</Test>
Jeffrey Cameron