Wie ausgeführt, Gurke style test cases im Robot Framework
Gibt es eine Konfigurationseinstellung, die ich ausführen müssen, um Robot Framework (RF) Gurke/BDD-Testfälle?
Habe ich installiert, RF 2.8.3 unter Windows 7 und läuft OK mit Selenium2Library und DatabaseLibrary. Entsprechend den user-docs und andere Informationen, die auf der web, ich sollte in der Lage sein, zu schreiben, und führen Gurke Stil tests. Jedoch wenn ich dies mache, bekomme ich Fehler. RF nicht Streifen, die Gurke keywords (Gegeben, Wenn, Dann, ...), bevor Sie versuchen zu dem Schlüsselwort entsprechen:
Tests.Group001 GeneralTests
==============================================================================
Scenario: No template operation selected | FAIL |
No keyword with name 'But page does not contain a no template operation selected error message' found.
------------------------------------------------------------------------------
Mir laufen die tests mit einer straight-forward:
pybot ../Tests
Mein Probe-test-Datei:
*** settings ***
Library Selenium2Library
Library DatabaseLibrary
Library kw_common
*** Test Cases ***
Scenario: No template operation selected
Given I have logged in and I have selected to perform template configuration
When I do not select a template operation
But page does not contain a no template operation selected error message
And I press the next button
Then I should not see a template operation selected error message
*** Keywords ***
I have logged in and I have selected to perform template configuration
Log Given I have logged in and I have selected to perform template configuration
I do not select a template operation
Log No template operation selected
page does not contain a no template operation selected error message
Page Should Not Contain 'ddTemplateOperation' is required.
I press the next button
Click Element xpath=//input[contains(@id,'next')]
I should not see a template operation selected error message
Page Should Contain 'ddTemplateOperation' is required.
Hilfe wäre sehr geschätzt werden. Danke.
InformationsquelleAutor RayCh | 2014-01-21
Du musst angemeldet sein, um einen Kommentar abzugeben.
Aus der offiziellen Dokumentation http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#ignoring-given-when-then-and-but-prefixes :
So
page does not contain a no template operation selected error message
Schlüsselwort muss umbenannt werden zuBut page does not contain a no template operation selected error message
.But
könnte verwendet werden, als eine Gurke Schlüsselwort, das wäre (Optional) verworfen, bevor Sie versuchen, eine keyword-match, aber das ist nicht der Fall und verursacht den Fehler. Nochmals vielen Dank.InformationsquelleAutor Harri