Reputation: 4255
I'm using Visual Studio 2015 Enterprise with Chutzpah to test my javascript code. I get the error below continuously.
It does not matter whether the parallel is set up to 1 or 8. The error is the same.
As a consequence, obviously, the test explorer window does not list the tests described in that file.
I'm not using references in the spec files, they are in Chutzpah.json file.
Is there anything what is needed to figure out how to fix this?
Update: it works fine with references, but, the reason why I converted my project is that I don't want to copy-pasting the references...
------ Discover test started ------
Error: System.IO.IOException: The process cannot access the file '..path...\_Chutzpah.f96875093f45a5e0d78d2e58faf97799.test.html' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at System.IO.File.WriteAllText(String path, String contents)
at Chutzpah.Wrappers.FileSystemWrapper.Save(String path, String contents) in c:\Dev\chutzpah\Chutzpah\Wrappers\FileSystemWrapper.cs:line 172
at Chutzpah.TestHarnessBuilder.CreateTestHarness(TestContext testContext, TestOptions options) in c:\Dev\chutzpah\Chutzpah\TestHarnessBuilder.cs:line 74
at Chutzpah.TestRunner.<>c__DisplayClassc.<ExecuteTestContexts>b__b(TestContext testContext) in c:\Dev\chutzpah\Chutzpah\TestRunner.cs:line 291
While Running:...path...\\oauthauthenticationdataservice.spec.js
Error: Error opening ...path.../_Chutzpah.f96875093f45a5e0d78d2e58faf97799.test.html: No such file or directory
While Running:...path...\oauthauthenticationdataservice.spec.js
Error: Unknown error occurred when executing test file. Received exit code of 2
While Running:...path...\oauthauthenticationdataservice.spec.js
========== Discover test finished: 0 found (0:00:01.3607047) ==========
Upvotes: 3
Views: 619
Reputation: 16762
We had a long conversation on the github page about this issue. And it is a combination of a bug in the Visual Studio test adapter framework and its interaction with resharper. If he disabled resharped the issue disappeared. We are still working to find a more permanent solution (outside of the root bug being fixed in Visual Studio)
Upvotes: 4