Skip to content

Add playwright parallelism#6

Open
OleksPal wants to merge 1 commit into
devfrom
add-playwright-parallelism
Open

Add playwright parallelism#6
OleksPal wants to merge 1 commit into
devfrom
add-playwright-parallelism

Conversation

@OleksPal
Copy link
Copy Markdown

No description provided.


namespace NBomber.WebBrowser.Playwright;

public static class PlaywrightExtensions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it's static?

Comment on lines +7 to +8
private static List<IPlaywright> _playwrightInstances = new();
private static List<IBrowser> _browsers = new();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this in Idisposable context

@OleksPal OleksPal force-pushed the add-playwright-parallelism branch from acd2e76 to 0e98075 Compare March 13, 2026 10:18

namespace NBomber.WebBrowser.Playwright;

public class PlaywrightBrowserPool : IAsyncDisposable
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add XmlDoc

private readonly List<IBrowser> _browsers = [];
private ClientPool<IBrowserContext>? _contextPool;

public IBrowserContext GetBrowserContext(int instanceNumber)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add XmlDoc

return _contextPool.GetClient(instanceNumber);
}

public async Task Initialize(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add XmlDoc

@OleksPal OleksPal force-pushed the add-playwright-parallelism branch from 0e98075 to da784e9 Compare March 13, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants