Skip to main content
バージョンタグがご希望のコンテンツと一致しているかご確認ください。 または、最新バージョンをご利用ください。

Creating unit test Cases

Pega Communityのロゴ

注: 次のコンテンツはPega Communityを参照したページで、モジュール内容の理解度を高める目的で含まれています。

For most rules, you can create a reusable test case by converting a unit test to a test case, configuring case details, and then defining expected test results with assertions (test conditions). When the test case runs, the test results are compared to the expected results defined for the rule’s assertions. If the test results do not meet the defined assertions, then the test fails.

はじめに: Unit test a rule and convert the test run into a test case. For more information, see Unit testing individual rules.

  1. Optional:

    To modify the rule or class that is used for the test, in the upper-right corner of the Definition tab, click the Gear icon, select the rule or class and then click Submit.

    If you are testing a strategy rule, then the componentName and pzRandomSeed parameters are also displayed. If you change either of these parameters, the test case does not return the expected results.

    • componentName – The name of the component (for example, Switch) that you are testing.
    • pzRandomSeed – Internal parameter, which is the random seed for the Split and Champion Challenger shapes.

  2. Optional:

    To prevent the test from being run as part of a test suite or from a REST service, on the Definition tab, select the Disable check box.

    The test case will be run only when you click Actions Run .

  3. In the Expected results section, add assertions that define the expected results of the test. For more information about creating assertions, see Defining expected test results with assertions.

  4. On the Setup & Cleanup tab, configure the actions to perform and the objects and clipboard pages to be available before and after the test runs. You can also clean up the clipboard after the test is run by applying additional data transforms or activities. For more information, see Setting up your test environment.

  5. Click Save.

  6. In the Details dialog box, enter a label that identifies the test case. The test case identifier is generated based on the label and cannot be modified after it is saved.


トレーニングを実施中に問題が発生した場合は、Pega Academy Support FAQsをご確認ください。

このコンテンツは役に立ちましたか?

改善できるところはありますか?

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