Selenium Workbook #28: CRUD Test Revisit (without Database Reset)

Client CRUD without Database Reset.

Courtney Zhan
4 min readFeb 24, 2024

--

This article is one of the “Selenium Training Workbook” series, a set of bite-sized exercises. While each exercise is independent, it may require knowledge and practices covered in previous episodes.

In the previous episode, we created CRUD Client tests for WhenWise with database reset (my father calls it ‘The Simpsons Pattern’). However, 99.9+% web apps won’t have this database reset utility implemented. This exercise shows a typical set of CRUD tests, without database reset.

Learning Objectives

  • Review CRUD Test Design, without database reset.
  • Review refactoring
  • Variables and Scope
  • Global Variables

Test Design

We still design four test cases as a whole, putting them into a single test script file.

  • CREATE
    We need to create a unique client every single time. This can be achieved using dynamicly-generated names and emails.
  • READ
    Use the new client freshly created by the above test case. This means We need to remember the new client name.
  • UPDATE and DELETE
    These two actually are…

--

--