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

Trx changes for fqdn mapping in test method name #2259

Merged
merged 2 commits into from
Dec 2, 2019

Conversation

vagisha-nidhi
Copy link
Contributor

@vagisha-nidhi vagisha-nidhi commented Nov 29, 2019

Fixing data driven xunit method name.

image
image

The execution id and the test Id is linking attributes between the 2 nodes. The result node will remain as is and it today contains the display name for the result which translates to test run title in the pipeline.
In the Unit Test definition node the method name of xunit test is "XUnitTestProject.UnitTest1.Test1(a: 1)" which technically speaking is not correct. It has to be "XUnitTestProject.UnitTest1.Test1" and we are not losing any data this way as the result display name still remains the same.

This fix is taken as part of running the data driven xunit tests in pipeline

@@ -24,7 +24,8 @@ public TestMethod(string name, string className)
{
Debug.Assert(!string.IsNullOrEmpty(name), "name is null");
Debug.Assert(!string.IsNullOrEmpty(className), "className is null");
this.name = name;
this.name = name.StartsWith(className) ? name.Remove(0, $"{className}.".Length) : name;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do this in the Converter itself ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. done

@vagisha-nidhi vagisha-nidhi merged commit daf9b36 into microsoft:master Dec 2, 2019
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.

2 participants