English can be ambiguous, and it seems to me that in the methodologies that Gerkin use, there is an assumption that anyone who speaks English to some extent can write and understand test cases, even before any any code.
So, how the technique gives you the right to work, given the following simple test scenario that requires automation:
In the Library application, to add a book to the library, the user clicks Add, the Book Information dialog box appears, and the user is expected to fill out the title of the book, etc. "and click OK.
Suppose a QA person writes the following:
Scenario: clicking the Add button Given a user who is already logged in to the application When the user clicks the Add button Then the Book Info dialog is displayed
Simple enough? Is this a good test? I think I speak English, but I don’t understand this.
The fields in the dialog box should be empty, perhaps some fields should have a default value or an initial value. Perhaps the tester expects that the dialog “Then displays information about the book” will be implemented to ensure all this, but does the developer know this? how is this reported?
Perhaps the test should have been written as
Scenario: clicking the Add button Given a user who is already logged in to the application When the user clicks the Add button Then the Book Info dialog is displayed and all the fields are empty
This may take a couple of seconds between clicking the Add button and the dialog box. Thus, the test may fail because the implementation is checked too quickly if the dialog is raised, or did not wait long enough until the dialog appears and the test fails.
The person conducting the manual testing should not be involved in this problem unless too much time appears behind the dialogue. Thus, the above is exactly how this person writes the test (so here it must be said that the tester must be smart enough to take this into account, or some developer should explain it, or just fix it after how the test failed).
Be that as it may, this simple action requires additional information ... when is it transferred between the person who writes the test and the one who performs the test?
Perhaps the test should have been written as
Scenario: clicking the Add button Given a user who is already logged in to the application When the user clicks the Add button Then the Book Info dialog is displayed within a couple of seconds and all the fields are empty
or perhaps it should have been written as:
Scenario: clicking the Add button Given a user who is already logged in to the application When the user clicks the Add button And the user waits a couple of seconds Then the Book Info dialog is displayed and all the fields are empty
Is the person who wrote the test in English expected
- write all the expectations in a test action, for example. "Then the Book Information dialog box is displayed for a few seconds and all fields are empty" or
- write a short instruction, as in the Book Information dialog box, but then write an additional document that describes (in English) what is meant by this statement and what are all the expectations?