You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Run SpecFlow Tests
v1.1.0
- A Github action to run SpecFlow tests and create a SpecFlow+ LivingDoc artifact
- SpecFlow projects must have a Package Reference to SpecFlow.Plus.LivingDocPlugin
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
- 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