Skip to content

Latest commit

 

History

History

AllureDockerCSharpSpecFlow3Example

C# SPECFLOW 3 DEMO PROJECT USING ALLURE

INSTALLATION

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin
  • Install dependencies executing next command:
./nuget.exe restore AllureDockerCSharpSpecFlow3Example.sln -Verbosity Detailed -NonInteractive
  • Build project executing next command:
msbuild.exe AllureDockerCSharpSpecFlow3Example.sln

USAGE

Execute Allure Docker Service from this directory

docker-compose up -d allure allure-ui

Note:

  • In the example we are using this directory ${PWD}/AllureDockerCSharpSpecFlow3Example/bin/Debug/allure-results. If you clean your build the allure-results directory will be removed, then docker will lose the reference of that volume. If you want to avoid that problem move the allure-results directory in another directory.

Each time you run tests, the Allure report will be updated.

Execute tests:

./AllureDockerCSharpSpecFlow3Example/bin/Debug/SpecFlowPlusRunner/net461/SpecRun.exe run default.srprofile --baseFolder ./AllureDockerCSharpSpecFlow3Example/bin/Debug --filter "@allure"

Note:

System.IO.FileLoadException : Could not load file or assembly 'System.Threading.Tasks.Extensions

Workaround: After building (before running tests), copy the System.Threading.Tasks.Extensions.dll to the SpecFlowPlusRunner directory

Copy-Item AllureDockerCSharpSpecFlow3Example/bin/Debug/System.Threading.Tasks.Extensions.dll  -Destination  .\AllureDockerCSharpSpecFlow3Example\bin\Debug\SpecFlowPlusRunner\net461\

See documentation here: