Test Cases

Overview 

Test cases specify parameters for evaluating the accuracy of a particular configuration during future test runs. When you create a test case, you select a test template as the basis for the test case, which flags all the fields specified in the template as fields to test in the test case. During save, Test executes the test case and stores the results of running the test case as baseline values for future comparison.

For example, create a test case for use with the Salesforce CPQ Calculate Quote API to determine if Salesforce updates introduce regressions in your CPQ pricing calculations. Tell Me More

A test case consists of:

  • Test Case Name – Specifies the unique, meaningful name of the test case.
  • Description – Specifies the optional description of the test case.
  • Function – Specifies the type of functional test to run. Options available in the current release are:
    • Calculate – Test price quote calculation using the Salesforce CPQ Calculate Quote API, which is the equivalent of selecting products in the quote line editor and clicking Calculate. To produce valid test case baseline values, you need a quote containing at least one quote line. Refer to the Calculate Prices Trailhead Module for more information.
    • Contract – Test contract creation using the Salesforce CPQ Contract Generator API, which is the equivalent of selecting Contracted on an opportunity record to create a contract. To produce valid test case baseline values, you need an account with an uncontracted opportunity that has a primary quote (with a valid Start Date and either Subscription Term or End Date) containing quote lines with at least one subscription product. Refer to Creating a Contract from an Opportunity for more information.
  • Renew – Test contract renewal using the Salesforce CPQ Contract Renewer API. To produce valid test case baseline values, you need a contract containing at least one subscription. Refer to the Manage Contracts and Renewals Trailhead Module for more information.
  • Amend – Test contract amendment using the Salesforce CPQ Contract Amender API. To produce valid test case baseline values, you need a contract containing at least one subscription. Refer to the Manage Contracts and Renewals Trailhead Module for more information.
  • The ID of a record to test.
  • Baseline Date – Specifies when the baseline values were captured.
  • Test Template – Specifies the test template used as the basis for the test case.
  • Baseline – Provides access to the baseline results.
  • Baseline Status – Indicates the current status of the baseline values generation with one of these values:
    • Queued – Indicates baseline values capture is queued for execution.
    • In Progress – Indicates baseline values capture is underway.
    • Complete – Indicates baseline values have successfully been captured.
    • Error – Indicates an error occurred while attempting to capture the baseline values. Hover over the column to see a description of the error.A unique, meaningful name for your test case.