简体   繁体   English

Fitnesse SLIM查询表-阻止空单元格失败吗?

[英]Fitnesse SLIM Query Table - Stopping empty cells from failing?

I've got a large set of Fitnesse (For Java - v20090513) tests which are executed against a SLIM Query table. 我有很多针对SLIM查询表执行的Fitnesse(对于Java-v20090513)测试。

To help with the testing (explain why we're getting certain results) I've added a new column to the end of the table. 为了帮助进行测试(解释为什么我们得到某些结果),我在表的末尾添加了新列。 The idea is that the cells for that column would be empty (||) as they're not required to be tested against, it's just for informational purposes. 想法是该列的单元格将为空(||),因为不需要对其进行测试,这只是出于提供信息的目的。

The problem with this is that Fitnesse causes every one of those cells to fail because the returned data is different to the data entered (which was nothing). 问题在于,Fitnesse导致这些单元格中的每一个均失败,因为返回的数据与输入的数据不同(什么也不是)。

Is there a way to make Fitnesse ignore this column, or just make it pass? 有没有办法使Fitness Fitnesse忽略此列,或者只是使其通过? Ideally I don't want to change much of the fixture code which is being called. 理想情况下,我不想更改正在调用的夹具代码。 I understand I could use a table of type table and just match things up myself, but that's an hour or 2 of work which I can't really afford to do. 我知道我可以使用table类型的表来自己进行匹配,但这是一个小时或2个小时的工作,我实在负担不起。

Thanks for your help. 谢谢你的帮助。

What is being returned? 返回什么? Is it just null? 它只是空吗? Could you change it to return a empty string? 您可以更改它以返回空字符串吗? Can you explain why the property cannot return the same thing that's expected? 您能解释一下为什么该属性无法返回预期的相同结果吗?

如果是表固定装置,则必须修改固定装置代码,以便如果列标题为“ Comment”,则在从doTable函数返回的ArrayList中,单元格值将设置为“ ignore”。

I'm surprised that the empty cells aren't being ignored by Fitnesse as they're supposed to ; 我很惊讶的是,空细胞没有被忽略FitNesse的作为他们应该 ; sounds like a bug to me. 对我来说听起来像个虫子。 Anyway, you may be able to work around it by putting =~/.*/ in that column, ie a regexp that matches anything. 无论如何,您可以通过在该列中添加=~/.*/来解决它,即匹配任何内容的正则表达式。 (See value comparisons ) (请参阅值比较

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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