Modern QA2026Practical Exercise — tiles
Log inJoin
24 / 65 · 15 SQL & Database Testing · Data Manipulation← prev⊞ allnext →☰ Read as one page

3.8Practical Exercise

  1. Write INSERT statements to create a user with 3 orders and 2 line items per order
  2. Write a cleanup script that deletes all test data in the correct dependency order
  3. Create a pytest fixture that wraps tests in transactions with rollback
  4. Write a test that creates data via API and verifies it in the database, then verify the rollback cleaned it up
  5. Write a bulk data generation script that creates 500 users with random roles