Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
How can I generate a constant (JS) in Playwright without changes while passing all the tests

I tried

const randomName = (Math.random() + 1).toString(36).substring(2);
export const NEW_PERSONALIZATION_NAME = randomName;

If the test is passed, everything is fine. If the test fails, the constant is generated again. Look at my screen How can I solve this problem?

Screen

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Workers are shutdown on a test failure, see here: https://playwright.dev/docs/next/test-parallel#worker-processes

Thats the reason why a new random value gets calculated on a test failure.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!