Fitnesse测试表内的标记(Markup inside Fitnesse test table)

编程入门 行业动态 更新时间:2024-10-26 20:27:51
Fitnesse测试表内的标记(Markup inside Fitnesse test table)

我想使用像'''text'''这样的标记(格式文本为粗体)来格式化Fitnesse测试表中的文本,以便在复杂的设置中显示,测试哪些特定值。

示例:如果我有这样的测试表

|query|load and check age of person| |name |age | |Peter|'''40''' |

我将“40”作为粗体文本,这就是我想要的。 但是当我运行测试时,我得到一个错误,并说出结果

[40] expected [40]

在那张桌子里面。 如果我使用例如css类,也会发生同样的情况

!style_red[40]

有没有办法在不破坏测试的情况下格式化文本?

I want to use markup like '''text''' (format text as bold) to format text inside a Fitnesse test table to show in a complex setup, which specific values are tested.

Example: If I have a test table like this

|query|load and check age of person| |name |age | |Peter|'''40''' |

I get "40" as bold text, which is what I want. But when I run the test I get an error, saying for the result

[40] expected [40]

inside that table. The same happens if I use css classes with e.g.

!style_red[40]

Is there a way to do format text, without breaking the tests?

最满意答案

我所知道的唯一方法是在代码中执行此操作(在执行实际比较操作之前删除HTML标记)。

The only way I'm aware of is to do this in code (removing the HTML tags before doing the actual compare operation).

更多推荐

本文发布于:2023-04-29 07:56:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1335865.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:标记   测试   Fitnesse   table   test

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!