Can Playwright be used for performance testing?

During our AMA on Playwright with @utchbe, @sanket raised this question regarding Playwright’s performance and testing capabilities:

“Can we use Playwright for performance testing?”

This question explores Playwright’s use beyond functional software testing, specifically in assessing web application performance.

Your experience and insights on this would be very helpful for Sanket and others.

1 Like

yes you can use playwright with artillery for performance testing, though there are a few gotchas, we have something 1 step above a poc working now, if your test framework is in TS rather than JS, that is the main issue. Though one of our FE devs helped with a build process to transpile the code.

Hi @zoejobson ! You lost me a little

if you are JS rather than TS, that is the main issue.

What is the issue? and is it with JS(JavaScript) or is it with TX(TypeScript)?
Is it a lack of performance libraries in one versus the other?

Artillery requires common JS and playwright can use TS, if your playwright code is written in TS you will have to transpile it to JS.

I know it’s a bit late to respond. But do you need a Playwright for the performance due to some specific reasons? The PW is not tuned for this task, and over-dedicated solutions are available.

Hello,

Yes, you can use playwright for performance testing.

Playwright has capabilities to include simulating user interactions and measuring key performance metrics.

While using playwright for performance testing ensures the best user experience and provides areas for improvement.