mmanela / chutzpah

Chutzpah is an open source JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha and TypeScript.
http://mmanela.github.io/chutzpah/
Apache License 2.0
550 stars 142 forks source link

Parallel run fails with Error opening _Chutzpah #812

Closed nohwnd closed 2 years ago

nohwnd commented 2 years ago

In https://github.com/microsoft/vstest repo we recently migrated to running tests in parallel and we are seeing issues with our chutzpah integration tests saying that:

"Error: Error opening C:/p/vstest/test/TestAssets/_Chutzpah.c4a6585ae69f811e39c559f59b2bcca71f588eea.test.html: 
No such file or directory
While Running:C:\\p\\vstest\\test\\TestAssets\\test.js

This only happens when tests run in parallel (multiple testhost processes at the same time, against a single js file).

I am guessing the issue is that:

I can easily solve this by copying that js file into temp folder, and everything works reliably. But I am wondering if there is a simple way to fix this on your side? And if you would be interested in fixing this?

Thanks! 🙂

mmanela commented 2 years ago

Thanks for reaching out @nohwnd. Chutzpah was not designed to support this scenario. It can handle parallelism on its own but it is assuming a given test context is only being executed by one process.

That said, it should be simple to expose a setting to suppress the clean up. (This is already done if you chose to open the tests in the browser or run in debugger).

nohwnd commented 2 years ago

Okay, thanks for confirmation. I don't think there is any action needed on your or my side. We have our workaround. :)