Running generic stories via a web-based interface

The Web Runner provides a simple web-based interface to running generic stories. A typical use case is for BAs, QAs or stakeholders to be able to access the results of story running without needing access to developer resources, e.g. source control or build systems.

A fully functional example webapp is provided in trader runner example. We'll be using this example to illustrate the use of Web Runner:

  • Customise Web Runner
  • Deploy webapp to your favourite webapp container
  • Open page http://localhost:8080/trader-runner (assuming normal port conventions)

Run Story

The Run Story page allows the user to run synchronously any textual story, waiting for it to complete, and displaying the result in the same page.

  • From Menu, click on Run Story, which will take you to a page where you can enter your textual story.
  • Input textual story in textarea (e.g you can cut & paste the sample scenarios found in the trader.story) and click on Run button.
  • Optionally, a meta filter can be specified.
  • Upon execution, the output of the story is shown below. By default the same output is shown as the one you would see when running JBehave via a command-line interface. This includes any details of failed and pending steps. If any failures occur, the user has the stack trace in an expandable section below.

Submit Story

The Submit Story page allows the user to run asynchronously any textual story. The result can be then viewed (once completed) in the View Story page.

  • From Menu, click on Submit Story, which will take you to a page where you can enter your textual story.
  • Input textual story in textarea (e.g you can cut & paste the sample scenarios found in the trader.story) and click on Submit button.
  • Optionally, a meta filter can be specified.
  • Upon execution, a story path (a timestamped id) is generated and an clickable link is provided to the View Story page.

View Story

The View Story page allows the user to view all the stories run (synchronously or asynchronously) and view the output as text.

  • From Menu, click on View Story, which will take you to a page where all the stories run as displayed.
  • The columns of the table are sortable by clicking on the header links.
  • Each story output can be viewed as text by clicking on the corresponding 'txt' link.

Explore Steps

The Find Steps page allows the user to explore available steps pattern by auto-completion and to display the patterns in a drop-down list.

  • From Menu, click on Find Steps, which will take you to a page where you have an Explore panel.
  • Start typing in the input field (e.g you can type "Given" to display all the Given type step patterns).
  • The auto-completed list will include any step pattern that matches in part the input text.

Match Steps

The Find Steps page allows the user to find methods in steps classes that match a given complete textual step and to display them.

  • From Menu, click on Find Steps, which will take you to a page where you can enter your complete textual step.
  • Input the complete textual step in textarea (e.g you can cut & paste a step from the sample scenarios found in the trader.story) and click on Find button.
  • A blank input will simply show all the methods that are configured.
  • Upon execution, the steps found are shown below. By default, only the patterns are shown, but you can choose to also display associated methods.
  • The final section shows the steps instances that were configured and were used to find the steps.

Data Files

The Data Files page allows the user to upload and view any data file that may be used during the execution of the story. Data files can be either single text files or zip archives. If archives, these are automatically unzipped when upload to the server.

  • From Menu, click on Data Files, which will take you to a page where you can view the files already uploaded to the upload directory (defaults to "/tmp/upload" but is configurable via the WebRunnerApplication#uploadDirectory()).
  • Use the Browse and Upload buttons to upload any file to the upload directory.
  • Use the Show Content and Hide Content buttons to toggle display of uploaded file content.
  • Click on View link next to the files to view their content.
  • Use the Delete button to delete any selected files.