What is Semantic Testing?
Semantic testing is a test technique to test the relationship between data as a goal. The relationship can exist in three different ways:
These are examples of data relationships in a functional requirement specification document for travel booking system:
If the user orders at least 2 item on the "product overview" screen, he/she can enter a reduction code on the "check out" screen. Reduction codes can only be used on Sunday. On other days a message is shown to promote shopping on Sundays.
Test case 1: on Sunday order 5 items
Expected result: reduction code is available
Test case 2: on Sunday order 1 item
Expected result: reduction code is not available
Test case 3: on Thursday order 5 items
Expected result: reduction code is not available
Semantic testing is a test technique to test the relationship between data as a goal. The relationship can exist in three different ways:
- Relationship between input data on 1 screen
- Relationship between input data on different screens
- Relationship between input data on data already existing in the system
How to create a semantic test?
Identify the relationships to check
Search the test basis for relationships. Test bases containing useful information for this technique are for instance: data model, graphical user interface specifications (screen descriptions), functional requirement specifications.These are examples of data relationships in a functional requirement specification document for travel booking system:
- The user cannot check out if his shopping basket is empty
- If the user orders at least 2 item on the "product overview" screen, he/she can enter a reduction code on the "check out" screen.
- The delivery date can't be in the past (relationship between delivery date and system date)
- The user has only access if his/her personal data is known by the system (relationship between sign-in name and information in the database)
Develop the relationships to check
Write down the relationships in a simple structure:IF AExample:
THEN B
ELSE C
If the user orders at least 2 item on the "product overview" screen, he/she can enter a reduction code on the "check out" screen. Reduction codes can only be used on Sunday. On other days a message is shown to promote shopping on Sundays.
IF day = Sunday
THEN
IF items ordered >= 2
THEN reduction code field is available
ELSE reduction code field is not available
ELSE Sunday shopping promotion message
Create test cases
Every line where a THEN or an ELSE statement is placed but not IF statement, forms an end-point of a test pathway. For above example, we can find back three pathways:IF day = SundayFor each pathway a test case can be created:
THEN
IF items ordered >= 2
THEN reduction code field is available (-> pathway 1)
ELSE reduction code field is not available (-> pathway 2)
ELSE Sunday shopping promotion message (-> pathway 3)
Test case 1: on Sunday order 5 items
Expected result: reduction code is available
Test case 2: on Sunday order 1 item
Expected result: reduction code is not available
Test case 3: on Thursday order 5 items
Expected result: reduction code is not available
No comments:
Post a Comment