Romanx / Cake.Coverlet

Coverlet extensions for Cake Build
MIT License
40 stars 15 forks source link

Coverlet does not generate any output files in cake #30

Closed soroshsabz closed 4 years ago

soroshsabz commented 4 years ago

ITNOA

I have a project in GitHub and have a cake file that use some code like below


        var coverletSettings = new CoverletSettings {
            CollectCoverage = true,
            CoverletOutputFormat = CoverletOutputFormat.opencover,
            CoverletOutputDirectory = Directory(@"./coverage-test/"),
            CoverletOutputName = coverageResultsFileName
        };

        DotNetCoreTest(testProject, settings, coverletSettings);

but when i run test target, we cannot found any coverage-test directory?

Did you can help me? what is my problem?

thanks

Romanx commented 4 years ago

Hi there, I can't see anything wrong with the settings. Is coverlet outputting anything to the console when the tests are run?

soroshsabz commented 4 years ago

@Romanx Thanks very much for reply, As you can see in AppVeyor we cannot found coverage-test, in any directory?

dweggemans commented 4 years ago

If you forget to add coverlet.msbuild to the test project you get this behavior

soroshsabz commented 4 years ago

After I added this package I got a "Coverlet.MSbuild.Tasks.CoverageResultTask" task was not given a value for the required parameter "InstrumenterState"

soroshsabz commented 4 years ago

Thanks to @MarcoRossignoli I can resolved my issue