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

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.

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>

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.

Related

Is there a method to display dynamic information to the user BEFORE a build?

Within the Jenkins UI, on the project page, you can use the Description Setter plugin to set a description AFTER a build. Is there any way to dynamically set this before a build? I would want to pull information from a file in the workspace that shows information about files that will be changed when the user builds the project.
Edit: While I haven't found a way to dynamically set the project description, I did find that I can create an Active Choices Reactive Reference Parameter, give it a descriptive name that serves as a title, and then read the contents of a file containing HTML with a Groovy script like so..
// The contents of the file should be HTML
String contents = new File('/tmp/some_file.html').text
return contents
So I made this my last parameter, and it shows the information that I need to show, before the end user clicks the build button. Solves my problem.
I'm going to leave this question open though, in case someone has a better idea.
While I haven't found a way to dynamically set the project description, I did find that I can create an Active Choices Reactive Reference Parameter (this requires the Active Choices plugin),
Give it a descriptive name that serves as a title, and then read the contents of a file containing HTML with a Groovy script like so..
// The contents of the file should be HTML
String contents = new File('/tmp/some_file.html').text
return contents
You will need to select a Choice Type of: Formatted HTML.
So I made this my last parameter, and it shows the information that I need to show, before the end user clicks the build button. Solves my problem.

RubyMine: Duplicity lines on steps.rb files

I have two files .feature and both are about diferent feature on my system.
Feature A is about Login and Feature B is about Register.
However in both files contains:
And(/^I click on button "([^"]*)"$/) do |arg|
pending
end
When I create the steps.rb one for each .feature, it is accusses duplicity, but the buttons are completely different.
Is there a way to implement two different clicks on the same file step.rb to the same line?
You can create two different scenarios and pass the button's element id inside the double quotes?
I click on button "Login"
I click on button "Login1"
You can have one step definitions and invoke multiple gherkin steps with this way
Creating two step definitions steps for each scenario will lead to duplication when the rubymine tries to auto populate the gherkin steps used.

VFP font size in command window

In the VFP development environment both the command window and any code windows which are open display characters in Courier font, possible 10 pt. I would like to reduce the size of these characters, to see more lines on the screen.
Have tried going into Tools | Options | IDE and have changed several font specifications (for Desktop, Program files, Code Windows, Procedures), clicked on 'Apply' in an attempt to reduce the size of these character on the screen. This has not been successful.
How can I reduce the font size used for code when I am editing it, please?
Check the Override individual settings checkbox on the Options | IDE tab. Otherwise, if you've previously edited a particular PRG, you'll see the font you used then.
For the Command Window, right-click, Properties to set the font.
Most of the time, I use the default, but occasionally I change it by right-clicking within the MODIFY COMMAND window I'm working in, going into "Properties...", and changing the font size. It only applies when editing that filename, though. Many years ago I think I tried changing it globally, as you seem to have, and remember it not 'sticking', so henceforth I always changed it on a file-by-file basis when I needed to.
I think what you are looking for is under Tools / Options / EDITOR tab, and save whatever defaults you want and set as Default.
Additionally, another thing I have done this in the past and created my own master settings resource file. By default when you start VFP, a "resource" file is set to ex: C:\Program Files\VFP\blah\FoxUser.dbf (and the corresponding .fpt file)
What I would do is this. Use the resource file and make an EMPTY copy of it to a new location, such as the working folder of your project.
use ( sys(2005)) again alias tmpResource
copy structure to MyVFPResource
set resource to MyVFPResource
close tables all
The resource file keeps track of almost every thing you open / work with and retains settings such as window area, position, etc. Some things I like to have as a "default", such as when editing snippet methods in screen or class designer. Such as to always have the row/column of a file displayed, have other settings.
An example of common .prg files. Do a simple MODI COMM MyTest.prg. Then once a simple .prg file is open, go to Edit, then Properties. Click on all the settings you want (including font size, line/column, syntax coloring, tabs vs space preferences, etc. Click the checkbox for "Apply to .PRG files". and click ok.
Now, open your resource file AGAIN so you can see what is stored.
use ( sys(2005)) again alias tmpResource
BROWSE
You will see many rows, but at the bottom will be the most recent entries. You should see 3 records listed as "WINDMODIFY" which represents the "MODIFY COMMAND" of whatever prg file. Now, open the "Name" memo field. One will be listed as .prg, another will be "DEFAULT", and the last will be the actual "mytest.prg" you started with. Get on the "DEFAULT" version record. Now you can change the "READONLY" column from FALSE to TRUE (F/T) and it will lock these settings for ALL .prg files. You can then delete the other rows.
You can apply these same principles to modifying form code snippets. Open a form, double-click on any method, then EDIT / Properties, do the same, but checkbox for "Apply to method code".
Browse the resource file and look at the "WINDSNIP" rows. Again, look for "DEFAULT" and mark that readonly as .T. and you can delete the other. The resource file will literally save every snippet window specific to the form, object, method, etc.
Do the same for visual class file editing too.
Similarly can be done for toolbars and more as you browse and see. When you are done making all the changes you want, purge out all the other fluff, close the resource file and set it to read-only so no additional garbage gets pulled into it.
If you need to change in the future, make the table editable again, make changes, then readonly the table again.
Then, all you have to do is at VFP start, do
set resource to MyVFPResource

Fitnesse Scenario library local to Suite level not oncluded

I have my test cases in Fitnesse suite. I have created a Scenario Library local to the suite. But inside the test page its not getting loaded.
here is my Structure
My Tests
Contents
Test1
Test2
Suite1
ScenarioLibrary
Test1
So under Test1, I cannot see the contents of the Scenario Library. here is the screen shot of what I see,
As you can see, its picking up my library name but its just displayed as plain text not with and Include Page and expand option.
Whats going wrong here?
I had a similar problem, and in that case one of my parent page names was not a valid 'wiki word'. When I renamed that page all went well.
Any chance Step02IPhoneSuite causes a similar problem? I don't recall the definition of wiki word of the top of my head, but I notice 2 capitals next to each other in that name. If you rename that page to Step02iPhone, does that help?

Newly created build process parameters not showing up

When I add a new parameter in the Process Parameter Metadata Editor, checkin my changes, and go back to edit the definition or queue a build from it, the parameter is not showing. Here is the parameter in the editor:
Other custom parameters I added in the past show up fine. For example, this one shows up fine:
So..I would expect my new parameter to show up the same way this one works.
I tried closing and re-opening VS2013 (I have update 4) and changing to another build controller, but get same behavior. How do I fix this?
A parameter must be defined at the Build Arguments level (the place you found the Build Parameters Metadata).
Afterwards, the Metadata defines how it shows up, which editors it uses, and what description should be shown on it.
That's about the metadata, but you need to add your parameter in the Arguments tab.
You will find it in the XAML Workflow editor at the bottom three buttons/tabs: Variables, Arguments and Imports.

Resources