6.2k views
0 votes
Consider a mobile app that allows customers to access and manage their bank accounts. A user story has just been added to the set of features that checks customers' social media accounts and bank records to give personalized greetings on birthdays and other personal milestones. Which of the following test techniques could a PROGRAMMER use during a unit test of the code to ensure that coverage of situations when the greetings ARE supposed to occur and when the greetings ARE NOT supposed to occur?

A. Statement testing
B. Exploratory testing
C. State transition testing
D. Decision testing

User OlavRG
by
8.0k points

1 Answer

5 votes

Final answer:

The programmer can use decision testing, statement testing, and state transition testing during a unit test of the code to ensure coverage of situations when the greetings are and are not supposed to occur.

Step-by-step explanation:

The programmer can use the following test technique during a unit test of the code to ensure coverage of situations when the greetings are supposed to occur and when the greetings are not supposed to occur:

  1. Decision testing: This technique involves testing different decision outcomes in the code. The programmer can create test cases to check if the code correctly identifies the customer's birthday or personal milestone and triggers the personalized greeting accordingly.
  2. Statement testing: This technique involves testing every statement in the code to ensure it is executed correctly. The programmer can create test cases to check if the code contains the necessary statements to check social media accounts and bank records for personalized greeting triggers.
  3. State transition testing: This technique involves testing the transition between different states of the code. The programmer can create test cases to check if the code transitions correctly between the states of checking social media accounts and bank records, and triggering the personalized greetings.
User Andy Jarrett
by
7.5k points