Skip to content

Commit

Permalink
Moving tests into run_on_failure.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsfrishberg committed May 12, 2015
2 parents e713ed4 + 32fb53e commit 213f634
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/acceptance/keywords/run_on_failure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Prefer Custom Keywords
Restore Old Search Order
Set Library Search Order ${old order}

Open Browser To Front Page
Open Browser ${FRONT PAGE}

*** Test Cases ***
Run On Failure Keyword Only Called Once
[Setup] Prefer Custom Keywords
Expand Down
30 changes: 30 additions & 0 deletions test/acceptance/keywords/run_on_failure_only_once.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
*** Settings ***
Suite Setup Run Keywords Prefer Custom Keywords Open Browser To Front Page
Suite Teardown Run Keywords Close Browser Set Debug Loglevel Restore Old Search Order
Test Teardown Register Keyword To Run On Failure Nothing
Resource ../resource.txt
Library CustomSeleniumKeywords

*** Test Cases ***
Run On Failure Keyword Only Called Once
Set Test Variable ${ON FAIL COUNT} ${0}
Register Keyword To Run On Failure On Fail
Run Keyword And Ignore Error Custom Selenium Keyword
Should Be Equal ${ON FAIL COUNT} ${1} On Failure Keyword called ${ON FAIL COUNT} times.

*** Variables ***
${old order}

*** Keywords ***
On Fail
${count}= Evaluate ${ON FAIL COUNT} + 1
Set Test Variable ${ON FAIL COUNT} ${count}

Prefer Custom Keywords
${old order}= Set Library Search Order CustomSeleniumKeywords

Restore Old Search Order
Set Library Search Order ${old order}

Open Browser To Front Page
Open Browser ${FRONT PAGE}
Empty file modified test/resources/testlibs/CustomSeleniumKeywords.py
100644 → 100755
Empty file.

0 comments on commit 213f634

Please sign in to comment.