# Testing
source: https://developer.mastercard.com/open-finance-data/documentation/testing/index.md

Note: This API is currently available for Sandbox testing. [Contact us](mailto:openbankingeu_support@mastercard.com%3E) for details of Production environment availability.

Testing is facilitated through the Sandbox environment where integrations with a production-like environment enables simulation of success and failure scenarios.

In this section we describe the requirements and information needed to access the Sandbox and run test scenarios on it. Different types of test banks and test users are described, together with guidelines for how to test specific use case variations.

## Onboarding {#onboarding}

To start testing with any of the test banks, you need to be onboarded to Sandbox. This is part of the overall onboarding process.

Once onboarded you will interact with the authentication and resource endpoints as on production.

## Test Providers {#test-providers}

On the sandbox we expose four different test providers:

* Mock Bank
* Redirect Test Bank
* Embedded Test Bank
* Decoupled Test Bank

During a login flow the relevant test provider is selected by the user.

If you use the Mock Bank, the login flow is determined by the default flow of the user you choose. For the three other providers the type of flow is indicated by the provider name. All flow types can be executed by all users on the flow specific providers.

### Test Users {#test-users}

We offer a collection of different test users as described here:

|        User        |              Default login method              | Password |  OTP   |     Data      |
|--------------------|------------------------------------------------|----------|--------|---------------|
| john.smith         | Redirect                                       | 12345    | 987654 | Advanced data |
| mattias.mustermann | Redirect                                       | 12345    | 12345  | Basic data    |
| max.mustermann     | Embedded flow with OTP                         | 12345    | 987654 | Basic data    |
| erika.mustermann   | Embedded flow with OTP and choice for OTP type | 12345    | 987654 | Basic data    |
| dan.mustermann     | Decoupled flow                                 | 12345    | 987654 | Basic data    |
| nomoney.mustermann | Embedded flow with OTP                         | 12345    | 987654 | No accounts   |

Users with basic data are aimed at testing different flow and failure scenarios, as they have a limited set of account and transaction data but reflect the variability in flows.

For redirect flow no bank UI is shown, but you are redirected to a screen indicating if the callback should be successful or not.

All user accounts have German IBANs and EUR as currency.

#### Advanced data {#advanced-data}

Alongside the basic flow example users, we also have `john.smith` with a richer set of account and transaction information to enable testing of dynamic data validation scenarios. John's data has the following properties:

* Four accounts that are dynamically updated with transactions since 2023-01-01.
* Transfers between accounts has consistent end-to-end ids.
* The accounts include balance and account holder information.
* The account numbers differ depending on which provider-id is being used.

Transactions on these accounts date back to Jan 1st 2023. The transaction history is auto-generated inside the bank in a deterministic way, and new transactions will be generated as time moves on.

John's four account types with the following simplified behaviour:

* **CreditCard**: Each month John inserts an amount on this account, and then uses his credit card for everyday shopping
* **Loan**: Each month John pays on his loan and every three months an interest is added. (approximated calculation)
* **Savings**: Each month John adds to his savings, and once John took money from the account to buy something big (new roof for the house)
* **Checking**: This is where salary comes in, and payments to the other accounts happen.

## Use Case Testing {#use-case-testing}

During the Sandbox onboarding process you will be provided with a set of use case configuration ids corresponding to the different use case configurations that apply to your solution. With this you can test and validate your planned business scenarios on the sandbox parallel to what you can expect on production.

Consult the use case configurations described in the [Use Cases section](https://developer.mastercard.com/open-finance-data/documentation/use-cases/index.md) to see the data scopes that can be expected for the different use case types you have configured.

The availability of optional data fields is at the discretion of each provider institution. Clients should implement appropriate fallback measures in their code to ensure robust handling where optional fields are not returned.
