Skip to content

Is there a way to enable test coverage with thresholds using the nx test executor? #185

Answered by AgentEnder
dasco144 asked this question in Q&A
Discussion options

You must be logged in to vote

There are a couple ways to solve this in the context of the nx monorepo. To get these to work as is, without changes on the nx-dotnet side, you can set some targets up in workspace.json / project.json files that use @nrwl/workspace:run-commands as the executor. The docs for that are here: https://nx.dev/l/a/workspace/run-commands-executor. You may use dotnet msbuild \t:TestWithReport as the command for example, with cwd set to the apps root.

I'll likely work on an msbuild executor in the near future, but would welcome a PR for one if anyone is watching 🚀

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dasco144
Comment options

@AgentEnder
Comment options

@dasco144
Comment options

Answer selected by dasco144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants