Multiple tests of script table

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple tests of script table

FitNesse mailing list
Hello.
 

 I wrote fitnesse fixture as a script table to test connection to pinpad device. I want to run this test multiple times within a loop or somthing. Morover i would like to see result of each test after is finished. I read about decorator but it doesn't support slim mode. Is there any way to run script table test multiple times without copying tables?
 

 Regards
 M. Adamek
Reply | Threaded
Open this post in threaded view
|

Re: Multiple tests of script table

FitNesse mailing list
Hi M. Adamek,

This should be possible with a workaround in the following way: you can call scripts/scenarios from other scripts/scenarios.

Assume to test your device once you have the scenario: testscript

Now create a second scenario which calls testscript ten times

Scenario:test10
testscript
testscript
testscript
testscript
testscript
testscript
testscript
testscript
testscript
testscript

Add a third scenario which calls test10 ten times
Scenario:test100
test10
test10
test10
test10
test10
test10
test10
test10
test10
test10

With a fourth scenario you get 1000 execution
And so on ...

An alternative approach: use the !include statement to include a page 10 times into another page and repeat this as above.
 
Reply | Threaded
Open this post in threaded view
|

Re: Multiple tests of script table

FitNesse mailing list
Thanks for your answer. It looks what I'm looking for, but I have one more quastion. Where can I define the name of my script.
 Let's say my test looks like this:
 

 | scenario | com.example.DeviceFixture |      <param>     |
 | show      |            <method>                  |       <param>    |
 

 How can I call this scenario?
 

Reply | Threaded
Open this post in threaded view
|

Re: Multiple tests of script table

FitNesse mailing list
Did you had a look at
http://fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SliM.ScenarioTable ?

This should answer your question.
Reply | Threaded
Open this post in threaded view
|

Re: Multiple tests of script table

FitNesse mailing list
Done. Works excellent. Thanks a lot.