-
Notifications
You must be signed in to change notification settings - Fork 110
/
keyword_driven.robot
39 lines (34 loc) · 1.21 KB
/
keyword_driven.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
*** Settings ***
Documentation Example test cases using the keyword-driven testing approach.
...
... All tests contain a workflow constructed from keywords in
... ``CalculatorLibrary.py``. Creating new tests or editing
... existing is easy even for people without programming skills.
...
... The _keyword-driven_ appoach works well for normal test
... automation, but the _gherkin_ style might be even better
... if also business people need to understand tests. If the
... same workflow needs to repeated multiple times, it is best
... to use to the _data-driven_ approach.
Library CalculatorLibrary.py
*** Test Cases ***
Push button
Push button 1
Result should be 1
Push multiple buttons
Push button 1
Push button 2
Result should be 12
Simple calculation
Push button 1
Push button +
Push button 2
Push button =
Result should be 3
Longer calculation
Push buttons 5 + 4 - 3 * 2 / 1 =
Result should be 3
Clear
Push button 1
Push button C
Result should be ${EMPTY} # ${EMPTY} is a built-in variable