Add bug references to bgp-ingest suites
[integration/test.git] / csit / libraries / SetupUtils.robot
1 *** Settings ***
2 Documentation     Simple resource with setup keywords which combine FailFast and Karaf logging.
3 ...
4 ...               See FailFast.robot documentation for intricacies of that library.
5 Resource          ${CURDIR}/FailFast.robot
6 Resource          ${CURDIR}/KarafKeywords.robot
7
8 *** Keywords ***
9 Setup_Utils_For_Setup_And_Teardown
10     [Documentation]    Prepare both FailFast and karaf logging, to be used in suite setup.
11     FailFast.Do_Not_Fail_Fast_From_Now_On
12     KarafKeywords.Open_Controller_Karaf_Console_On_Background
13     BuiltIn.Run Keyword And Ignore Error    KarafKeywords.Log_Test_Suite_Start_To_Controller_Karaf
14
15 Setup_Test_With_Logging_And_Fast_Failing
16     [Documentation]    Test case setup which skips on previous failure. If not, logs test case name to Karaf log.
17     ...    Recommended to be used as the default test case setup.
18     FailFast.Fail_This_Fast_On_Previous_Error
19     BuiltIn.Run Keyword And Ignore Error    KarafKeywords.Log_Testcase_Start_To_Controller_Karaf
20
21 Setup_Test_With_Logging_And_Without_Fast_Failing
22     [Documentation]    Test case setup which explicitly ignores previous failure and logs test case name to Karaf log.
23     ...    Needed if the recommended default is to be overriden.
24     FailFast.Run_Even_When_Failing_Fast
25     BuiltIn.Run Keyword And Ignore Error    KarafKeywords.Log_Testcase_Start_To_Controller_Karaf
26
27 Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
28     [Documentation]    Test case teardown. Show linked bugs and start fast failing in case of failure.
29     BuiltIn.Run_Keyword_If_Test_Failed    BuiltIn.Set_Suite_Variable    ${SuiteFastFail}    True
30     Utils.Report_Failure_And_Point_To_Linked_Bugs
31
32 Teardown_Test_Show_Bugs_If_Test_Failed
33     [Documentation]    Test case teardown. Show linked bugs in case of failure.
34     Utils.Report_Failure_And_Point_To_Linked_Bugs