Skip to content

Commit 7285adf

Browse files
authored
use robot for self tests (via #259)
1 parent 9ee1032 commit 7285adf

40 files changed

+625
-637
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*** Settings ***
2+
Library ./library/run.py
3+
Library ./library/test.py
4+
5+
6+
*** Variables ***
7+
${TC_LOG} | *Test Cases* | | |\n
8+
... | Demo Test Case Log | | |\n
9+
... | | Log | First |\n
10+
... | | Log | Second |\n
11+
12+
13+
*** Test Cases ***
14+
Test Case Log
15+
${tmp_dir}= Make Temp Dir
16+
${test_case_dir}= Make Dir ${tmp_dir} test
17+
${test_case}= Make Test Case ${test_case_dir} step.robot ${TC_LOG}
18+
${allure_report}= Robot Run With Allure ${tmp_dir} ${test_case}
19+
${tc_matcher}= Should Has Test Case ${allure_report} Demo Test Case Log
20+
${first_step_matcher}= Should Has Step ${allure_report} ${tc_matcher} BuiltIn.Log
21+
Should Has Parameter ${allure_report} ${first_step_matcher} arg1 First
22+
${second_step_matcher}= Should Has Step ${allure_report} ${tc_matcher} BuiltIn.Log
23+
Should Has Parameter ${allure_report} ${second_step_matcher} arg1 Second
24+
25+
# ToDo: loglevel
26+
# ToDo: Log Many
27+
# ToDo: Comment
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
*** Settings ***
2+
Library ./library/run.py
3+
Library ./library/test.py
4+
5+
6+
*** Variables ***
7+
${TC_single} | *Test Cases* | | |\n
8+
... | Demo Single Line Description | | |\n
9+
... | | [Documentation] | Single line description |\n
10+
... | | No Operation | |\n
11+
12+
${TC_multi} | *Test Cases* | | |\n
13+
... | Demo Multi Line Description | | |\n
14+
... | | [Documentation] | Multi line |\n
15+
... | | ... | description |\n
16+
... | | No Operation | |\n
17+
18+
${TC_dynamic} | *Test Cases | | |\n
19+
... | Demo Dynamic Description | | |\n
20+
... | | [Documentation] | Static description |\n
21+
... | | Set Test Documentation | Dynamic description |\n
22+
23+
${TC_append} | *Test Cases | | |\n
24+
... | Demo Append Dynamic Description | | |\n
25+
... | | [Documentation] | Static description |\n
26+
... | | Set Test Documentation | Dynamic description |\n
27+
... | | ... | append=yes |\n
28+
29+
30+
*** Test Cases ***
31+
Single Line Description
32+
${tmp_dir} Make Temp Dir
33+
${test_case_dir} Make Dir ${tmp_dir} test
34+
${test_case} Make Test Case ${test_case_dir} description.robot ${TC_single}
35+
${allure_report} Robot Run With Allure ${tmp_dir} ${test_case}
36+
${tc_matcher} Should Has Test Case ${allure_report} Demo Single Line Description
37+
Should Has Description ${allure_report} ${tc_matcher} Single line description
38+
39+
Multi Line Description
40+
${tmp_dir} Make Temp Dir
41+
${test_case_dir} Make Dir ${tmp_dir} test
42+
${test_case} Make Test Case ${test_case_dir} description.robot ${TC_multi}
43+
${allure_report} Robot Run With Allure ${tmp_dir} ${test_case}
44+
${tc_matcher} Should Has Test Case ${allure_report} Demo Multi Line Description
45+
Should Has Description ${allure_report} ${tc_matcher} Multi line\n description
46+
47+
Dynamic Description
48+
${tmp_dir} Make Temp Dir
49+
${test_case_dir} Make Dir ${tmp_dir} test
50+
${test_case} Make Test Case ${test_case_dir} description.robot ${TC_dynamic}
51+
${allure_report} Robot Run With Allure ${tmp_dir} ${test_case}
52+
${tc_matcher} Should Has Test Case ${allure_report} Demo Dynamic Description
53+
Should Has Description ${allure_report} ${tc_matcher} Dynamic description
54+
55+
Append Dynamic Description
56+
${tmp_dir} Make Temp Dir
57+
${test_case_dir} Make Dir ${tmp_dir} test
58+
${test_case} Make Test Case ${test_case_dir} description.robot ${TC_append}
59+
${allure_report} Robot Run With Allure ${tmp_dir} ${test_case}
60+
${tc_matcher} Should Has Test Case ${allure_report} Demo Append Dynamic Description
61+
Should Has Description ${allure_report} ${tc_matcher} Static description Dynamic description

allure-robotframework/test/description/__init__.py

Whitespace-only changes.

allure-robotframework/test/description/case_with_description.robot

Lines changed: 0 additions & 8 deletions
This file was deleted.

allure-robotframework/test/description/test_description.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

allure-robotframework/test/fixture/__init__.py

Whitespace-only changes.

allure-robotframework/test/fixture/cases_with_fixtures.robot

Lines changed: 0 additions & 20 deletions
This file was deleted.

allure-robotframework/test/fixture/suite_with_fixtures.robot

Lines changed: 0 additions & 32 deletions
This file was deleted.

allure-robotframework/test/fixture/test_fixtures.py

Lines changed: 0 additions & 127 deletions
This file was deleted.

allure-robotframework/test/group/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)