Robot Framework:如何为 BDD 编写的测试添加文档标签 + DD风格
以下是我在 Robot Framework 中编写的测试。它采用BDD+数据驱动的方法。它运行得很好。了解如何为每个测试添加 [Documentation] 标签。我希望在report.html 中,对于每个测试用例,应该显示文档。如何实现?
Settings
Resource …/…/…/resources/high-level-api.robot
Library Collections
Test Template this is my test
Test Cases
TC1 ${data1} ${data2}
TC2 ${data3} ${data4}
TC3 ${data5} ${data6}
Keywords
this is my test
[Arguments] ${valid_data1} ${valid_data2}
When perform step1 ${valid_data1}
And step2 ${valid_data1}
Then I should get ${valid_data2}
Following is my test is written in Robot Framework. It uses the BDD+data-driven approach. It runs perfectly fine. Bue how to add [Documentation] tag for each test. I want that in the report.html, for each test case, documentation should be displayed. How to achieve it?
Settings
Resource …/…/…/resources/high-level-api.robot
Library Collections
Test Template this is my test
Test Cases
TC1 ${data1} ${data2}
TC2 ${data3} ${data4}
TC3 ${data5} ${data6}
Keywords
this is my test
[Arguments] ${valid_data1} ${valid_data2}
When perform step1 ${valid_data1}
And step2 ${valid_data1}
Then I should get ${valid_data2}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用用户指南。
它应该看起来像这样:
Use the [Documentation] setting from user guide.
It should look something like this: