Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DotCover Report #724

Closed
bjorkstromm opened this issue Mar 1, 2016 · 6 comments
Closed

Add DotCover Report #724

bjorkstromm opened this issue Mar 1, 2016 · 6 comments
Labels
Milestone

Comments

@bjorkstromm
Copy link
Member

Once DotCover Cover command is implemented #722 , there will be use cases for Merge, Report and Delete. https://www.jetbrains.com/dotcover/help/dotCover__Console_Runner_Commands.html

@bjorkstromm
Copy link
Member Author

I was thinking of starting implementing this (or at least Report command). Any objections @patriksvensson?

By adding DotCover Report, I can change my cake-script from:

Task("Run-Unit-Tests")
    .IsDependentOn("Build")
    .Does(() =>
{
    if(isRunningOnTeamCity)
    {
        DotCoverCover(tool => {
            tool.NUnit3("/path/to/*.Test.dll",
                new NUnit3Settings {
                    TeamCity = isRunningOnTeamCity
                });
            },
            coverageResult,
            new DotCoverCoverSettings()
                .WithFilter("+:Foo.*")
        );
    }
    else
    {
        DotCoverAnalyse(tool => {
            tool.NUnit3("/path/to/*.Test.dll",
                new NUnit3Settings {
                    TeamCity = isRunningOnTeamCity
                });
            },
            coverageResult,
            new DotCoverAnalyseSettings {
                ReportType = DotCoverReportType.HTML
            }.WithFilter("+:Foo.*")
        );
    }
})
.Finally(() =>
{
    if(isRunningOnTeamCity)
    {
        TeamCity.ImportDotCoverCoverage(coverageResult, MakeAbsolute(Directory("./tools/JetBrains.dotCover.CommandLineTools/tools")));
    }
});

To:

Task("Run-Unit-Tests")
    .IsDependentOn("Build")
    .Does(() =>
{
    DotCoverCover(tool => {
        tool.NUnit3("/path/to/*.Test.dll",
            new NUnit3Settings {
                TeamCity = isRunningOnTeamCity
            });
        },
        coverageResult,
        new DotCoverCoverSettings()
            .WithFilter("+:Foo.*")
    );
})
.Finally(() =>
{
    if(isRunningOnTeamCity)
    {
        TeamCity.ImportDotCoverCoverage(coverageResult, MakeAbsolute(Directory("./tools/JetBrains.dotCover.CommandLineTools/tools")));
    }
    else
    {
        DotCoverReport(coverageResult, "/path/to/output.html");
    }
});

And eliminate risk of running with different DotCoverSettings on TeamCity vs. Local

bjorkstromm added a commit to bjorkstromm/cake that referenced this issue Aug 11, 2016
bjorkstromm added a commit to bjorkstromm/cake that referenced this issue Aug 11, 2016
bjorkstromm added a commit to bjorkstromm/cake that referenced this issue Aug 12, 2016
bjorkstromm added a commit to bjorkstromm/cake that referenced this issue Oct 13, 2016
gep13 pushed a commit that referenced this issue Oct 19, 2016
@gep13
Copy link
Member

gep13 commented Oct 19, 2016

@mholo65 you mentioned in your last PR that this partially solves this issue. Is there still work that needs to be done in order to close out this issue?

@gep13 gep13 added the Feature label Oct 19, 2016
@gep13 gep13 added this to the v0.17.0 milestone Oct 19, 2016
@bjorkstromm
Copy link
Member Author

@gep13 well, implement Delete and Merge... 😄

  1. Currently, I don't see use case for Delete at least...
  2. Merge might be useful in complex scenarios (if having multiple snapshot files that needs to be merged prior to running TeamCity import or DotCover Report).

@bjorkstromm
Copy link
Member Author

@gep13 as I see it, we could rename this issue and create separate issue for Merge..? Thoughts?

@gep13
Copy link
Member

gep13 commented Oct 19, 2016

@mholo65 sounds good to me.

I am just signing off for the night. Can I ask that you do that, and then close this issue when you are happy?

Thanks!

@bjorkstromm bjorkstromm changed the title Add DotCover Merge, Report and Delete support Add DotCover Report Oct 19, 2016
@bjorkstromm
Copy link
Member Author

Implemented in #1153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants