简体   繁体   中英

Running FitNesse tests stored in variable

I'm trying to get FitNesse (slim tests running via fitSharp) to process tables stored in a variable. Both approach A & B below render the same on the page, but only approach B will run.

Approach A

!define test (
| Table:myTest | someValue |
)
${test}

Approach B

| Table:myTest | someValue |

This example is rather superficial, but in my tests I'm looking to vary some parameters and reexecute the same test (without a lot of copy and paste).

Adding additional details requested;

Approach A renders this to page when saving;

  <br><span class="meta">variable defined: test= | Table:myTest | someValue | </span> <br><br><table> <tbody><tr class="slimRowTitle"> <td>Table:myTest</td> <td>someValue</td> </tr> </tbody></table> <br> 

...but when running the test the page doesn't seem to process the table and shows just the variable definition

 <br><span class="meta">variable defined: test= | Table:myTest | someValue | </span> <br><br><br></div> 

Try creating a separate page with the test table.

In your real test page you can include this page multiple times, after assigning values to the variables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM