.. cssclass:: topic
Gauge is a free and open source test automation framework. Gauge makes test automation a natural part of the software development cycle by removing any hurdle that comes in the way of writing and maintaining acceptance tests
.. cssclass:: topic
The communication breakdowns between Developers and Business Stakeholders is a common risk of software development. Gauge is an advanced automation tool that allows requirements to be written in a way that will be understood by all roles in a project and help bridge the gap.
Some of the key features of Gauge that make it stand unique include:
.. cssclass:: key-features
- A rich markup based on markdown
- Simple, Flexible and Rich Syntax
- Business Language Tests: Supports the concept of executable documentation
- Consistent Cross Platform/Language Support for writing test code. Currently supported languages
- Open Source,so it could be shared freely and improved by others as well.
- A modular architecture with Plugins support
- Extensible through Plugins and Hackable.
- Supports External Data Sources
- Helps you create Maintainable and Understandable test suites.
- IDE Support
.. cssclass:: topic
They are business layer test cases which can also act as your feature documentation. They are written in the business language. Typically a spec or specification describe a particular feature of the application under test.
.. cssclass:: key-features
- They are written in a .spec file. Gauge also supports .md file format.
- The Markup for a Specification file is based on markdown syntax.
# Search specification
Tags: search
The admin user must be able to search for available products on the se
User must be logged in as "admin"
Open the product search page
## Successful search 2
Tags: successful
For an existing product name, the search result will contain the product
Search for product "Die Hard" 3
"Die Hard" should show up in the search results
## Unsuccessful search
On an unknown product name search the search results will be empty
Search for product "unknown"
The search results will be empty
A Spec must begins with a spec heading and a single specification can contain only one spec heading.
It is written in <H1> syntax of markdown. This can be in two forms:
# Spec Heading
or
Spec Heading
============
.. cssclass:: note
Each scenario represents a single flow in a particular specification. A specification must contain at least one scenario.
A scenario starts after a scenario heading or a scenario name. The scenario heading is written in markdown <H2> syntax. This can be written in 2 ways:
## Scenario heading
or
Scenario heading
----------------
.. cssclass:: note
Configuration
=============
The Admin user should be able to switch permissions for other users.
Admin Login
-----------
* User must login as "admin"
* Navigate to the configuration page
* Change permissions for user "john" to "admin"
* User "john" should have admin permissions
Steps are the executable components of your specification. They are written as markdown unordered list items (bulleted points).
They are written inside a specification as
.. cssclass:: key-features
- Context Steps
- Tear Down Steps
- Steps inside a scenario or concepts
Every step has an underlying code implementation for the programming language used. This is executed when the steps inside a spec are executed.
See how to write Step implementations for different languages.
* Login into my app
* Search for "gauge"
* Search for "gauge-java"
The values written in quotes are parameters which are passed into the underlying step implementation as a language specific structure.
The following characters are reserved for parameters, these cannot be used in step text.
.. cssclass:: key-features
- "
- <
- >
Steps can be defined to take values as parameters so that they can be re-used with different parameter values.
* Check "product 1" exists
* Check "product 2" exists
The underlying step implementation in code must also take the same number of parameters as passed from the step.
The parameters passed into a step are of the following types:
They are values passed into the steps in double quotes.
* Create a “gauge-java” project
* Write “100” line specification
.. cssclass:: note
Dynamic parameters are used as placeholder for values.
Syntax: <dynamic_param>.
Dynamic parameters are primarily used when referring to a table column value in Data driven execution, or while passing values to Concepts.
example.cpt
# A sample concept that takes a <parameter>
* And used the <parameter> in a step.
The above concept can be invoked and a value can be passed to the concept against <parameter> at the time of invocation.
* A sample concept that takes a "dummy value"
.. cssclass:: note
Table parameters are used when a step is to be exucuted for multiple values. The step having a inline table parameter will be executed for each table row
Create projects
===============
First scenario
--------------
* Create the following projects
|project name| username |
|------------|----------|
| Gauge java | Daredevil|
| Gauge ruby | Iron Fist|