How to CreateTest Data
YNS Philippines Inc.
Why do we test?
• Check if a software satisﬁes its requirements.
How to satisfy requirements
• Prepare sufﬁcient test cases
• Prepare sufﬁcient data
• Test properly
What is the ideal test data?
• The data, which satisﬁes all the patterns
• Called exhaustive testing (ISTQB)
What is better test data
• If we can provide the data for all the patterns, it
would assure higher quality.
• In a realistic view, there would be time limitation.
• We should eliminate some data in order to ﬁnish
the testing to meet the deadline without
decreasing the quality.
How to create data
• If add / edit / delete features are already
provided, it’s much better to use it.
• If not, it has to be created manually.
• An article must belongs to an author
• An article can be favored by users
• Should display article.title, author.name, number of favorites,
article.open_day with descending order on article.open_day
• If the article is open and not deleted and not future
• If the author is not deleted
• If the favorite exists or and not deleted
article author favorite
id id id
name name article_id
author_id deleted user_id
, COUNT(favorite.id) AS number_of_favorites
INNER JOIN author
ON author.id = article.author_id
LEFT OUTER JOIN favorite
ON favorite.article_id = article.id
WHERE article.open = 1
AND article.deleted = 0
AND article.open_day <= CURDATE()
AND author.deleted = 0
GROUP BY article.title, article.open_day, author.name
ORDER BY article.open_day DESC
Number of patterns
• article is open / not open => 2
• article is deleted / not deleted => 2
• article open_date is past / today / future => 3
• author is deleted / not deleted => 2
• number of favorite is 0 / 1 / 2 => 3
• number of patterns is 2 x 2 x 3 x 2 x 3 = 72