Skip to content

MSTest.Extensions 报空引用异常,待进一步调查 #24

@JasonGrass

Description

@JasonGrass

使用的时候,发现如下错误,使用传统的 [TestMethod] 没有问题。

还没有进一步调查,回头弄个最小 demo 复现。

 矩阵水平镜像
   源: ImagePixelDataHandleTest.cs 行 16
   持续时间: 5 毫秒

  消息: 
执行测试时引发了异常。如果使用的是扩展 TestMethodAttribute,请与供应商联系。
错误消息: Object reference not set to an instance of an object.,
堆栈跟踪:    
   at MSTest.Extensions.Utils.ReflectionExtensions.GetField(Object source, String fieldName)
   at MSTest.Extensions.Core.TestMethodProxy.ReflectionMemberInit()
   at MSTest.Extensions.Core.TestMethodProxy..ctor(ITestMethod testMethod)
   at MSTest.Extensions.Contracts.ContractTestCaseAttribute.CreateTestMethodProxy(ITestMethod testMethod)
   at MSTest.Extensions.Contracts.ContractTestCaseAttribute.Execute(ITestMethod testMethod)
   at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteTest(TestMethodInfo testMethodInfo) in /_/src/Adapter/MSTest.TestAdapter/Execution/TestMethodRunner.cs:line 418

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