Quality Assurance/Writing feature descriptions

If you have used wikis before, we'd love for you to help us by describing how features should behave -- first with plain English descriptions, and then with more formal descriptions that we can automatically test with.

Plain English
Acceptance Test Driven Development starts with a clear description of how a feature should behave. These plain-language specifications are the most important part of the whole project. The better the specifications of the behavior of particular features, the better the automated tests will be! For example, we might describe how Search should work in any given wiki:

On any random page in any wiki, type "main" into the search box. A list of results should appear, and "Main Page" should be the top result. On another random page in any wiki, type "ma" into the search box and click the Search icon. I should then be on a page with a set of search results, and "Main Page" should be one of the results."

If you write a description like this, add it to to the test backlog page: http://www.mediawiki.org/wiki/Qa/test_backlog

Executable Specifications
For those interested in going deeper, we have a formal syntax for making executable specifications in the "Cucumber" feature of our test framework. Cucumber demands specifications in a particular form, Given/When/Then:


 * A Given statement should only ever mention starting conditions.
 * A When statement should always be some sort of verb, or action.
 * A Then statement always has the words "should" or "should not", or equivalent.

Feature: My Feature Scenario: Testing some aspect of My Feature Given When  Then 

Any Given/When/Then statement may also have an arbitrary number of "And" clauses:

Scenario: Testing some complicated aspect of My Feature Given And When  And  And  Then  And 

So the example description we gave above, for Search, becomes this automated test:

Feature: Search

Scenario: Search suggestions Given I am at random page When I search for: main Then a list of suggested pages should appear And Main Page should be the first result

Scenario: Fill in search term and click search Given I am at random page When I search for: ma     And I click the Search button Then I should land on Search Results page

Please also add these Given/When/Then specifications to Qa/test backlog.

For more examples of how to make Given/When/Then specifications, see our existing Feature files at https://github.com/wikimedia/qa-browsertests/tree/master/features

Technical Contributions
For information about contributing code and implementing Feature tests using Page Objects and Cucumber, see QA/running and writing browser tests.