Skip to content

Conversation

@clrudolphi
Copy link
Contributor

🤔 What's changed?

V3.3.2 modified how we emit source line information for MsTestv4 by adding an argument value to the list of arguments provided to the TestMethod attribute. This inadvertently interfered with the mechanism we were using to obtain the friendly DisplayName property value from the attribute.

Investigation also uncovered that the MsTestV4GeneratorProvider was released without covering tests. Had we had them, this problem would have been uncovered at the time we added that class.
Tests for the MsTest GeneratorProvider have been updated to include testing the v4 generator provider.

⚡️ What's your motivation?

Fixes #1013

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "[vNext]" section of the CHANGELOG, linking to this pull request & included my GitHub handle to the release contributors list.

This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.

v3.3.2 generates a callerLineNumber attribute into the constructor call of the TestMethod attribute. This caused an interaction bug with the V2 base class which assumed that the first item in the list of arguments was the display name.
Fixed by specifically searching the argument list for the item that is the DisplayName property.
This further exposed that the V2/V3 generator assumed that the display name was constructor argument, not a Property.
The V4 generator had no unit tests, so refactored the V2 tests to run the same suite for both versions.
…ame from the TestMethod attribute declaration.
@clrudolphi clrudolphi requested a review from gasparnagy January 22, 2026 15:22
Copy link
Contributor

@gasparnagy gasparnagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx.

@gasparnagy gasparnagy merged commit 9dcf34b into main Jan 27, 2026
8 checks passed
@gasparnagy gasparnagy deleted the Fix1013_MsTestv4_disableFriendlyNames_doesnt_work branch January 27, 2026 09:56
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

Successfully merging this pull request may close these issues.

disableFriendlyTestNames doesn't work in Reqnroll 3.3.2

3 participants