# Test Execution
source: https://developer.mastercard.com/mdes-pre-digitization/documentation/testing/execution-flow/index.md

Here are the step-by-step instructions to execute the offline testing for the Pre-Digitization API. The steps outlined on this page are intended for Mastercard customers and must be followed exactly as described.

## 1. Pre-requisites {#1-pre-requisites}

Before executing any test cases, ensure that the following prerequisites are complete:

* Implementation has been completed
* Endpoint selection has been completed
* Issuer endpoints are accessible
* Issuer encryption keys and required libraries are available
* The Insomnia project file has been downloaded
* Required test data is available

## 2. Import Mastercard Plugin {#2-import-mastercard-plugin}

1. Open **Insomnia**.
2. Select **Application → Preferences → Plugin**.
3. Install the Mastercard Plugin.

## 3. Import Insomnia Project {#3-import-insomnia-project}

1. Select **Application → Preferences → Data → Import Data → From File**.
2. Import the Insomnia project JSON file for the selected endpoint.
3. Verify that all requests and environments are visible.
4. Verify that the **Docs** section is visible for each request.

## 4. Configure Environment {#4-configure-environment}

1. Select **Manage Environment**
2. You can see **Base Environment** with the required parameters.
3. Update the following parameters according to your environment:
   * **host**
   * Under **mastercard** :
     * keyAlias
     * keystoreP12Path
     * keystorePassword
   * Under **encryptionConfig** :
     * oaepPaddingDigestAlgorithm (use value **SHA256** or **SHA512**)
     * encryptionCertificate -
   * appliesTo:
     * Add your host name with port.
     * Do not remove `localhost` and `mastercard.com`.

### 5. Review Test Scenarios {#5-review-test-scenarios}

For each request in the collection:

1. Review the endpoint operation being tested.
2. Identify all fields that require encryption.
3. Review any scenario-specific instructions provided in the **Docs** section.

### 6. Update Request {#6-update-request}

1. Use test data as required by the test case.
2. Replace any sample base URL (for example, "my bank") with your own endpoint URL.
3. Save the updated request.

### 7. Execute Test Cases {#7-execute-test-cases}

1. Run each test scenario in Insomnia.
2. Observe the response returned by the system.
3. Confirm that the request completes without errors.
4. Validate the response against the response documented in the **Docs** section.
5. If the response does not match, rerun the test.

### 8. Evidence to Capture {#8-evidence-to-capture}

Capture the following evidence for each executed test case:

* Test Case ID
* Endpoint
* Request payload
* Response payload

Next Step: Submit the [test results](https://developer.mastercard.com/mdes-pre-digitization/documentation/testing/submit-test-result/index.md) to Mastercard for review.
