Code changes to fix PTR duplicate tests issue in linux #4427
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Statement: Vstest Publish Test Result for DataDriven tests for different inputs is showing against the same name, although in trx file their names are shown correctly.
Changes Summary: After Mstest Adapter changes from hierarchical to flat structure for data driven tests. DataDriven tests for different inputs is shown with duplicate names. The duplicate is because AutomatedTestName attribute is still getting generated as same for all the different inputs for a given testmethod and as a result only one entry is getting created in TestCaseReference table (This is the behaviour for hierarchical structure: one entry in testcasereference table and tests with different inputs as subresults). Expected behaviour is that each testcase should have one entry in the TestCaseReference table and in the flat structure every test with a data input is considered a separate testcase and there are no subresults for any testcase.
Notable change: Code changes are made to generate different AutomatedTestName for each testcase in DataDriven tests for flat structure. The existing hierarchical behaviour should not be affected by this change.
Assumptions: NA
Problem Statement: Vstest Publish Test Result for DataDriven tests for different inputs is showing against the same name, although in trx file their names are shown correctly.
Changes Summary: After Mstest Adapter changes from hierarchical to flat structure for data driven tests. DataDriven tests for different inputs is shown with duplicate names. The duplicate is because AutomatedTestName attribute is still getting generated as same for all the different inputs for a given testmethod and as a result only one entry is getting created in TestCaseReference table (This is the behaviour for hierarchical structure: one entry in testcasereference table and tests with different inputs as subresults). Expected behaviour is that each testcase should have one entry in the TestCaseReference table and in the flat structure every test with a data input is considered a separate testcase and there are no subresults for any testcase.
Notable change: Code changes are made to generate different AutomatedTestName for each testcase in DataDriven tests for flat structure. The existing hierarchical behaviour should not be affected by this change.
Assumptions: NA
Test Assurances: TODO: testing in progress