Playwright + TS · Lesson 10 of 36
Module 10: TypeScript Practice Project
Your task
Complete the TestDataManager utility:
generateRandomUser to return a TestUser with dynamic email user_${Date.now()}@targetqa.com.role: "tester".Write it in the editor, then press Check answer (Ctrl + Enter).
In real Playwright projects, tests should never hardcode credentials or test email addresses directly inside test files. We build a Test Data Utility:
TestUser and TestProduct.generateRandomUser() generating unique emails.Congratulations on finishing the fundamentals! In this capstone practice project, we are building a Test Data Management Utility. You will combine TypeScript interfaces, classes, random data generation, and error handling to create a real-world test data provider that will prepare you directly for Playwright. Let's build it together!
Part of the Playwright + TS course (Playwright with TypeScript). Practice this concept live in the Playwright Online Compiler or explore our free automation practice form.
When running tests in parallel or repeated CI runs, reusing static emails like test@example.com causes 'User already exists' validation errors.
Ready? Solve the task in the editor
Use Check answer to mark it complete. Hints are there if you need them.
___