Closed marlonbraga closed 1 year ago
I see the problem. The use of runner assumes that the code under test has already been instrumented for coverage.
What you are aiming for is what I termed "Instrument now, test later" in the Modes of Operation wiki page. That mode allows you the extra post-processing options exposed through the runner (or "collect") stage.
Done raw in GitHub actions that would look like
- name: 🚧Prepare with AltCover
run: ./packages/altcover.8.6.45/tools/net472/AltCover.exe -i ConsoleApp.Test/bin
- name: 🧪Test and Coverage AltCover
run: ./packages/altcover.8.6.45/tools/net472/AltCover.exe Runner -x='packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe' -r='ConsoleApp.Test/bin/__Instrumented' -t=9 -w . --summary=O -- "ConsoleApp.Test/bin/__Instrumented/ConsoleApp.Test.dll"
where the 🚧 stage will probably want to add some filter parameters e.g. to exclude xunit assemblies from the coverage collection.
Hello,
I have got some errors when try use AltCover in Github Actions. This project in NET framework 4.8
I tried run tests that way:
./packages/altcover.8.6.45/tools/net472/AltCover.exe Runner -x='packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe' -r='ConsoleApp.Test/__Instrumented' -t=9 -w . --summary=O -- "__Instrumented/ConsoleApp.Test/bin/ConsoleApp.Test.dll"
It thwon a error
Any idea about why this behaviour is so diferent from running in local environment? How should I use AltCover in Github Actions?
That is the YML used on github actions and the output
Github action workflow
The return was: