microsoft/coyote

Could not load file or assembly Microsoft.VisualStudio.TestPlatform.TestFramework

jhwj9617 opened this issue · 0 comments

In the AccountManager sample, I replaced the unit testing framework from xUnit to MSTest.

I smply changed to using Microsoft.VisualStudio.TestTools.UnitTesting; and corresponding assert calls.

When following the same Coyote CLI steps (dotnet build/rewrite/test), I ran into the following error. Why is this behavior different compared to the xUnit case.

... Setting up the 'Microsoft.Coyote.Samples.AccountManager.Program.TestConcurrentAccountCreation' test:
..... Using the random[seed:3855427513] exploration strategy.
... Running test iterations:
..... Iteration #1
..... Iteration #1 found bug #1
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.Coyote.Samples.AccountManager.Program.TestConcurrentAccountCreation()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Coyote.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Coyote.Samples.AccountManager.Program.TestConcurrentAccountCreation()
   at Microsoft.Coyote.Runtime.CoyoteRuntime.<>c__DisplayClass56_0.<RunTestAsync>b__0()

I understand I could use the TestingEngine instead, but would like to consider the possibility of using the CLI as well for MSTest.