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

Schreibe einen Kommentar