Last active
November 21, 2018 12:01
-
-
Save ugnb/a6ca7df09abcdd64eaf6e91a98640e3b to your computer and use it in GitHub Desktop.
DotNet Core tests reporting with JUnitTestLogger in Bitbucket Pipelines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: microsoft/dotnet:2.1-sdk-alpine | |
pipelines: | |
default: | |
- step: &testsStep | |
name: Tests | |
caches: | |
- dotnetcore | |
script: | |
- export PROJECT_NAME=relative/path/to/tests/project | |
- export REPORTS_REL_PATH=./test-reports/build_${BITBUCKET_BUILD_NUMBER} | |
- export REPORTS_PATH=./${PROJECT_NAME}/test-reports/build_${BITBUCKET_BUILD_NUMBER} | |
- dotnet restore | |
- dotnet build --no-restore $PROJECT_NAME | |
- dotnet test --no-build $PROJECT_NAME --test-adapter-path:. --logger:"junit;LogFilePath=$REPORTS_REL_PATH/junit.xml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment