Skip to content

Instantly share code, notes, and snippets.

@up1
Last active August 29, 2015 14:05
Show Gist options
  • Save up1/c562e525bb27b976a520 to your computer and use it in GitHub Desktop.
Save up1/c562e525bb27b976a520 to your computer and use it in GitHub Desktop.
Demo robot framework
*** Testcases ***
Grade Calculator
[Template] Calculate my grade
88 A
80 A
70 B
60 C
50 D
40 F
*** Keywords ***
Calculate my grade
[Arguments] ${score} ${expected grade}
${grade}= Set Variable If
... ${score} >= 80 A
... ${score} >= 70 B
... ${score} >= 60 C
... ${score} >= 50 D
... ${score} < 50 F
Should Be Equal As Strings ${expected grade} ${grade}
Log \nScore=${score} got grade ${grade} console=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment