我是机器人框架的新手。有人可以帮我看看是否可以为包含大约 20 个测试用例的测试套件中的每个测试用例进行测试设置和拆卸。
有人可以用例子解释一下吗?
这是一个例子。包含拆解的测试套件。如果你想最后执行每个测试用例,你可以错过它的拆卸。
请阅读相应的文档:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-setup-and-teardown http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-setup-and-teardown
*** Settings ***
Test Setup Open Application App A
Test Teardown Close Application
*** Test Cases ***
Default values
[Documentation] Setup and teardown from setting table
Do Something
Overridden setup
[Documentation] Own setup, teardown from setting table
[Setup] Open Application App B
Do Something
No teardown
[Documentation] Default setup, no teardown at all
Do Something
[Teardown]
No teardown 2
[Documentation] Setup and teardown can be disabled also with special value NONE
Do Something
[Teardown] NONE
Using variables
[Documentation] Setup and teardown specified using variables
[Setup] ${SETUP}
Do Something
[Teardown] ${TEARDOWN}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)