Skip to content

Commit f486462

Browse files
author
Laura Ojala
committed
First version of instructions
1 parent c27cf90 commit f486462

File tree

3 files changed

+54
-18
lines changed

3 files changed

+54
-18
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
*/output.xml
2-
*/report.html
3-
*/log.html
4-
*/new_file.txt
1+
output.xml
2+
report.html
3+
log.html
4+
new_file.txt
55
.DS_Store

Examples/my_first.robot

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
*** Test Cases ***
22

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

README.md

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Introduction
44

5-
Hello! So you want to learn Robot Framework? This guide is everything you need for getting started! You don’t need any previous experience in test automation to use this guide. With the guide, you will learn how to install Robot Framework on your system and get started building cool test cases.
5+
Hello! So you want to learn Robot Framework? This guide is everything you need for getting started! You don’t need any previous experience in test automation to use this guide. You will learn how to install Robot Framework on your computer and get started building cool automation.
66

77
## Installation
88

@@ -11,7 +11,7 @@ Hello! So you want to learn Robot Framework? This guide is everything you need f
1111
python --version
1212
```
1313
2. If Python is not installed, download and install latest version from [Python Downloads](https://www.python.org/downloads/). If installing to Windows, check "Add Python to PATH" in the Python installer.
14-
3. Re-start your Terminal/Command Prompt after Python installation
14+
3. Restart the Terminal/Command Prompt program after Python installation.
1515
4. Next, install Robot Framework. Type in to Terminal/Command Prompt:
1616
```
1717
pip install robotframework
@@ -37,17 +37,55 @@ and for checking if installation was succesfull:
3737
py -m robot --version
3838
```
3939

40-
## Writing the first automation case
40+
### Selecting code editor
4141

42+
Simple robot automation can be written using a any text editor, even Notepad. Check list of [suggested editors on Robot Framework's homepage](https://robotframework.org/#tools). If you don't have preference, very popular editor is [Visual Studio Code](https://code.visualstudio.com/), that has really good [Robot Framework extension](https://marketplace.visualstudio.com/items?itemName=TomiTurtiainen.rf-intellisense).
4243

43-
* Selecting editor
44-
* Naming file
45-
* Structure of the test/task
46-
* Running it
47-
* Checking the log files
44+
## Writing a first automation case
4845

49-
## More information
46+
Following example shows how to write your first robot automation case:
5047

51-
Utilizing [libraries](https://robotframework.org/#libraries)
48+
1. Create a new file and save it using an extension `.robot`, for example, `my_first.robot`
49+
2. Write in file `*** Test Cases ***`. This creates [section](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-data-sections) for test cases.
50+
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+
```
55+
4. First test is now ready and it should look like this:
56+
```
57+
*** Test Cases ***
58+
59+
My First Robot Test
60+
Log To Console Hello Robot World!
61+
```
62+
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+
```
67+
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+
```
85+
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.
86+
87+
[Examples](./Examples) of this manual introduces Keyword Libraries and Variables related to Robot Framework automation.
88+
89+
## More information
5290

53-
References
91+
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).

0 commit comments

Comments
 (0)