Konstantin Vlasenko

My name is Konstantin Vlasenko. I live and work in Saint-Petersburg (Russia).

Archive for the ‘Fitnesse’ Category

#Fitnesse;#PowerSlim;Test-Path

without comments

Good news:) With Fitnesse + PowerSlim the problem described here can be solved gracefully. You can use Test-Path PowerShell CMDlet:

!|script|PowerShell|
|check|eval|Test-Path "C:\ExportEmpty\*"|False|
|check|eval|Test-Path "c:\ExportNotEmpty\*"|True|

Written by Konstantin Vlasenko

March 4, 2010 at 11:48

Posted in Fitnesse, PowerSlim

Tagged with ,

Query File lines

without comments

With powerslim you can Query a file.

!|script|PowerShell|
|eval |!-function get_lines($file){Get-Content $file | % {New-Object PSObject -Property @{Line=$_}}}-!|

!|Query:PowerShell|get_lines c:\myfile.txt|
|Line|
|text at first line|
|text at second line|

Written by Konstantin Vlasenko

March 3, 2010 at 20:49

Posted in Fitnesse, PowerSlim

Tagged with

Hidden table heads feature is the Fitnesse Visual Polymorphism

without comments

What you can see in the Fitnesse User Guide

You can hide the first row of a table. This allows you to write comment tables that just look like ordinary HTML tables.
The complete table still gets executed, the first row is just hidden by a CSS rule.
Precede the first row with a ‘#’.  (KV comment: will be changed to – instead of # in the upcomming Fitnesse releases)

But I want to expand this definition.
You can use Hidden table heads feature to conceal the needless things in your acceptance test script!

Fitnesse Visual Polymorphism

Imagine that you have two scenarios
------------ScenarioLibrary page------------
|scenario|execute and check|command|
|check|cmd|@command|0|
|scenario|execute|command|
|cmd|@command|
------------ScenarioLibrary page------------

You can use them in your test
------------SetUp page------------
-!|execute|
|command|
|cmd /c rd /S /Q "C:\AnyDirectory"|

-!|execute and check|
|command|
|WMIC product where name='My Product'" call Uninstall|
------------test page------------

The first one tries to delet the directory. cmd will return 0 if success and 2 if directory doesn’t exists. So I am not care about the result. Using the execute scenario.
The second performs the product uninstallation. It is critical to know the result (e.g. if this SetUp page will be included into product setup testing suite). So I use the different scenario execute and check in that case.
But all this things (check or not to check) are just the noise in that case. So I am hidding them into scenario and making the Tables Heads hidden.
The final SetUp page will not have any noise.  Just facts:)

command
cmd /c rd /S /Q “C:\AnyDirectory”
command
WMIC product where name=’My Product’” call Uninstall

Written by Konstantin Vlasenko

February 9, 2010 at 14:34

Posted in Fitnesse

Tagged with ,

Fitnesse: the results for |check not| for BLANK is confusing me

with one comment

It is too confusing that the Fitnesse highlight expected [BLANK] in second case.

The right exporting folder

check execute cmd /c dir /B “C:\ExportEmpty” BLANK
check not execute cmd /c dir /B “c:\ExportNotEmpty” [2d1313b9-cfb8-4405-8e5f-91f34b5a1e08 ]

expected [BLANK]

The best way is to say NOT EXPECTED [BLANK]

the script for the page:

|check|execute|cmd /c dir /B “C:\ExportEmpty”|BLANK|
|check not|execute|cmd /c dir /B “c:\ExportNotEmpty”|BLANK|

BTW: Why should I type BLANK for the second scenario? I’ll get the IGNORE result if I left them empty


Written by Konstantin Vlasenko

January 29, 2010 at 12:00

Posted in Fitnesse

Tagged with , ,

Release notes should be tested as well

without comments

It is good to have green suite of acceptance tests
If something wrong we should get the red test/tests
We do not have to get used to the red tests
Interesting case have got today. We had started using Fitnesse for acceptance testing 3 years ago.
Now we have big test suite (~ 1000 tests) on Fitnesse. There are useful feature in it – Symbolic Links.
When you can just make a new test with small changes in the defines.
Have done this to test my product against new environment.
And found that my product doesn’t support some things. Several tests are red.
Stay these tests as red in my regression suite is not a good idea.
Remove these symbolic links (kill these tests) for the new environment also is not a good idea.
So I need to add the records to the Release Notes and have the 3rd color for such tests.
So Release notes should be tested as well as the production feature.
But these tests should not be green or red.
BTW: you’ll get the signe if you fix something from RN accidentally:)

Written by Konstantin Vlasenko

January 23, 2010 at 04:01

Posted in Fitnesse

Tagged with