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?
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.