Test UAT

1. Download the checklist

2. Generate input and expected output file from CSTAR-CLI tool

Customize and run the following command:

cst sender aggregates --sender <ABI> --action trx_and_aggr --aggr-qty 10

Check if the files are created correctly.

ls -a ./generated

Example of expected output:

.               ADE.12345.TRNLOG.20220607.202239.001.01.csv.expected
..              CSTAR.12345.TRNLOG.20220607.202239.001.csv

3. Run the Batch Service

Run the Batch Service and upload to the input folder the transactions file, which follows the naming conventionCSTAR.<ABI>.TRNLOG.<DATE>.<TIME>.001.csv.

From the root of CSTAR-CLI customize and run the following command:

cp ./generated/CSTAR.12345.TRNLOG.20220607.202239.001.csv /PATH/TO/BATCH/SERVICE/INPUT_DIRECTORY

4. Compare the expected output file with the produced one

  • Move to CSTAR-CLI root.

  • Customize and run the following command:

sh ./integration_check/scripts/003-expected-file-check-UAT/script.sh ./generated/ADE.12345.TRNLOG.20220607.202239.001.01.csv.expected /PATH/TO/BATCH_SERVICE/OUTPUTDIR/ADE.<ABI>.TRNLOG.<DATE>.<TIME>.001.01.csv

Expected result:

PASS, the files are equal!

5. Compare the produced output file with the deposited one

  • Move to CSTAR-CLI root.

  • Customize and run the following command:

sh ./integration_check/scripts/004-remote-file-check-UAT/script.sh /PATH/TO/BATCH_SERVICE/OUTPUTDIR/ADE.<ABI>.TRNLOG.<DATE>.<TIME>.001.01.csv /PATH/TO/ACME_UAT.certificate.pem /PATH/TO/ACME_UAT.key UAT_API_KEY

Expected result:

PASS, the files are equal!

6. Compare the downloaded AdE error files with the generated one

6a. Generate a test AdE error file

After a successful run of script 004-remote-file-check-UAT a file should be created inside <cli-root>/deposited-remotely (referred in the following command as DOWNLOADED_FILE.csv).

  • Move to CSTAR-CLI root.

  • Customize and run the following command:

sh ./integration_check/scripts/005a-extract-ade-ack-UAT/script.sh ./deposited-remotely/DOWNLOADED_FILE.csv /PATH/TO/COMPANY_NAME_UAT.certificate.pem /PATH/TO/COMPANY_NAME_UAT.key UAT_API_KEY

Expected result:

HTTP request sent, awaiting response... 201 Created
[...]
Done

6b. Compare the expected test AdE error file with the downloaded one

After a successful run of script 005a-extract-ade-ack-UAT a file should be created inside <cli-root>/generated/ade-acks (referred in the following command as EXPECTED_ADE_ACK.csv)

Please wait at least 1 hour after the run of script 005a, then:

  • make sure to empty the Batch Service's AdE errors folder,

  • start the Batch Service,

  • make sure AdE error files are downloaded (e.g. by submitting another test input file).

  • Move to CSTAR-CLI root.

  • Customize and run the following command:

sh ./integration_check/scripts/005b-ade-ack-remote-check-UAT/script.sh /PATH/TO/EXPECTED_ADE_ACK.expected /PATH/TO/BATCH_SERVICE/ADE_ERROR/DIRECTORY

Expected result:

PASS, the files are equal!

7. Send the compiled checklist

Once the test on UAT is completed, send the compiled checklist by email to [email protected] with the following subject:

checklist UAT COMPANY_NAME

8. Run your own test

From now on you can run your own test with your custom input files.

Last updated