Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-square

GitHub Action

Run SpecFlow Tests

v1.1.0

Run SpecFlow Tests

check-square

Run SpecFlow Tests

A Github Action to run SpecFlow tests and create a LivingDoc

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run SpecFlow Tests

uses: cryptic-wizard/run-specflow-tests@v1.1.0

Learn more about this action in cryptic-wizard/run-specflow-tests

Choose a version

Description

Tests

.NET

.NET Core

Usage

Minimal:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
  with:
    dotnet-version: '3.1.x'
- uses: actions/cryptic-wizard/run-specflow-tests@v1.1.0
  with:
    test-assembly-path: MySpecflowProject/bin/Debug/netcoreapp3.1
    test-assembly-dll: MySpecflowProject.dll
    test-execution-json: TestExecution.json
    output-html: MyTestResults.html
 - uses: actions/upload-artifact@v2
  if: success() || failure()
  with:
    name: SpecflowTestResults
    path: MyTestResults.html

Test Multiple Operating Systems in the Same Workflow:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    
  steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-dotnet@v1
    with:
      dotnet-version: '3.1.x'
  - uses: actions/cryptic-wizard/run-specflow-tests@v1.1.0
    with:
      test-assembly-path: MySpecflowProject/bin/Debug/netcoreapp3.1
      test-assembly-dll: MySpecflowProject.dll
      test-execution-json: TestExecution.json
      output-html: ${{ matrix.os }}.html
  - uses: actions/upload-artifact@v2
    if: success() || failure()
    with:
      name: SpecflowTestResults
      path: ${{ matrix.os }}.html

Test Multiple Frameworks in Separate Workflows:

Optional parameters:

- uses: actions/cryptic-wizard/run-specflow-tests@v1.1.0
  with:
    test-assembly-path: MySpecflowProject/bin/Debug/netcoreapp3.1
    test-assembly-dll: MySpecflowProject.dll
    test-execution-json: TestExecution.json
    output-html: MyTestResults.html
    build-verbosity: normal
    test-verbosity: minimal
    dotnet-version: netcoreapp3.1
    no-build: true
    logger: trx
    logger-file-name: ../../MyTestResults.trx

LivingDoc Output Example

SpecflowLivingDoc

SpecflowAnalytics

Planned Features

  • Set working folder for test-assembly-dll and test-execution-json (implemented v1.1.0)
  • Allow other test loggers to be run in addition to SpecFlow (implemented v1.1.0)

Features planned when 'uses' keyword is implemented in composite actions

  • Checkout automatically
  • Setup dotnet automatically
  • Upload artifacts automatically
  • Dotnet framework matrix testing

Tools

License