Skip to main content

Creating persona test cases

Archived

5 Tasks

5 mins

Visible to: All users
Beginner Pega Customer Decision Hub 8.5 English
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Click here to continue your progress in the latest version.

Scenario

U+ Bank is performing cross-sell on the web and has implemented some engagement policies to ensure that customers get only tailored, relevant offers.

To verify if these engagement policies work properly, the business team wants to define test cases for different personas and ensure that the future changes do not introduce any regressions.

Use the following credentials to log in to the exercise system:

Role

User name

Password

Decisioning Analyst

CDHAnalyst

rules

Caution: To reuse the exercise system from a previous challenge, first complete Defining customer engagement policies challenge. Otherwise, click Initialize Pega or Reset Instance in this challenge.

Your assignment consists of the following tasks:

Task 1: Create and run a Test Case for the persona, Troy

Configure & execute a persona test case to test that Troy qualifies for the Standard card and the Rewards card.

Task 2: Create and run a Test Case for the persona, Barbara

Create a second test case for the persona, Barbara. Test that Barbara qualifies for the Rewards Plus card and the Premier Rewards card and observe that she passes the test.

Task 3: Define an applicability condition for standard card

Define an action level applicability condition for the standard card where the average balance should be greater than $2000.

Task 4: Run the existing test cases and inspect the results.

Run the test cases defined earlier and observe that Troy fails the test.

Task 5: Fix the test case for Troy.

Edit the existing test case for Troy to select only the actions he is eligible for.

Customer

Standard

Rewards

Rewards Plus

Premier Rewards

Troy

Y

Y

   

Barbara

   

Y

Y

Challenge Walkthrough

Detailed Tasks

1 Create and run a Test Case for the persona Troy

  1. Log in as a Decisioning Analyst with user name CDHAnalyst and password rules.

  2. In the navigation pane on the left, click Next-Best-Action > Designer.
     
    NBA Designer
  3. Click Engagement policy.
  4. In the Business structure section, click the CreditCards group to view the engagement policy for the group.
  5. Click Actions and select Persona test....
     
    Persona test
  6. Click Create test.
  7. In the Create test window, notice that the Test passes if is set to At least one action and the condition to is equal to.
  8. In the Actions list, select Rewards card.
     
    assertion rewards card
  9. Click Add assertion.
     
    add assertion
  10. Repeat step 8 for the Standard card.
     
    assertion standard card
  11. In the Persona (Data transform) field, select the persona, Troy.
    Persona troy
  12. In the Next-Best-Action scope section, ensure Engagement policies only is selected.
     
    NBA Scope Engagement policies only
  13. Click Create.
  14. Select the test you created.
  15. Click the Run selected tests icon.
     
    run test for troy
  16. Observe the test run badge on the right indicates that the test passes.
     
    test result for troy

 

2 Create and run a Test Case for the persona, Barbara

  1. Click Create test.
  2. In the Create test window. set the Test passes if to At least one action and set the condition to is equal to.
  3. In the Actions list, select Rewards plus card.
  4. Click Add assertion,
  5. Repeat step 3 for the Premium rewards card.
  6. In the Persona (Data transform) field, select the persona, Barbara.
  7. In the Next-Best-Action scope section, ensure Engagement policies only is selected.
  8. Click Create.
    create test case for barbara
  9. Select the test you created for Barbara.
  10. Click the Run selected tests icon.
  11. Observe the test run badge on the right indicates that the test passed
     

3 Define an applicability condition for standard card

  1. Scroll down to click on the offer, Standard card.
  2. Click Check out.
  3. Click on the Engagement policy tab.
  4. Under the Applicability section, click Add criteria.
    1. In the first list, ensure that Customer is selected.
    2. In the second list, in the Fields section, select Average Balance.
    3. In the third list, select is greater than.
    4. In the last list, enter 2000.
      add applicability
  5. Check-in the changes with suitable check-in comments.
  6. Close the Standard card offer.

4 Run the existing test cases and inspect the results

  1. To see how the applicability added affects to the persona test cases, in the persona test panel, select both test cases and run them.
  2. Observe that Troy’s test case fails.
  3. Click on the fail badge to open the test results window. Observe the test fails as Troy is not eligible for the Standard card.
  4. Close the test result window.
  5. Click the persona, Troy.
  6. Observe that the average balance is 1500 which is less than the defined average balance.
    Troys average balance
  7. Click Close.

5 Fix the test case for Troy

  1. Click the test case created for Troy to open it.
  2. In the Assertion row, delete the row where you selected Standard card.
     
    Delete standard card assertion
  3. Click Save.
  4. Select Troy’s test case. Click Run selected tests icon.
  5. Observe the test run Status badge on the right for Troy’s test case indicates that the test passes.
     
    Run tests for troy and barbara

 



Available in the following mission:

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice