0

I am writing an C# application to read XML using "data driven method" as described in TAEF documentation.

https://msdn.microsoft.com/en-us/library/windows/hardware/hh439689(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/hardware/hh439591(v=vs.85).aspx

I have VSTS dll loaded and also TE.Managed.dll loaded in my references and in TAEF we set this TestContext property so you can access the data through it.

public TestContext TestContext

{

get { return m_testContext; }

set { m_testContext = value; }

}

At runtime when I run the testcase on the phone, I am getting this argument error

command - cmdd te.exe "c:\data\test\bin\UnitTestProject1.dll /select:@TestId='1004'"

Test Authoring and Execution Framework v4.16m for arm

Error: System.ArgumentException: Object of type 'WEX.TestExecution.TestContextImplementation' cannot be converted to type 'Microsoft.VisualStudio.TestTools.UnitTesti ng.TestContext'.

Removing all references to WEX.TestExecution is also giving me the same error. Could some one please help me with this !!!????

Thanks in advance.

Shesh
  • 11
  • 3
  • Did you try generating a unit test so the [TestContext is auto defined](https://msdn.microsoft.com/en-us/library/ms404699(VS.80).aspx)? If not give that a go and look for any differences – Jeremy Thompson Sep 29 '15 at 23:22
  • I am still getting the same error. I used instructions from - https://msdn.microsoft.com/en-us/library/ms182527.aspx – Shesh Sep 29 '15 at 23:42

1 Answers1

1

You need to use the TestContext implementation in the Wex.TestExecution.Markup namespace in TE.Managed.dll when using the CoreCLR version of TE.Managed.dll. The CoreCLR version doesn't support the use of the TestContext class from Microsoft.VisualStudio.QualityTools.UnitTests.dll.

Phil Deets
  • 86
  • 4