Skip to content

Commit ee0eff9

Browse files
committed
Add Binder configuration
1 parent f7d277c commit ee0eff9

13 files changed

+298
-33
lines changed

Examples/my_first.robot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# +
12
*** Test Cases ***
23

34
My First Robot Test
4-
Log To Console Hello Robot World!
5+
Log To Console Hello Robot World!
6+
# -

Examples/my_second.robot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
# +
12
*** Settings ***
23
Library OperatingSystem
34

45
***Test Cases***
56

67
My Second Robot Test
7-
Create File new_file.txt Hello World!
8+
Create File new_file.txt Hello World!
9+
# -

Examples/my_third.robot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# +
12
*** Settings ***
23
Library OperatingSystem
34

@@ -14,4 +15,5 @@ My Third Robot Test
1415
My Forth Robot Test
1516
${file_content} = Get File new_file.txt
1617
Should Be Equal ${file_content} ${GOOD_TEXT}
17-
Should Not Be Equal ${file_content} ${BAD_TEXT}
18+
Should Not Be Equal ${file_content} ${BAD_TEXT}
19+
# -

README.md

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -48,44 +48,56 @@ Following example shows how to write your first robot automation case:
4848
1. Create a new file and save it using an extension `.robot`, for example, `my_first.robot`
4949
2. Write in file `*** Test Cases ***`. This creates [section](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-data-sections) for test cases.
5050
3. Type in following (note to add the four spaces before `Log To Console`)
51-
```
52-
My First Robot Test
53-
Log To Console Hello Robot World!
54-
```
51+
52+
```robotframework
53+
My First Robot Test
54+
Log To Console Hello Robot World!
55+
```
56+
5557
4. First test is now ready and it should look like this:
56-
```
57-
*** Test Cases ***
5858
59-
My First Robot Test
60-
Log To Console Hello Robot World!
61-
```
59+
```robotframework
60+
*** Test Cases ***
61+
62+
My First Robot Test
63+
Log To Console Hello Robot World!
64+
```
65+
66+
<div data-notebook="Examples/my_first.robot"></div>
67+
6268
5. Open Terminal/Command Prompt. Navigate to the same folder where your `.robot` file is located and run the test by inputting command `robot my_first.robot`. For example:
63-
```
64-
cd your_folder
65-
robot my_first.robot
66-
```
69+
70+
```
71+
cd your_folder
72+
robot my_first.robot
73+
```
74+
6775
6. When Robot is run, you will see this:
68-
```
69-
> robot my_first.robot
70-
==============================================================================
71-
My First
72-
==============================================================================
73-
My First Robot Test Hello Robot World!
74-
My First Robot Test | PASS |
75-
------------------------------------------------------------------------------
76-
My First | PASS |
77-
1 critical test, 1 passed, 0 failed
78-
1 test total, 1 passed, 0 failed
79-
==============================================================================
80-
Output: /output.xml
81-
Log: /log.html
82-
Report: /report.html
83-
84-
```
76+
77+
```
78+
> robot my_first.robot
79+
==============================================================================
80+
My First
81+
==============================================================================
82+
My First Robot Test Hello Robot World!
83+
My First Robot Test | PASS |
84+
------------------------------------------------------------------------------
85+
My First | PASS |
86+
1 critical test, 1 passed, 0 failed
87+
1 test total, 1 passed, 0 failed
88+
==============================================================================
89+
Output: /output.xml
90+
Log: /log.html
91+
Report: /report.html
92+
93+
```
8594
Robot has created test report files in the same folder where you run the test. You can check details of the first test run by opening report.html file.
8695
8796
[Examples](./Examples) of this manual introduces Keyword Libraries and Variables related to Robot Framework automation.
8897
8998
## More information
9099
91100
Thank you for visiting the Beginners Guide! Hope you enjoyed learning Robot Framework. More about writing test cases: [How To Write Good Test Cases](https://github.com/robotframework/HowToWriteGoodTestCases/blob/master/HowToWriteGoodTestCases.rst).
101+
102+
<script src="iframeResizer.min.js"></script>
103+
<script src="notebook-support.js"></script>

binder/custom.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#header,
2+
#menubar,
3+
#maintoolbar {
4+
display: none !important;
5+
}
6+
#notebook {
7+
margin: none !important;
8+
padding: 0 !important;
9+
}
10+
#notebook-container {
11+
margin: 0 !important;
12+
padding: 0 !important;
13+
box-shadow: none !important;
14+
width: auto !important;
15+
}
16+
#site {
17+
height: auto !important;
18+
}
19+
body {
20+
background: white !important;
21+
bottom: auto !important;
22+
padding-bottom: 1px;
23+
}
24+
.end_space {
25+
display: none;
26+
}
27+
.input_prompt,
28+
.prompt,
29+
.prompt_container {
30+
display: none !important;
31+
}

binder/environment.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: robotkernel
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python >=3.6,<3.8.0a0
6+
- jupyterlab >=1.2.4,<1.3
7+
- nodejs >=11,<12
8+
- pip
9+
- pip:
10+
- robotframework==3.1.2
11+
- robotkernel==1.3.0
12+
- jupytext==1.3.2

binder/example.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# -*- coding: utf-8 -*-
2+
---
3+
jupyter:
4+
jupytext:
5+
text_representation:
6+
extension: .md
7+
format_name: markdown
8+
format_version: '1.2'
9+
jupytext_version: 1.3.2
10+
kernelspec:
11+
display_name: Robot Framework
12+
language: robotframework
13+
name: robotkernel
14+
---
15+
16+
```robotframework
17+
*** Settings ***
18+
19+
Library String
20+
21+
*** Variables ***
22+
23+
${MESSAGE} Hello World
24+
25+
*** Test Cases ***
26+
27+
Message is Hello World
28+
Should be equal ${MESSAGE} Hello World
29+
```

binder/example.robot

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# -*- coding: utf-8 -*-
2+
# ---
3+
# jupyter:
4+
# jupytext:
5+
# text_representation:
6+
# extension: .robot
7+
# format_name: light
8+
# format_version: '1.5'
9+
# jupytext_version: 1.3.2
10+
# kernelspec:
11+
# display_name: Robot Framework
12+
# language: robotframework
13+
# name: robotkernel
14+
# ---
15+
16+
# +
17+
*** Settings ***
18+
19+
Library String
20+
21+
*** Variables ***
22+
23+
${MESSAGE} Hello World
24+
25+
*** Test Cases ***
26+
27+
Message is Hello World
28+
Should be equal ${MESSAGE} Hello World
29+
# -

0 commit comments

Comments
 (0)