> For the complete documentation index, see [llms.txt](https://docs.pagopa.it/centrostella-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagopa.it/centrostella-1/centro-stella/instructions-for-agenzia-delle-entrate-mandate/how-to-join/04.-test-and-monitor-integration/test-prod.md).

# Test PROD

{% hint style="danger" %}
Before testing in PROD, the UAT checklist must be approved by PagoPA.

If you haven't get them yet, proceed with the [certificate](/centrostella-1/centro-stella/instructions-for-agenzia-delle-entrate-mandate/how-to-join/02.-integrate-pagopa-environments/request-the-mutual-authentication-certificates.md) and [API key](/centrostella-1/centro-stella/instructions-for-agenzia-delle-entrate-mandate/how-to-join/02.-integrate-pagopa-environments/obtain-an-api-key.md).
{% endhint %}

### 1. Mutual Authentication certificate validity check PROD

The first step checks the validity of the client certificate, with a call to a dedicated endpoint using your certificate and your private key.

From the cstar-cli project root run the script with the following command:

```
sh ./integration_check/scripts/006-mAuth-check-PROD/script.sh /PATH/TO/COMPANY_NAME_PROD.certificate.pem /PATH/TO/COMPANY_NAME_PROD.key
```

Note that you have to specify the path to your certificate and to the private key as arguments.

The script will print on screen the result, the correct value is **200 .**

**Example of expected** **result:**

```
--<TIMESTAMP>--  https://api.cstar.pagopa.it/rtd/mauth/check
Resolving api.uat.cstar.pagopa.it (api.cstar.pagopa.it)... 20.101.29.138
Connecting to api.uat.cstar.pagopa.it (api.cstar.pagopa.it)|20.101.29.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24 [application/json]
Saving to: ‘STDOUT’
-
  "result": "PASS"
-
```

### 2. API Key validity check PROD

The second step checks the validity of the API Key, with a cll to a dedicated endpoint using your certificate, your private key and the PROD API Key.

From the cstar-cli project root run the script with the following command:

```
sh ./integration_check/scripts/007-API-key-check-PROD/script.sh /PATH/TO/COMPANY_NAME_PROD.certificate.pem /PATH/TO/COMPANY_NAME_PROD.key PROD_API_KEY
```

Note that you have to specify the path to your certificat&#x65;**,** the path to the private key and the API key as arguments.

The script will print on screen the result, the correct value is **200 .**

**Example of expected** **result:**

```
--<TIMESTAMP>--  https://api.cstar.pagopa.it/rtd/api-key/check
Resolving api.uat.cstar.pagopa.it (api.cstar.pagopa.it)... 20.101.29.138
Connecting to api.uat.cstar.pagopa.it (api.cstar.pagopa.it)|20.101.29.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24 [application/json]
Saving to: ‘STDOUT’
-
  "result": "PASS"
-
```

### 3. Stop the Batch Service execution

### 4. Configure PROD environment variables&#x20;

Configure the environment variables using <mark style="color:blue;">**PROD check preset**</mark>, according to your running artefact ([JAR](https://docs.pagopa.it/centrostella-1/centro-stella/instructions-for-agenzia-delle-entrate-mandate/how-to-join/03.-configure-the-batch-service/install-the-software/how-to-install-jar-version/define-environment-variables#relevant-environment-variables-presets) or [Dockerimage](https://docs.pagopa.it/centrostella-1/centro-stella/instructions-for-agenzia-delle-entrate-mandate/how-to-join/03.-configure-the-batch-service/install-the-software/how-to-install-docker-version/define-environment-variables#relevant-environment-variables-presets)). This configuration allows to run the Batch Service without sending any data to PagoPA, this way you can test the performance of the software in your environment with production data.&#x20;

### 5. Restart the Batch Service execution

### 6. Upload transactions file in input directory

It is preferable to use real data in this step to test Batch Service instance performance.
