Skip to content

No unique GUIDs w/ [DataTestMethod] #450

Description

@JDCain

Description

Tests using [DataTestMethod] don't generate unique guids per test instance.

I noticed this as I was using [DataTestMethod] to run the same Selenium Test with different browsers. When running the dataCollector://microsoft/VideoRecorder/1.0 was recording every datatestmethod run within the same wmv file.

Steps to reproduce

Use any ITestLogger on the command line of vstest.console or a datacollector such as video datacollector://microsoft/VideoRecorder/1.0 in a runsettings file.

Using this repo:
https://github.com/JDCain/DynamicTestGuid
Command: vstest.console ClassLibrary1.dll /logger:ClassLibrary2 /settings:example.runsettings

Expected behavior

Starting test execution, please wait...
72b4a25d-970d-1351-338b-5203ac58b6ad
Passed TestMethod0
[Expected Unique GUID]
Passed Test_Add_DynamicData_Method
[Expected Unique GUID]
Passed Test_Add_DynamicData_Method (1,1,2)
[Expected Unique GUID]
Passed Test_Add_DynamicData_Method (12,30,42)
[Expected Unique GUID]
Passed Test_Add_DynamicData_Method (14,1,15)

Expected: TestResults folder to have Folder for each run of DynamicData_Method

Actual behavior

Starting test execution, please wait...
72b4a25d-970d-1351-338b-5203ac58b6ad
Passed TestMethod0
7c7826b6-350f-da93-57ca-15c3d29d9f35 [Duplicate GUID]
Passed Test_Add_DynamicData_Method
7c7826b6-350f-da93-57ca-15c3d29d9f35 [Duplicate GUID]
Passed Test_Add_DynamicData_Method (1,1,2)
7c7826b6-350f-da93-57ca-15c3d29d9f35 [Duplicate GUID]
Passed Test_Add_DynamicData_Method (12,30,42)
7c7826b6-350f-da93-57ca-15c3d29d9f35 [Duplicate GUID]
Passed Test_Add_DynamicData_Method (14,1,15)

TestResults folder has one results folder for DynamicData_Method

Environment

vstest.console.exe: Version 15.7.2
Windows 10: 10.0.16299 Build 16299
MSTest.TestFramework 1.3.2
MSTest.TestPlatform.ObjectModel 15.7.2

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions