-
Install Microsoft Visual Studio 2019: https://visualstudio.microsoft.com/vs/
-
Add
msbuild.exe
path toPATH
enviroment variable (Path according your local installation). Example:
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
Execute Allure Docker Service from this directory
docker-compose up -d allure allure-ui
-
Verify if Allure API is working. Go to -> http://localhost:5050/allure-docker-service/latest-report
-
Verify if Allure UI is working. Go to -> http://localhost:5252/allure-docker-service-ui/
Note:
- In the example we are using this directory
${PWD}/AllureDockerCSharpSpecFlow3Example/bin/Debug/allure-results
. If you clean your build theallure-results
directory will be removed, then docker will lose the reference of that volume. If you want to avoid that problem move theallure-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:
- If this error appears: https://github.com/SpecFlowOSS/SpecFlow/issues/2126
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: