Add Heroku Testpack API support
This adds initial Testpack API support.
I have made a TAP logger for Heroku's preferred output format but it's not required for actual compliance so will defer that to a future pull request.
Hi @jbowtie,
Thank you for your contribution💪
We need to think about how to avoid duplication between compile, test and test-compile
I've been looking at how other buildpacks do it and it looks like the typical approach is to have test-compile explicitly set some environment variables and then delegate to compile -- that eliminates the bulk of the duplication.
The test script needs a bit more thought because as currently written it fails to locate the dotnet executable; I need a better understanding of what the environment looks like when it gets invoked.
This should be much clearer with less duplication.
I've been testing this in our Gitlab CI pipeline which runs within the herokuish project. Our project uses the coverlet package for collecting test coverage.
This PR caused the buildpack to correctly build and run the tests. 👍 However, coverlet was unable to properly collect the test coverage - there's something about being built in one directory and then running the tests in a different directory that it doesn't like. I'm not a .NET developer so I was unable to diagnose it further than that.
I was able to make it work properly by moving the dotnet build command from test-compile -> test, like so:
dotnet build $TEST_PROJECT_FILE --configuration Debug
dotnet test -v q --no-build
I'm not sure if I'm doing something wrong or if the setup in this PR isn't generic enough.
@jbowtie What is needed before this can be merged? Are you able to reproduce @stormsilver 's regarding collecting test coverage?
We've been needing testpack support for quite some time. Is there anything I can do to help get this merged?
@jincod
Hi there,
I've merged branch @jbowtie and done some modifications. I decided don't change main compile because it is very stable now and I duplicated compile logic to test-compile.
Also we don't need specify test-project-file. dotnet build and dotnet test should be enough.
Could you check please https://github.com/jincod/dotnetcore-buildpack#jbowtie-add-testpack-api?
Hi there,
Could someone help with that https://github.com/jincod/dotnetcore-buildpack/issues/98#issuecomment-577249131?