You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It's very nice having code coverage for my unit tests, but it slows things down enough that I'd like an easy way, maybe a parameter that could be passed to build.fsx, to turn it off. At the moment I'm turning it off and back on by commenting out three lines in the build script, but I'd rather have a command-line parameter.
To give some idea of the slowdown I'm seeing, I have a test suite that took 20.1 seconds to run in .Net Core, and 19.7 seconds in Mono, when I had the code coverage lines commented out. Once I turned code coverage back on, the same test suite on the same computer (a pretty powerful laptop) took 3.33 minutes, which is almost exactly 200 seconds, on both .Net Core and Mono. That's a 10x slowdown. Another test suite had a particularly long-running test that takes about 40 minutes to complete (it creates a huge data structure and runs all kinds of tests on it, and since it's an FsCheck test, about a hundred huge data structures get created). When I ran it with code coverage turned on, it took 2.9 hours, which works out to about a 4.5x slowdown.
Describe the solution you'd like
An "official" way, like a command-line parameter that the build script can parse, to turn code coverage off. It's useful to have it turned on by default when you install a new project, but it's also nice to be able to turn it off while you're running your unit tests over and over chasing down a bug.
Describe alternatives you've considered
Currently I can comment out the three AltCover lines in the DotnetTest target, and that's enough to do what I want. (The GenerateCoverageReport target would fail later on, of course, but while I'm bug hunting I'm just running the DotnetTest target over and over).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It's very nice having code coverage for my unit tests, but it slows things down enough that I'd like an easy way, maybe a parameter that could be passed to
build.fsx
, to turn it off. At the moment I'm turning it off and back on by commenting out three lines in the build script, but I'd rather have a command-line parameter.To give some idea of the slowdown I'm seeing, I have a test suite that took 20.1 seconds to run in .Net Core, and 19.7 seconds in Mono, when I had the code coverage lines commented out. Once I turned code coverage back on, the same test suite on the same computer (a pretty powerful laptop) took 3.33 minutes, which is almost exactly 200 seconds, on both .Net Core and Mono. That's a 10x slowdown. Another test suite had a particularly long-running test that takes about 40 minutes to complete (it creates a huge data structure and runs all kinds of tests on it, and since it's an FsCheck test, about a hundred huge data structures get created). When I ran it with code coverage turned on, it took 2.9 hours, which works out to about a 4.5x slowdown.
Describe the solution you'd like
An "official" way, like a command-line parameter that the build script can parse, to turn code coverage off. It's useful to have it turned on by default when you install a new project, but it's also nice to be able to turn it off while you're running your unit tests over and over chasing down a bug.
Describe alternatives you've considered
Currently I can comment out the three AltCover lines in the DotnetTest target, and that's enough to do what I want. (The GenerateCoverageReport target would fail later on, of course, but while I'm bug hunting I'm just running the DotnetTest target over and over).
The text was updated successfully, but these errors were encountered: