使用 "Test Template" 时每个测试用例的文档(数据驱动)
Documentation for each test case when using "Test Template" (Data Driven)
使用"Test Template"时,如何为生成的测试用例设置[Documentation]?
我有一个解决方法:
*** Settings ***
Test Template The Test Logic
*** Test Cases *** arg1 arg2 documentation
Test Case 1 1 a Doc of test 1
Test Case 2 2 b Doc of test 2
Test Case 3 3 c Doc of test 3
*** Keywords ***
The Test Logic
[Arguments] ${arg1} ${arg2} ${documentation}
Set Test Documentation ${documentation}
Log Many ${arg1} ${arg2}
不过我觉得应该有更原生的方式。
我找不到这样的方法。有人知道吗?
我认为可用的最佳解决方案就是按照这个思路。
*** Settings ***
Test Template The Test Logic
*** Test Cases *** arg1 arg2
Test Case 1 1 a
Test Case 2 2 b
Test Case 3 3 c
*** Keywords ***
The Test Logic
[Arguments] ${arg1} ${arg2}
Set Test Documentation Test case covering scenario of ${arg1} and ${arg2}
Log Many ${arg1} ${arg2}
使用"Test Template"时,如何为生成的测试用例设置[Documentation]?
我有一个解决方法:
*** Settings ***
Test Template The Test Logic
*** Test Cases *** arg1 arg2 documentation
Test Case 1 1 a Doc of test 1
Test Case 2 2 b Doc of test 2
Test Case 3 3 c Doc of test 3
*** Keywords ***
The Test Logic
[Arguments] ${arg1} ${arg2} ${documentation}
Set Test Documentation ${documentation}
Log Many ${arg1} ${arg2}
不过我觉得应该有更原生的方式。 我找不到这样的方法。有人知道吗?
我认为可用的最佳解决方案就是按照这个思路。
*** Settings ***
Test Template The Test Logic
*** Test Cases *** arg1 arg2
Test Case 1 1 a
Test Case 2 2 b
Test Case 3 3 c
*** Keywords ***
The Test Logic
[Arguments] ${arg1} ${arg2}
Set Test Documentation Test case covering scenario of ${arg1} and ${arg2}
Log Many ${arg1} ${arg2}