2012-08-27 85 views
0

我正在使用C#和Slim进行Fitnesse测试项目。 我想将Url地址作为参数传递给ColumnFixture。 所有测试用例的Url地址应该是相同的,所以我决定使用!define关键字来定义我的url。在FitNesse的测试,我有:将URL传递给ColumnFixture

!define webServiceUrl {http://mytestserver.address.svc} 

|!-MyNamespace.SearchClientFixture-!      | 
|webServiceUrl |contactPhoneNumber|contactId?|identificationResult?| 
|${webServiceUrl}|922222222   |0   |notfound    | 
|${webServiceUrl}|     |0   |notfound    | 

$ {webServiceUrl}呈现为HTML锚标记,并传递给我的ColumnFixture类值也HTML锚标记

<a href="http://mytestserver.address.svc">http://mytestserver.address.svc</a>

我试图逃跑HTML与!<text>! and !- fitnesse标签,但它不起作用。 我的问题是: 1.如何在我的情况下转义HTML? 2.如何将单个值传递给所有测试用例之间共享的ColumnFixture?是否可以向SetUp方法发送值?

回答

0

你试过了!在表格的第一行之前。这应该会关闭整个表的维基渲染。

!|MyNamespace.SearchClientFixture      | 
|webServiceUrl |contactPhoneNumber|contactId?|identificationResult?| 
|${webServiceUrl}|922222222   |0   |notfound    | 
|${webServiceUrl}|     |0   |notfound    | 

这对我和我所有的项目都有效。唯一的麻烦是当你需要在表中实际的wiki标记(比如!today)。