Documentation: Make it Test

FIrst Up, Login:

features

* user_stories

* acceptance_criteria

=

Test Automation you'll actually like

Simple. Collaborative. Adaptable.

Terminology

Steps

* Step Name

Our core elements

Parameters

* Check "product" exists

Steps arguments

"Static Arg"
* Step that takes a table
   | id  | name    |
   |-----|---------|
   | 123 | John    |
   | 456 | Mcclain |
|Table Parameter|

Special Parameters

<prefix:value>
* Check if <file:/work/content.txt> is visible
file
Used as:
* Check if the users exist <table:/Users/john/work/users.csv>
table

Scenario (Acceptance Criteria)

Scenario name
-------------
## Scenario name

Or

Specification (User Story)

# Specification name
Specification name
==================

Or

Comments

Im a comment!!!

Comment has no syntax. Any normal line of text is treated as a comment.

Tags

Specification Level
===================

Tags: mvp, mission critical


Scenario Level
--------------

Tags: mission critical, fast

Enable cross-scenario or cross-specification grouping

Example

Markdown

Logging In
=====================

This describes what is required from a **logging in** action.

* Goto page "/login".

Successful login is refered to home
---------------------------
tags: mvp

* Insert into field "user" the value "boaz".
* Insert into field "passowrd" the value "******".
* Press button "Let me in."
* Validate page is "/home".

Wrong credentials result in an alert
-----------------------------

* Insert into field "user" the value "not-boaz".
* Insert into field "passowrd" the value "!******".
* Press button "Let me in."
* Validate alert is shown with the text: "Wrong credentials".

Java

Also applicable:

Go

Python

Ruby

C#

Javascript

public class StepGodClass {
    @Step("Goto page <page>.")
    public void gotoPage(String page) {
        // ... Yada Yada Yada ...
    }

    @Step("Insert into field <field> the value <value>.")
    public void insertToField(String field, String value) {
        // ... Yada Yada Yada ...
    }

// ... Yada Yada Yada ...

    @Step("Validate page is <page>.")
    public void validatePage(String page) {
        // ... Yada Yada Yada ...
    }

    @Step("Validate alert is shown with the text: <alertTitle>.")
    public void validateAlert(String alertTitle) {
        // ... Yada Yada Yada ...
    }
}

What we get

Just Code It

Thanks!

Made with Slides.com