# Testing source: https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/testing/index.md ## Test Environments {#test-environments} | Environment | Use it to | Base URL | |--------------------------------|-----------------------------------------------------------------------|-------------------------------------------------------------------------| | Sandbox | Make your first call and check request formats against mock responses | `https://sandbox.api.mastercard.com/billpay/biller-maintenance-sandbox` | | Mastercard Test Facility (MTF) | Run the certification test cases in this section | `https://api.mastercard.com/billpay/mtf/biller-maintenance` | All requests use OAuth 1.0a. Before you test, set up your keys as described in the [Quick Start Guide](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/getting-started/index.md) and [API Basics](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/api-basics/index.md). ## Choose a Testing Method {#choose-a-testing-method} | Method | Best for | How to start | |----------------------|--------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Quick Start script | A fast first call from the command line | Run the Python script in [First Sandbox Call](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/getting-started/index.md#first-sandbox-call). | | Postman | Running and repeating test cases manually | Import the [rpps-biller-maintenance-service.yaml](https://static.developer.mastercard.com/content/rpps-biller-maintenance-service/swagger/rpps-biller-maintenance-service.yaml) (46KB) specification and follow the [Postman Collection guide](https://developer.mastercard.com/platform/documentation/developer-tools/postman-collection/) to configure OAuth 1.0a signing and the base URL. | | Insomnia | Running test cases manually with an Insomnia workspace | Import the same specification and follow the [Insomnia Collection guide](https://developer.mastercard.com/platform/documentation/developer-tools/insomnia-collection/). | | Generated API client | Automated tests in your own code base | Follow [Generating Your Own RPPS Biller Maintenance Service Client](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/api-basics/index.md#generating-your-own-rpps-biller-maintenance-service-client). | ## Testing Plan {#testing-plan} All Concentrators that implement the RPPS Biller Maintenance Service must complete testing in MTF before they get access to Production. Mastercard expects each Concentrator to run the test cases, submit the results to CIS, and show that the service calls produce the expected outcomes. This reduces issues in Production. ### End-to-End Test Journey {#end-to-end-test-journey} Run the test cases in this order so that each step uses the output of the previous one: | Step | Endpoint | Test cases | Successful result | |------------------------------|------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------| | 1. Add a Biller | POST `/biller-request` | [Add Biller](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/testing/add-biller-tests/index.md) | HTTP `200`, `statusIndicator` is `SUCCESS`, and the response contains a `workRequestId` | | 2. Check the work request | GET `/biller-request/{work_request_id}/status` | [Work Request Status](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/testing/wr-status-tests/index.md) | HTTP `200` and a `workRequestStatus` value, such as `PENDING APPROVAL` or `APPROVED` | | 3. Confirm the Biller record | GET `/biller/{biller_id}` | [Get Biller Details](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/use-cases/get-biller-details/index.md) | HTTP `200` and a `billerInfo.billerId` that matches the Biller you added | To test a single endpoint, run only the test cases for that endpoint. Record the `billerId` and `workRequestId` from each successful test, because CIS asks for them. ### Positive and Negative Test Cases {#positive-and-negative-test-cases} | Test case | Type | Expected result | |------------------------------------------------|----------|----------------------------------------------------------------------------------| | Add Biller: Success | Positive | Work request created | | Add Biller: Multiple addresses, masks, or AKAs | Positive | Work request created | | Add Biller: Biller name and address match | Positive | Work request created | | Add Biller: Biller ID already exists | Negative | HTTP `400` with `BPBMSAPI_ERR_0007` | | Add Biller: Invalid state | Negative | HTTP `400` with `BPBMSAPI_ERR_0003` | | Add Biller: Invalid effective date | Negative | HTTP `400` with `BPBMSAPI_ERR_0008`, `BPBMSAPI_ERR_0009`, or `BPBMSAPI_ERR_0010` | | Work Request Status: Valid work request | Positive | HTTP `200` with the work request status | | Work Request Status: Malformed work request ID | Negative | HTTP `400` with `BPBMSAPI_ERR_0075` | | Work Request Status: Invalid work request ID | Negative | An error response that your system must handle | ### Troubleshooting {#troubleshooting} When a test returns an unexpected error, look up its `ReasonCode` in [Code and Formats](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/code-and-formats/index.md), which lists the cause and resolution of each code. For gateway errors, such as HTTP `401` signature failures, see the Gateway Error Codes link on the same page. ## Format of Test Cases {#format-of-test-cases} Bill Pay test cases for Concentrators are grouped into test suites. Each test suite is named after the service it tests and describes the high-level objective of its test cases. ### Test Suite Format {#test-suite-format} The description of each test suite includes the following elements: * **Test Suite Name**: The name of the test suite, which summarizes the objective of its test cases. * **MTF Inbound API Endpoint**: The MTF endpoint that the Concentrator calls for the test cases in the suite. * **Pre-Conditions**: The steps a Concentrator must complete before starting the test suite. * **Post-Condition**: The outcome after the positive test cases in the suite are completed successfully. * **Dependencies**: The prerequisites that must be met before the test cases can run successfully. * **Overall Test Notes**: Additional remarks about the test suite. ### Test Case Format {#test-case-format} Each test case is presented in a table with the following fields: * **Test Title**: The name of the test case. * **Description**: The objective of the test case. * **Pre-Requisite**: The criteria the Concentrator must meet before starting the test case. * **Test Steps**: The steps to perform the test in MTF. * **Expected Result**: The outcome the Concentrator should get from a successful test. * **Notes**: Additional comments about the test case. ## Test Cases {#test-cases} To view the test cases for each API, use the pages below: * [Add Biller](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/testing/add-biller-tests/index.md) * [Work Request Status](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/testing/wr-status-tests/index.md) ## Next Steps {#next-steps} * [Quick Start Guide](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/getting-started/index.md): get credentials and make your first call. * [Code and Formats](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/code-and-formats/index.md): resolve error codes returned during testing. * [API Reference](https://developer.mastercard.com/rpps-biller-maintenance-service/documentation/api-reference/index.md): review the full OpenAPI specification.