You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my SpecFlow Playwright project (mostly based on this one) I was seeing many node.js instances being created as the test suite ran.
The longer the test suite ran, the more instances that were being created. It wasn't until the end of the test run that they finally got disposed. Kick off a test run and view the Windows Task Manager to see.
I eventually traced the problem down to the line of code referenced above. The Playwright instance being created in the method was not being disposed after each scenario. I ended up modifying the code to expose the Playwright object and then dispose of it in the BrowserDirver.Dispose() method.
This problem was actually crashing our Linux build agent as it just kept running out of memory with masses of node.js instances.
I think this problem would be evident even with the unadulterated code here but perhaps someone could confirm. Hopefully this will save someone some time if they see Playwright memory usage getting out of control.
The text was updated successfully, but these errors were encountered:
SpecFlow.Actions/Plugins/SpecFlow.Actions.Playwright/SpecFlow.Actions.Playwright/DriverInitialiser.cs
Line 62 in 3d0fcac
In my SpecFlow Playwright project (mostly based on this one) I was seeing many node.js instances being created as the test suite ran.
The longer the test suite ran, the more instances that were being created. It wasn't until the end of the test run that they finally got disposed. Kick off a test run and view the Windows Task Manager to see.
I eventually traced the problem down to the line of code referenced above. The Playwright instance being created in the method was not being disposed after each scenario. I ended up modifying the code to expose the Playwright object and then dispose of it in the BrowserDirver.Dispose() method.
This problem was actually crashing our Linux build agent as it just kept running out of memory with masses of node.js instances.
I think this problem would be evident even with the unadulterated code here but perhaps someone could confirm. Hopefully this will save someone some time if they see Playwright memory usage getting out of control.
The text was updated successfully, but these errors were encountered: