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

MSTest v3 Breaking Changes #1274

Closed
Evangelink opened this issue Sep 23, 2022 · 10 comments
Closed

MSTest v3 Breaking Changes #1274

Evangelink opened this issue Sep 23, 2022 · 10 comments
Assignees
Milestone

Comments

@Evangelink
Copy link
Member

Evangelink commented Sep 23, 2022

Description

The goal of this ticket is to announce the upcoming breaking changes in MSTest v3.

Implemented

@Evangelink Evangelink added this to the 3.0.0 milestone Sep 23, 2022
@Evangelink Evangelink self-assigned this Sep 23, 2022
@Evangelink Evangelink pinned this issue Sep 23, 2022
@adcloeshelle
Copy link

@Evangelink - Do you have a rough timeline on when these changes will be released? My team is particularly excited about #1286 so we can upgrade to the latest versions while keeping the old Test ID behavior. Thanks for any information you can provide!

@Evangelink
Copy link
Member Author

Hi @adcloeshelle, sadly we don't have any estimate at the moment. The ticket you are mentioning will fix a lot of issues in the backlog so we are actually reducing the scope of v3 so we can ship it as fast as possible. When I manage to get some release date I will ping here and set some date in the milestone too.

@Evangelink
Copy link
Member Author

@adcloeshelle We have published some pre-release version if you want to test it out and confirm this is fixing issues for you.

@adcloeshelle
Copy link

Thanks! I work with @Cjewett and we will test this out.

@jimmylewis
Copy link
Contributor

Probably worth calling out explicitly: #1332 mentioned above breaks existing tests that have more than 16 arguments passed via DataRow. (Yes, this was a real issue while upgrading 😭).

@Evangelink
Copy link
Member Author

Hey @jimmylewis, sorry, I will update the release note to make it more explicit. Out of curiosity how many parameters are you passing? You can "fix" this change by wrapping your parameters in some array.

To give you a bit of context on this change. The older MSTest were using object, params object[] signature which was causing issue when trying to pass 2 arrays. Looking at xUnit and NUnit it seems they are using params object[] signature but doing so it's becoming impossible to pass string array as argument (compiler error). After some investigation, we decided to follow the pattern used by runtime for Action (with 16 overloads). Looking up online on GitHub we didn't see many repositories using this many parameters and thought it was "relatively" safe.

@jimmylewis
Copy link
Contributor

We had about a half-dozen cases of 17 and 18 parameters. I was able to refactor them down to 16, but it wasn't clear at first why they'd suddenly stopped building other than the error that DataRow didn't have a constructor taking 18 arguments.

Thanks for making the note clearer, hopefully my team is an outlier and few others encounter this. 😁

@cremor
Copy link

cremor commented Jan 20, 2023

@Evangelink FYI, the changelog contains a few breaking changes that are not mentioned here:

[breaking change] Unify DeploymentDirectory location across target frameworks #1414
[breaking change] Add class/assembly cleanup/init messages to first/last test #1390
[breaking change] Unwrap real exception from TargetInvocationException #1254
[breaking change] Remove Assert.AreEqual/AreNotEqual overloads with object object #1429

The last one is especially important because of #1550

There is also one the other way around. This issue mentions #1431, but that is not marked as a breaking change in the changelog (where it is linked as #1430).

@Evangelink
Copy link
Member Author

Oh good catch @cremor, I will update that.

@Evangelink
Copy link
Member Author

@cremor sorry for the delay but now ticket and changelog have been updated. Thanks again for spotting the missing notification!

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

No branches or pull requests

4 participants