2016-10-18 68 views

回答

4

下面是一個例子。包含拆解的測試包。如果你想最後執行它,你可能會錯過每個測試用例的拆解。 請仔細閱讀相應的文檔:

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} 
相關問題