Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Playwright not working
Amir Kolsky
#1 Posted : Wednesday, February 25, 2026 11:54:11 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/5/2021(UTC)
Posts: 6

Playwright tests fail. The engine is set to serial execution of tests.
Help?
Der-Albert.com
#2 Posted : Thursday, February 26, 2026 7:37:17 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 242

Thanks: 15 times
Was thanked: 58 time(s) in 54 post(s)
I, personally, would not use NCrunch for end-to-end with Playwright or similar stuff. Too many external, heavy dependencies. Just use the normal Test Runner.

Playwright with C# just a Remote Browser Controller.

"Tests fail" without details cannot yield answers with a Solution. I think more details are needed.

Are the Playwright Dependencies installed?
What is the error?
Amir Kolsky
#3 Posted : Thursday, February 26, 2026 8:48:13 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/5/2021(UTC)
Posts: 6

Der-Albert.com;18675 wrote:

I, personally, would not use NCrunch for end-to-end with Playwright or similar stuff. Too many external, heavy dependencies. Just use the normal Test Runner.

I have a reason to run the tests through NCrunch. I'm looking for how to do what I want to do, not for how to not do what I want to do.

NOTE: All tests pass when ran with MStest.

Der-Albert.com;18675 wrote:

Playwright with C# just a Remote Browser Controller.

What?

Der-Albert.com;18675 wrote:

"Tests fail" without details cannot yield answers with a Solution. I think more details are needed.

Fair! Here is the exception message -

'C:\Users\despicableMe\AppData\Local\NCrunch\992\6\src\Query.Playwright.Tests\bin\Debug\net10.0\..\..\..\..\Query.Web'. The directory name is invalid.)
---> System.ComponentModel.Win32Exception (267): An error occurred trying to start process 'dotnet' with working directory 'C:\Users\despicableMe\AppData\Local\NCrunch\992\6\src\Query.Playwright.Tests\bin\Debug\net10.0\..\..\..\..\Query.Web'. The directory name is invalid.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Query.Playwright.Tests.LandingPagePlaywrightTests.RunWithAppAsync(Func`2 test) in C:\repos\QueryLocal\src\Query.Playwright.Tests\LandingPagePlaywrightTests.cs:line 269
at Query.Playwright.Tests.LandingPagePlaywrightTests.FileBasedAllSpacesResetsToDefault_Playwright() in C:\repos\QueryLocal\src\Query.Playwright.Tests\LandingPagePlaywrightTests.cs:line 171
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at InvokeStub_Task.Wait(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)


Der-Albert.com;18675 wrote:

Are the Playwright Dependencies installed?
What is the error?

They must be, as all tests run and pass with MSTest.
Remco
#5 Posted : Thursday, February 26, 2026 10:47:01 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,501

Thanks: 1020 times
Was thanked: 1369 time(s) in 1270 post(s)
Hi, thanks for sharing this issue.

Playwright isn't supported by NCrunch. As Albert has stated, it's big, it's heavy and relies on a lot of complex infrastructure to manage the test process itself. The exception you're receiving is caused by NCrunch's workspacing. Basically, Playwright is trying to reach between projects inside the solution structure to spin up a sub-process, which is something that is difficult to do under NCrunch because of project atomicity constraints.

To my knowledge, the only way to make NCrunch work with Playwright would be to introduce some kind of integration layer between them, and probably find a way to modify playwright itself. I don't necessarily think that this would be impossible, but it would require quite a bit of investment. Since very few people seem interested in using Playwright with NCrunch, I think it's unlikely to happen.

Sorry, I realise this is probably not the response you were hoping for, but sometimes it pays to be realistic about these things.
Der-Albert.com
#4 Posted : Friday, February 27, 2026 12:50:19 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 242

Thanks: 15 times
Was thanked: 58 time(s) in 54 post(s)
Amir Kolsky;18676 wrote:

Fair! Here is the exception message -

'C:\Users\despicableMe\AppData\Local\NCrunch\992\6\src\Query.Playwright.Tests\bin\Debug\net10.0\..\..\..\..\Query.Web'. The directory name is invalid.)
---> System.ComponentModel.Win32Exception (267): An error occurred trying to start process 'dotnet' with working directory 'C:\Users\despicableMe\AppData\Local\NCrunch\992\6\src\Query.Playwright.Tests\bin\Debug\net10.0\..\..\..\..\Query.Web'. The directory name is invalid.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Query.Playwright.Tests.LandingPagePlaywrightTests.RunWithAppAsync(Func`2 test) in C:\repos\QueryLocal\src\Query.Playwright.Tests\LandingPagePlaywrightTests.cs:line 269
at Query.Playwright.Tests.LandingPagePlaywrightTests.FileBasedAllSpacesResetsToDefault_Playwright() in C:\repos\QueryLocal\src\Query.Playwright.Tests\LandingPagePlaywrightTests.cs:line 171
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at InvokeStub_Task.Wait(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)


From that Exception, which seem to be coming from a functionality in your Test Assembly. I would assume thare is something of with the path, NCrunch copies all Source Code and Dependencies it thinks it needed to a different folder, but this is mostly just compile time dependencies. If you need additional files in your tests, you must configure NCrunch to also copy them.

Your are doing you, but NCrunch using fat dependencies and limiting the Tests to be executed serial, and i would a assume in a specific order is nothing what main point of NCrunch is - running impacted tests as I type as fast as possible.

I could see that you would like to use this as an automated runner as you type also in C#. But Playwright, together with C#, is not a good fit for that (has nothing to do with NCrunch, Playwright without TypeScript is not a superb experience, I'm also stuck with Playwright with .NET, i don't like it).
With Playwright in TypeScript, this is a different story; this has this out of the box. And NCrunch is not involved.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.042 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download