Skip to content

question about letting cake script to keep going #3027

Answered by devlead
minoseah629 asked this question in Q&A
Discussion options

You must be logged in to vote

As @pascalberger writes, specifying that a test report should be created and parsing it is probably the best option.

Func<bool> HandleExitCode property could indeed be used to handle the result instead of the default exit code handling by creating a helper method.

It could look something like below

Task("Run-Unit-Tests")
    .Does(context => {
        FilePath xmlReportPath = context.MakeAbsolute(context.File("./artifacts/TestReport.xml"));
        XUnit2(
            "MyTests/bin/Debug/net472/MyTests.dll",
            new XUnit2Settings {
                XmlReport = true,
                ReportName =  xmlReportPath.GetFilenameWithoutExtension().FullPath,
                OutputDirectory = x…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@minoseah629
Comment options

@augustoproiete
Comment options

@minoseah629
Comment options

@minoseah629
Comment options

@augustoproiete
Comment options

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