You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this PR, pay attention to the change in DynamicDataAttribute.cs.
Before the changes, DynamicDataAttribute.GetData would always work and use reflection.
After the change, DynamicDataAttribute will use DynamicDataProvider.Instance.GetData, but DynamicDataProvider.Instance is set by the adapter. So, when the adapter isn't used, this fails because DynamicDataProvider.Instance is null:
??thrownewInvalidOperationException($"Dynamic data provider is not set, it should be set by MSTest adapter. "+
$"If you are seeing this error, you are using Test Framework without Test Adapter, and your adapter should set {nameof(DynamicDataProvider)}.{nameof(Instance)}. In MSTestAdapter, this happens when PlatformServiceProvider.Instance is called.");
Worse, the exception says:
If you are seeing this error, you are using Test Framework without Test Adapter, and your adapter should set DynamicDataProvider.Instance
However, DynamicDataProvider is even internal.
AB#2342253
The text was updated successfully, but these errors were encountered:
@Evangelink Adding to 3.7.1 for now. We will discuss on Monday depending on how much time is needed to fix and will evaluate if we make it part of 3.7.1, or if we will not delay 3.7.1 further and make this part of 3.7.2
This regression is likely caused by #3801
In this PR, pay attention to the change in
DynamicDataAttribute.cs
.Before the changes, DynamicDataAttribute.GetData would always work and use reflection.
After the change, DynamicDataAttribute will use
DynamicDataProvider.Instance.GetData
, butDynamicDataProvider.Instance
is set by the adapter. So, when the adapter isn't used, this fails because DynamicDataProvider.Instance is null:testfx/src/TestFramework/TestFramework/Attributes/DataSource/DynamicDataProvider.cs
Lines 12 to 14 in f2de560
Worse, the exception says:
However, DynamicDataProvider is even internal.
AB#2342253
The text was updated successfully, but these errors were encountered: