Skip to main content

Automated Fixturing

During this tutorial you have:

  • manually invoked a GitHub workflow to publish pre-canned results
  • implemented and executed new test specs from scratch
  • learned how to generate and manage GitHub issues with failing tests
  • formally defined a test session consisting of a set of specs for testing a build
  • leveraged Exploratory Testing for non-scripted verification
  • used variables and includes when implementing test specs

This section of the tutorial will be demonstrating the power of automation, integrated into a manual test, using a Spec Fixture based on a Github Action.


This example highlights the built-in automated fixturing for "manual" tests.

Files Used

The following files and their content is used in this section of the tutorial

  • Spec file -
  • GitHub workflow yaml file - testspace.yml
  • JavaScript file - handler.js

The repo file structure:

└─ .github/workflows
└─ testspace.yml
└─ handler.js
└─ specs


To enable manual automation a front matter block is used at the beginning of the spec. The header section below defines a before fixture, which requires successful execution before test cases can be manually executed.

A fixture is used to execute serverless automation, which sets the state of the spec before manual test case execution begins.

The specs/ file contains the following content:

name: github::fixture
description: example input
a: one
b: two

# Use Setup Fixture
This is a manual test.

## Test Case One
Some description here.

* check this
* check that

## Test Case Two
Some description here.

* check this
* check that


In this example, we are using a GitHub Workflow to run handler.js, which implements the required setup.

The .github/workflows/fixture.yml file contains the following content:

name: Testspace
description: 'Function name'
required: true
description: 'Function input-payload'
required: true
description: 'Function execution-context'
required: true
IN_NAME: ${{ }}
IN_PAYLOAD: ${{ github.event.inputs.payload }}
IN_CONTEXT: ${{ github.event.inputs.context }}
if: == 'fixture'
runs-on: ubuntu-latest
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
node-version: 16
- name: Call Script implementing setup fixture
run: node ./.github/workflows/handler.js


In our example, a generic handler will be implemented in JavaScript, but the concept applies to all languages supported by GitHub Actions.

The generic handler being used simply logs the input parameters.

The .github/workflows/handler.js file contains the following content:

function handler(payload) {

console.log("SETUP Handler running ..");
console.log("Payload: ", payload.a, payload.b);



The current test specs listing reflects the status of previous sessions and the new Use Setup Fixture spec (defined in specs/ spec file).

To execute click on the Use Setup Fixture spec.

Click on the START button to trigger the automation. While running a spinning icon will appear.

At this point, all test cases can be executed. Once the selected cases have been executed, the session can be completed and any teardown fixures would execute as well.


Testspace supports integrating automation with manual testing. The following are some key benefits:

  • Reduce manual execution time. Fixturing can leverage automation for tedious and redundant setup/teardown requirements versus human execution.
  • Deploy "hybrid testing" leveraging automation and human observations.
  • Minimize IT setup for Human testers. All testing, including automation, is executed in the context of a web browser.
  • Maintain test specs and automation in the same repo.