Projekt

Obecné

Profil

Stáhnout (1.64 KB) Statistiky
| Větev: | Tag: | Revize:
1
# UI Tests
2

    
3
This folder contains a test suite for various UI interactions. Tests are written and run by [Robot Framework](http://robotframework.org).
4

    
5
## How to Run It
6

    
7
### 1. Install pip
8

    
9
pip is a Python package management system which can be used to install Robot Framework. Get it at https://pip.pypa.io/en/stable/quickstart/.
10

    
11
### 2. Install Robot Framework using pip
12

    
13
`pip install robotframework`
14
`pip install robotframework-selenium2library`
15

    
16
### 3. Install browser controlling driver
17

    
18
Tests written in Robot Framework have Selenium under cover. Selenium uses a headless browser to automatically interact with a webpage like a normal user would. For that, browser controller must be installed.
19

    
20
There are basically two options:
21
1. [geckodriver](https://github.com/mozilla/geckodriver/releases)
22
2. **[chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads)** (default)
23

    
24
You should put path to the driver folder to your `Path`. Obviously, you should have Firefox or Chrome installed too for geckodriver/chromedriver to work.
25

    
26
### 4. Run Robot Framework
27

    
28
Assuming you have Python's Scripts folder added to your `Path`, you should be able to run all test suits:
29

    
30
`robot ./`
31

    
32
To set a custom output folder, use option `--outputdir`:
33

    
34
`robot --outputdir ./output ./`
35

    
36
To run a single test suit, point to that file:
37

    
38
`robot --outputdir ./output ./graph.robot`
39

    
40
To run a particular test from a test suite, use option `--test`:
41

    
42
`robot --outputdir ./output --test "General" ./graph.robot`
43

    
44
### 5. Check results
45

    
46
In your output folder (`./` by default), there should be a HTML file called `report.html`. It contains additional details about executed test runs.
(2-2/14)