GraphWalker, an open-source model-based testing tool

main

Model with ease

GraphWalker offers an editor called the Studio in which models can be created and edited. But Studio can do more than just editing. In the tool, the models can be verified by running test path generations so the user can verify the correctness of the models.

Fork me on GitHub

Features

Editor

  • Supports the creation and editing of models
  • Verifying the correctness and expected behaviors of the models

Command line tools

  • A suite of command line tools for running GraphWalker in different ways
  • Offline path generation
  • Online path generation as either REST or a WebSocket service

Integrate GraphWalker in your java project

  • GraphWalker can be used in your testing project as a maven dependency
  • Use various GraphWalker maven plugin to speed up your development
usage

How does a model relate to a test in GraphWalker?

A GraphWalker model consists of 2 types of basic elements, the vertex and the edge.

An edge represents an action, a transition.

An action could be an API call, a button click, a timeout, etc. Anything that moves your System Under Test into a new state that you want to verify. But remember, there is no verification going on in the edge. That happens only in the vertex.

A vertex represents verification, an assertion.

A verification is where you would have assertions in your code. It is here that you verify that an API call returns the correct values, that a button click actually did close a dialog, or that when the timeout should have occurred, the System Under Test triggered the expected event.

A model is a graph, which is a set of vertices and edges

From a model, GrapWalker will generate a path through it. A model has a start element, and a generator which rules how the path is generated, and associated stop condition which tells GraphWalker when to stop generating the path.

main

docs

Documentation

All documentation on how to use GraphWalker is on GraphWalker's wiki pages

Get help from the forum

If you have questions to ask, we have a place for you GraphWalker forum

Create a model in Studio

  • Start the model editor
    java -jar graphwalker-studio-4.1.0.jar
    then open http://localhost:9090/studio.html in a web browser.
  • Create an empty model
    Click once on the +-button, and a model editor view will be opened.
  • Cretae a vertex
    On the editor view area, while pressing the keyboard key v, click the left mouse button.
  • Cretae an edge
    On the editor view area, while pressing the keyboard key e
    • Click and hold the left mouse button on the first vertex.
    • Drag the mouse cursor to the second vertex and release the left mouse button over that vertex.
  • Set the start element
    • Open the side bar
    • Click on any element (vertex or edge), and on the side bar, tick the check box Start element.
  • Save the model
    Click the Save button on the left side side.

Create GraphWalker maven project

mvn archetype:generate -B \
-DarchetypeGroupId=org.graphwalker \
-DarchetypeArtifactId=graphwalker-maven-archetype \
-DgroupId=com.company -DartifactId=myProject \
-DarchetypeVersion=LATEST
cd myProject
mvn compile exec:java -Dexec.mainClass="com.company.Runner"

Add GraphWalker to your maven project

Add following dependency to your project.

<dependency>
   <groupId>org.graphwalker</groupId>
   <artifactId>graphwalker-core</artifactId>
   <version>4.1.0</version>
</dependency>

Download

Command line tool - CLI

Download latest stable version - graphwalker-cli-4.1.0.jar

Download and run:

java -jar graphwalker-cli-4.1.0.jar

Studio

Download latest stable version - graphwalker-studio-4.1.0.jar

Download and run:

java -jar graphwalker-studio-4.1.0.jar

Open a browser and use url http://localhost:9090/studio.html


Source code

The source code is here: https://github.com/GraphWalker/graphwalker-project