Fitnesse SLIM 查询表 - 阻止空单元失败?
我有一大组 Fitnesse(适用于 Java - v20090513)测试,这些测试是针对 SLIM 查询表执行的。
为了帮助测试(解释为什么我们得到某些结果),我在表末尾添加了一个新列。这个想法是,该列的单元格将为空(||),因为不需要对它们进行测试,这只是为了提供信息。
问题在于,Fitnesse 会导致这些单元中的每一个都失败,因为返回的数据与输入的数据不同(没有任何数据)。
有没有办法让 Fitnesse 忽略此专栏,或者只是让它通过?理想情况下,我不想更改太多正在调用的夹具代码。我知道我可以使用表格类型的表格,然后自己进行匹配,但这是一两个小时的工作,我真的负担不起。
感谢您的帮助。
I've got a large set of Fitnesse (For Java - v20090513) tests which are executed against a SLIM Query table.
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).
Is there a way to make Fitnesse ignore this column, or just make it pass? 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.
Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
被退回的是什么?它只是空吗?你能改变它以返回一个空字符串吗?您能解释一下为什么该财产不能返回与预期相同的东西吗?
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?
如果它是表固定装置,则必须修改固定装置代码,以便如果列标题为“注释”,则从 doTable 函数返回的 ArrayList 中的单元格值将设置为“忽略”。
If it's a table fixure, you'll have to modify your fixture code so that if the column header is "Comment", the cells value is set to "ignore" in the ArrayList that is returned from the doTable function.
令我惊讶的是,Fitnesse 并没有像他们想象的那样忽略空单元格到;对我来说听起来像是一个错误。无论如何,您可以通过在该列中放入
=~/.*/
来解决这个问题,即匹配任何内容的正则表达式。 (请参阅值比较)I'm surprised that the empty cells aren't being ignored by Fitnesse as they're supposed to; sounds like a bug to me. Anyway, you may be able to work around it by putting
=~/.*/
in that column, i.e. a regexp that matches anything. (See value comparisons)