↑ Return to Data in WordPress

Da16 How to Write Test Cases?

George Dorgan By
George Dorgan
My articles
Follow on:

Page no: Da16

PageNo: T15

We want to write different test cases, so that we can verify the functionality on our blog(s).

Example test case

One test case consists of different steps like in the following example from biweekly:

The backend of the blog(s) are secured with an IP Whitelist. We need to check that this Whitelist works.
The test case is to do the following:
Step 1: Login into the server with a Whitelisted IP on one browser
Step 2: Delete own IP address from the White List
Step 3: Try to log in with a different browser

The expected result is that the login attempt is rejected for this IP.
If the login attempt is not rejected, we need to report this as bug.

Hence we describe the scenario , the order how we do things (Steps) and the expected outcome.

For blog functionality like plugin testing, we have typically two important steps.

Step 1: Do something in the WordPress UI, like adding a new advert, a new social channel.

Step 2: Verify if this is reflected in the blog. Hence look if the advert or the new social channel shows up.

We mostly document step1 with various screenshots, while we use less screenshots for step2. For 5 test cases and two steps in each test case we would use max. 5 screenshots. The rest is repetitive.
The Ads Manager had too many screen shots on June 17.


We also should verify that test cases are complete. We should verify that for each functionality we try the different “scenarios”. A scenario can be different values entered (like “category ad” and “global ad”) or buttons pressed in a different order (like add an advert, then remove it, etc. or 5 times “add”).



See more for Data in WP