Alceu Costa
Alceu Costa

Reputation: 9899

How can I configure Fitnesse to automatically add the Test property to all pages ending in "Tests"

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.

Upvotes: 0

Views: 1088

Answers (2)

Jeffrey Cameron
Jeffrey Cameron

Reputation: 10295

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>

Upvotes: 2

Lee
Lee

Reputation: 442

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.

Upvotes: 0

Related Questions