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

DotNetCoreTest fails to use XUnit2Settings on Cake 0.27 #2136

Open
erik-am opened this issue Apr 24, 2018 · 4 comments
Open

DotNetCoreTest fails to use XUnit2Settings on Cake 0.27 #2136

erik-am opened this issue Apr 24, 2018 · 4 comments

Comments

@erik-am
Copy link
Contributor

erik-am commented Apr 24, 2018

What You Are Seeing?

I'm using the DotNetCoreTest command using both DotNetCoreTestSettings as well as Xunit2Settings:

DotNetCoreTest(dotnetTestSettings, project, xunitSettings);

which results in the following exception:

Error: One or more errors occurred.
        Method not found: 'Cake.Common.Tools.XUnit.ParallelismOption Cake.Common.Tools.XUnit.XUnit2Settings.get_Parallelism()'.

What is Expected?

Expected is that the tests will be executed.

What version of Cake are you using?

The error occurs in 0.27.0 and 0.27.1.
The error does not occur in 0.26.1.

I think the regression has been introduced by the change of ParallelismOption to a nullable.

See https://github.com/cake-build/cake/pull/2040/files#diff-133ec58ad83fd466eed3b129d32daefaL84

Are you running on a 32 or 64 bit system?

64 bit

What environment are you running on? Windows? Linux? Mac?

Windows

Are you running on a CI Server? If so, which one?

Yes, Jenkins.

How Did You Get This To Happen? (Steps to Reproduce)

See "What You Are Seeing?".

@kcamp
Copy link
Contributor

kcamp commented Apr 24, 2018

@erik-am It would help to have more of the stack trace and/or verbose output, but it appears that the exception is coming out of the Cake.Incubator assembly at the method below, right?

void DotNetCoreTest(this ICakeContext context, FilePath project, XUnit2Settings xunitSettings)

@erik-am
Copy link
Contributor Author

erik-am commented Apr 25, 2018

Thank you @kcamp, indeed it seems the issue is in Cake.Incubator. So, Cake 0.27.0 did include a breaking change in contrast to the release notes,

For now, I changed my usage of DotNetCoreTest, so that I'm using the method provided by Cake itself instead of the extension. Thanks for pointing me in the right direction! 👍

@gep13
Copy link
Member

gep13 commented Apr 25, 2018

@wwwlicious are you in a position to take a look at this?

@erik-am unfortunately, this does look like it was an unintended breaking change in Cake 0.27.0 😢

@cake-build/cake-team FYI...

@wwwlicious
Copy link
Contributor

@gep13 I'll have a look..

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

No branches or pull requests

4 participants