Skip to content
This repository was archived by the owner on Nov 10, 2021. It is now read-only.

Starting

Ryan Gurnick edited this page Aug 2, 2016 · 2 revisions

Why use behat-gui?

You would use this system to allow programmers to take control of testing in both their development environment as well as to do quality assurance of the production environment. The behat-gui allows teams to test their development builds and keep other users informed about what type of issues are hindering other users.

Tests

  • What is a test? Tests are a special file that is a set of tasks that will be intrepreted and executed. In the case of this behat system, the tests are written in Gherkin, which is a sudo english language that was made to allow anyone to build tests.

  • Why run a test? Running tests allow you to automate front end user experience and user interface tests. Rather than doing it by hand everytime there is a change to the website. This automates the very manual task of checking how a website works.

Reports

The reports tab of the website contains a list of all the reports for every test that have ever been executed on the system. We are working to implement pagination so that it does not load slowly. We will also be adding a way for users to export report data to a csv.

Variables

  • What are variables? Variables are a way that we made the behat testing framework more robust. Using behat in multiple environments would take a lot of editing features and tests. Instead we build a variable system so that each user can define their own variables to be run for their environment. Variables are meant to allow multiple users to use the same tests in different environments with different versions of the same application.

  • Why use variables? Variables allow you to define multiple values for the same variable in the test. Generally variables look like [var] and the behat gui will allow you to define many variables. When you execute a test file it takes that template and puts in all of the variables in as actual text, it replaces the [var] with the actual value. It's meant as a time saving feature as well as a feature to make the behat framework more robust.

Variable Sets

  • What are variable sets. The main purpose of variable sets is to seperate variable values for multiple users but keep the same variable key the string in between the []'s.

  • Why use variable sets. Variable sets allow you to define information that is different based on environment. So if you wanted to test the production environment you could put all of the variables in a set named production and if you want to test your local machine you can give a different set of variable values for that set.

Scheduler

The scheduler allows you to execute tests on a recurring cycle.

Categories

Categories allow you to give a test a tag that you can execute multiple tests from.

For example: (each of the following is a test)

  • Header - Search with the categories (header, search)
  • Header - Buttons with the categories (header, buttons)
  • Header - Logo with the categories (header, logo)

If I want to test the header I can run all of the tests with the category of header. The more tests you add the more useful this system becomes.

Github

This is the area where you can define what happens when the behat gui recieves certain information. An example of this is if you want to setup github to automatically trigger a set of tests, you can do that. Just direct github to send a webhook to /github. When the behat-gui gets information from github delivered to that url it will execute categories. This allows you to automate the execution of categories based on github commits.

JIRA

Behat-GUI will only ever generate a JIRA ticket when a test fails. This area will allow you to configure how the system will generate JIRA tickets. This is to reduce the amount of tickets being generated. We also recommend that you create a standalone JIRA project to contain all of the tickets.

Feature Context (Advanced)

The feature context area is the only place in the system where you will have to use actual code. This is the file that behat uses to give you more Gherkin sudo english functions. This area allows you to easily update the file with your own custom functions for behat. You should not touch this area unless you know what you are doing.

Clone this wiki locally