diff --git a/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-10.json b/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-10.json new file mode 100644 index 0000000000..1ba46ffa81 --- /dev/null +++ b/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-10.json @@ -0,0 +1,219 @@ +[ + { + "host-admin-api": "localhost:8081", + "host_filing_api": "localhost:8080", + "host-public-api": "localhost:8082", + "test-lei": "B90YWS6AFX2LGWOXJ1LD", + "filing-year": "2018", + "testData": [ + { + "testName": "admin api health check", + "expectedID": "hmda-admin-api", + "testNumber": 0 + }, + { + "testName": "filing health check", + "expectedID": "hmda-filing-api", + "testNumber": 1 + }, + { + "testName": "public-api health check", + "expectedID": "hmda-public-api", + "testNumber": 2 + }, + { + "testName": "create institution", + "requestBody": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "expectedResponse": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "expectedMessage": "Institution B90YWS6AFX2LGWOXJ1LD already exists", + "testNumber": 3 + }, + { + "testName": "institution get api call", + "expectedResponse": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "testNumber": 4 + }, + { + "testName": "test start a filing", + "expectedResponse": { + "filing": { + "period": "2018", + "lei": "B90YWS6AFX2LGWOXJ1LD", + "status": { + "code": 2, + "message": "in-progress" + }, + "filingRequired": true, + "start": 1562651878216, + "end": 0 + }, + "submissions": [] + }, + "testNumber": 5 + }, + { + "testName": "test create a filing", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 1 + }, + "status": { + "code": 1, + "message": "No data has been uploaded yet.", + "description": "The filing period is open and available to accept HMDA data. Make sure your data is in a pipe-delimited text file." + }, + "start": 1562655789617, + "end": 0, + "fileName": "", + "receipt": "" + }, + "testNumber": 6 + }, + { + "testName": "filing psv upload test", + "sourceFile": "../../../../data/2018/clean_test_files/bank_0/clean_file_10_rows_Bank0_syntax_validity.txt", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 7 + }, + "status": { + "code": 3, + "message": "Your file has been uploaded.", + "description": "Your data is ready to be analyzed." + }, + "start": 1562662332293, + "end": 0, + "fileName": "", + "receipt": "" + }, + "testNumber": 7 + }, + { + "testName": "get latest submission test", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 12 + }, + "status": { + "code": 9, + "message": "Your data has syntactical and/or validity edits that need to be reviewed.", + "description": "Your file has been uploaded, but the filing process may not proceed until the file is corrected and re-uploaded." + }, + "start": 1562662935676, + "end": 0, + "fileName": "clean_10_row.txt", + "receipt": "" + }, + "testNumber": 8 + }, + { + "testName": "quality edits test", + "requestBody": { + "verified": true + }, + "testNumber": 9 + }, + { + "testName": "macro edits test", + "requestBody": { + "verified": true + }, + "testNumber": 10 + }, + { + "testName": "sign latest submission test", + "requestBody": { + "signed": true + }, + "testNumber": 11 + } + ] + } +] diff --git a/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-100.json b/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-100.json new file mode 100644 index 0000000000..4272a1c36b --- /dev/null +++ b/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-100.json @@ -0,0 +1,219 @@ +[ + { + "host-admin-api": "localhost:8081", + "host_filing_api": "localhost:8080", + "host-public-api": "localhost:8082", + "test-lei": "B90YWS6AFX2LGWOXJ1LD", + "filing-year": "2018", + "testData": [ + { + "testName": "admin api health check", + "expectedID": "hmda-admin-api", + "testNumber": 0 + }, + { + "testName": "filing health check", + "expectedID": "hmda-filing-api", + "testNumber": 1 + }, + { + "testName": "public-api health check", + "expectedID": "hmda-public-api", + "testNumber": 2 + }, + { + "testName": "create institution", + "requestBody": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "expectedResponse": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "expectedMessage": "Institution B90YWS6AFX2LGWOXJ1LD already exists", + "testNumber": 3 + }, + { + "testName": "institution get api call", + "expectedResponse": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "testNumber": 4 + }, + { + "testName": "test start a filing", + "expectedResponse": { + "filing": { + "period": "2018", + "lei": "B90YWS6AFX2LGWOXJ1LD", + "status": { + "code": 2, + "message": "in-progress" + }, + "filingRequired": true, + "start": 1562651878216, + "end": 0 + }, + "submissions": [] + }, + "testNumber": 5 + }, + { + "testName": "test create a filing", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 1 + }, + "status": { + "code": 1, + "message": "No data has been uploaded yet.", + "description": "The filing period is open and available to accept HMDA data. Make sure your data is in a pipe-delimited text file." + }, + "start": 1562655789617, + "end": 0, + "fileName": "", + "receipt": "" + }, + "testNumber": 6 + }, + { + "testName": "filing psv upload test", + "sourceFile": "../../../../data/2018/clean_test_files/bank_0/clean_file_100_rows_Bank0_syntax_validity.txt", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 7 + }, + "status": { + "code": 3, + "message": "Your file has been uploaded.", + "description": "Your data is ready to be analyzed." + }, + "start": 1562662332293, + "end": 0, + "fileName": "", + "receipt": "" + }, + "testNumber": 7 + }, + { + "testName": "get latest submission test", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 12 + }, + "status": { + "code": 9, + "message": "Your data has syntactical and/or validity edits that need to be reviewed.", + "description": "Your file has been uploaded, but the filing process may not proceed until the file is corrected and re-uploaded." + }, + "start": 1562662935676, + "end": 0, + "fileName": "clean_10_row.txt", + "receipt": "" + }, + "testNumber": 8 + }, + { + "testName": "quality edits test", + "requestBody": { + "verified": true + }, + "testNumber": 9 + }, + { + "testName": "macro edits test", + "requestBody": { + "verified": true + }, + "testNumber": 10 + }, + { + "testName": "sign latest submission test", + "requestBody": { + "signed": true + }, + "testNumber": 11 + } + ] + } +] diff --git a/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-1k.json b/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-1k.json new file mode 100644 index 0000000000..06afadc8c0 --- /dev/null +++ b/newman/localhost/hmda-filing/bank0/hmda-filing-2018-config-bank0-1k.json @@ -0,0 +1,219 @@ +[ + { + "host-admin-api": "localhost:8081", + "host_filing_api": "localhost:8080", + "host-public-api": "localhost:8082", + "test-lei": "B90YWS6AFX2LGWOXJ1LD", + "filing-year": "2018", + "testData": [ + { + "testName": "admin api health check", + "expectedID": "hmda-admin-api", + "testNumber": 0 + }, + { + "testName": "filing health check", + "expectedID": "hmda-filing-api", + "testNumber": 1 + }, + { + "testName": "public-api health check", + "expectedID": "hmda-public-api", + "testNumber": 2 + }, + { + "testName": "create institution", + "requestBody": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "expectedResponse": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 0", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "expectedMessage": "Institution B90YWS6AFX2LGWOXJ1LD already exists", + "testNumber": 3 + }, + { + "testName": "institution get api call", + "expectedResponse": { + "activityYear": 2018, + "lei": "B90YWS6AFX2LGWOXJ1LD", + "agency": 9, + "institutionType": -1, + "institutionId2017": "", + "taxId": "01-0123456", + "rssd": -1, + "emailDomains": [ + "bank0.com" + ], + "respondent": { + "name": "Bank 1", + "state": "", + "city": "" + }, + "parent": { + "idRssd": -1, + "name": "" + }, + "assets": -1, + "otherLenderCode": -1, + "topHolder": { + "idRssd": -1, + "name": "" + }, + "hmdaFiler": true + }, + "testNumber": 4 + }, + { + "testName": "test start a filing", + "expectedResponse": { + "filing": { + "period": "2018", + "lei": "B90YWS6AFX2LGWOXJ1LD", + "status": { + "code": 2, + "message": "in-progress" + }, + "filingRequired": true, + "start": 1562651878216, + "end": 0 + }, + "submissions": [] + }, + "testNumber": 5 + }, + { + "testName": "test create a filing", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 1 + }, + "status": { + "code": 1, + "message": "No data has been uploaded yet.", + "description": "The filing period is open and available to accept HMDA data. Make sure your data is in a pipe-delimited text file." + }, + "start": 1562655789617, + "end": 0, + "fileName": "", + "receipt": "" + }, + "testNumber": 6 + }, + { + "testName": "filing psv upload test", + "sourceFile": "../../../../data/2018/clean_test_files/bank_0/clean_file_100_rows_Bank0_syntax_validity.txt", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 7 + }, + "status": { + "code": 3, + "message": "Your file has been uploaded.", + "description": "Your data is ready to be analyzed." + }, + "start": 1562662332293, + "end": 0, + "fileName": "", + "receipt": "" + }, + "testNumber": 7 + }, + { + "testName": "get latest submission test", + "expectedResponse": { + "id": { + "lei": "B90YWS6AFX2LGWOXJ1LD", + "period": "2018", + "sequenceNumber": 12 + }, + "status": { + "code": 9, + "message": "Your data has syntactical and/or validity edits that need to be reviewed.", + "description": "Your file has been uploaded, but the filing process may not proceed until the file is corrected and re-uploaded." + }, + "start": 1562662935676, + "end": 0, + "fileName": "clean_10_row.txt", + "receipt": "" + }, + "testNumber": 8 + }, + { + "testName": "quality edits test", + "requestBody": { + "verified": true + }, + "testNumber": 9 + }, + { + "testName": "macro edits test", + "requestBody": { + "verified": true + }, + "testNumber": 10 + }, + { + "testName": "sign latest submission test", + "requestBody": { + "signed": true + }, + "testNumber": 11 + } + ] + } +] diff --git a/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-10.json b/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-10.json new file mode 100644 index 0000000000..1778c6d434 --- /dev/null +++ b/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-10.json @@ -0,0 +1,523 @@ +{ + "info": { + "name": "HMDA Filing API Test(s)", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "variable": [ + { + "key": "testNumber", + "value": 0, + "type": "int" + }, + { + "key": "requestBody", + "value": "", + "type": "string" + }, + { + "key": "expectedResponse", + "value": "", + "type": "string" + }, + { + "key": "sequenceNumber", + "value": 0, + "type": "int" + }, + { + "key": "sourceFile", + "value": "", + "type": "string" + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "testNumber = pm.variables.get(\"testNumber\");", + "let testData = pm.iterationData.get(\"testData\")", + "let requestBody = JSON.stringify(testData[testNumber]? testData[testNumber].requestBody:{} )", + "let expectedResponse = JSON.stringify(testData[testNumber]? testData[testNumber].expectedResponse:{} )", + "let sourceFile = testData[testNumber].sourceFile", + "++testNumber", + "pm.variables.set(\"testNumber\",testNumber);", + "pm.variables.set(\"requestBody\",requestBody);", + "pm.variables.set(\"sourceFile\",sourceFile);" + ] + } + } + ], + "item": [ + { + "name": "ADMIN API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Admin API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-admin-api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "ADMIN API HEALTH CHECK" + }, + "response": [] + }, + { + "name": "Filing API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Filing API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Filing HEALTH CHECK" + }, + "response": [] + }, + { + "name": "HMDA Public API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Public API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-public-api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Public HEALTH CHECK" + }, + "response": [] + }, + { + "name": "Create Institution", + "event": [ + { + "listen": "test", + "script": { + "id": "2b368fb0-0268-4c8a-974e-bc10439be682", + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([201,400]);", + "});", + "pm.test(\"Create Institution\", function () {", + "var actualResponse = JSON.parse(responseBody);", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "if(pm.response.code==400){pm.expect(actualResponse.message).to.equal(testDataChunk.expectedMessage);}", + "if(pm.response.code==201){pm.expect(actualResponse).to.eql(testDataChunk.expectedResponse)}", + "});", + "" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "url": { + "raw": "http://{{host-admin-api}}/institutions", + "protocol": "http", + "host": [ + "{{host-admin-api}}" + ], + "path": [ + "institutions" + ] + } + }, + "response": [] + }, + { + "name": "Get Institution Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"GET Institution Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "console.log(JSON.stringify(actualResponse))", + "console.log(JSON.stringify(testDataChunk.expectedResponse))", + "pm.expect(actualResponse).to.eql(testDataChunk.expectedResponse)", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-admin-api}}/institutions/{{test-lei}}/year/{{filing-year}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "GET Institution Test" + }, + "response": [] + }, + { + "name": "Start A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "if(pm.response.code==200){pm.expect(actualResponse.filing.period).to.equal(testDataChunk.expectedResponse.filing.period)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.lei).to.equal(testDataChunk.expectedResponse.filing.lei)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.period).to.equal(testDataChunk.expectedResponse.filing.period)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.status).to.eql(testDataChunk.expectedResponse.filing.status)}", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Start A Filing Test" + }, + "response": [] + }, + { + "name": "Create A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 201\",function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Create A Filing Test\", function () {", + "let actualResponseID = pm.response.json().id", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponseID.lei).to.equal(testDataChunk.expectedResponse.id.lei)", + "pm.expect(actualResponseID.period).to.equal(testDataChunk.expectedResponse.id.period)", + "pm.variables.set(\"sequenceNumber\",actualResponseID.sequenceNumber);", + "console.log(pm.variables.get(\"sequenceNumber\"))", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Create A Filing Test" + }, + "response": [] + }, + { + "name": "Upload A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 202\",function () {", + "pm.response.to.have.status(202);", + "});", + "", + "pm.test(\"Upload A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.status.code).to.equal(testDataChunk.expectedResponse.status.code)", + "pm.expect(actualResponse.status.message).to.equal(testDataChunk.expectedResponse.status.message)", + "pm.expect(actualResponse.status.description).to.equal(testDataChunk.expectedResponse.status.description)", + "setTimeout(function(){console.log(\"Sleeping for 60 seconds before next request.\");}, 60000);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}", + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "enabled": true, + "src": "{{sourceFile}}" + } + ] + }, + "description": "Upload A Filing Test" + }, + "response": [] + }, + { + "name": "Get Latest Submission Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get Latest Submission Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.status.code).to.be.oneOf([13]);", + "console.log(JSON.stringify(actualResponse))", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/latest", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Get Latest Submission Test" + }, + "response": [] + }, { + "name": "Quality Edits Verification Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([13]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/edits/quality", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Quality Edits Verification Test" + }, + "response": [] + }, { + "name": "Macro Edits Verification Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([14]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/edits/macro", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Macro Edits Verification Test" + }, + "response": [] + }, + { + "name": "Sign A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([15]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/sign", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Sign A Filing Test" + }, + "response": [] + } + ] +} diff --git a/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-100.json b/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-100.json new file mode 100644 index 0000000000..1778c6d434 --- /dev/null +++ b/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-100.json @@ -0,0 +1,523 @@ +{ + "info": { + "name": "HMDA Filing API Test(s)", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "variable": [ + { + "key": "testNumber", + "value": 0, + "type": "int" + }, + { + "key": "requestBody", + "value": "", + "type": "string" + }, + { + "key": "expectedResponse", + "value": "", + "type": "string" + }, + { + "key": "sequenceNumber", + "value": 0, + "type": "int" + }, + { + "key": "sourceFile", + "value": "", + "type": "string" + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "testNumber = pm.variables.get(\"testNumber\");", + "let testData = pm.iterationData.get(\"testData\")", + "let requestBody = JSON.stringify(testData[testNumber]? testData[testNumber].requestBody:{} )", + "let expectedResponse = JSON.stringify(testData[testNumber]? testData[testNumber].expectedResponse:{} )", + "let sourceFile = testData[testNumber].sourceFile", + "++testNumber", + "pm.variables.set(\"testNumber\",testNumber);", + "pm.variables.set(\"requestBody\",requestBody);", + "pm.variables.set(\"sourceFile\",sourceFile);" + ] + } + } + ], + "item": [ + { + "name": "ADMIN API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Admin API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-admin-api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "ADMIN API HEALTH CHECK" + }, + "response": [] + }, + { + "name": "Filing API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Filing API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Filing HEALTH CHECK" + }, + "response": [] + }, + { + "name": "HMDA Public API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Public API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-public-api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Public HEALTH CHECK" + }, + "response": [] + }, + { + "name": "Create Institution", + "event": [ + { + "listen": "test", + "script": { + "id": "2b368fb0-0268-4c8a-974e-bc10439be682", + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([201,400]);", + "});", + "pm.test(\"Create Institution\", function () {", + "var actualResponse = JSON.parse(responseBody);", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "if(pm.response.code==400){pm.expect(actualResponse.message).to.equal(testDataChunk.expectedMessage);}", + "if(pm.response.code==201){pm.expect(actualResponse).to.eql(testDataChunk.expectedResponse)}", + "});", + "" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "url": { + "raw": "http://{{host-admin-api}}/institutions", + "protocol": "http", + "host": [ + "{{host-admin-api}}" + ], + "path": [ + "institutions" + ] + } + }, + "response": [] + }, + { + "name": "Get Institution Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"GET Institution Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "console.log(JSON.stringify(actualResponse))", + "console.log(JSON.stringify(testDataChunk.expectedResponse))", + "pm.expect(actualResponse).to.eql(testDataChunk.expectedResponse)", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-admin-api}}/institutions/{{test-lei}}/year/{{filing-year}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "GET Institution Test" + }, + "response": [] + }, + { + "name": "Start A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "if(pm.response.code==200){pm.expect(actualResponse.filing.period).to.equal(testDataChunk.expectedResponse.filing.period)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.lei).to.equal(testDataChunk.expectedResponse.filing.lei)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.period).to.equal(testDataChunk.expectedResponse.filing.period)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.status).to.eql(testDataChunk.expectedResponse.filing.status)}", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Start A Filing Test" + }, + "response": [] + }, + { + "name": "Create A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 201\",function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Create A Filing Test\", function () {", + "let actualResponseID = pm.response.json().id", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponseID.lei).to.equal(testDataChunk.expectedResponse.id.lei)", + "pm.expect(actualResponseID.period).to.equal(testDataChunk.expectedResponse.id.period)", + "pm.variables.set(\"sequenceNumber\",actualResponseID.sequenceNumber);", + "console.log(pm.variables.get(\"sequenceNumber\"))", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Create A Filing Test" + }, + "response": [] + }, + { + "name": "Upload A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 202\",function () {", + "pm.response.to.have.status(202);", + "});", + "", + "pm.test(\"Upload A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.status.code).to.equal(testDataChunk.expectedResponse.status.code)", + "pm.expect(actualResponse.status.message).to.equal(testDataChunk.expectedResponse.status.message)", + "pm.expect(actualResponse.status.description).to.equal(testDataChunk.expectedResponse.status.description)", + "setTimeout(function(){console.log(\"Sleeping for 60 seconds before next request.\");}, 60000);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}", + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "enabled": true, + "src": "{{sourceFile}}" + } + ] + }, + "description": "Upload A Filing Test" + }, + "response": [] + }, + { + "name": "Get Latest Submission Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get Latest Submission Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.status.code).to.be.oneOf([13]);", + "console.log(JSON.stringify(actualResponse))", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/latest", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Get Latest Submission Test" + }, + "response": [] + }, { + "name": "Quality Edits Verification Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([13]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/edits/quality", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Quality Edits Verification Test" + }, + "response": [] + }, { + "name": "Macro Edits Verification Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([14]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/edits/macro", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Macro Edits Verification Test" + }, + "response": [] + }, + { + "name": "Sign A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([15]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/sign", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Sign A Filing Test" + }, + "response": [] + } + ] +} diff --git a/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-1k.json b/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-1k.json new file mode 100644 index 0000000000..4e34df2bad --- /dev/null +++ b/newman/localhost/hmda-filing/bank0/hmda-filing-api-test-1k.json @@ -0,0 +1,523 @@ +{ + "info": { + "name": "HMDA Filing API Test(s)", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "variable": [ + { + "key": "testNumber", + "value": 0, + "type": "int" + }, + { + "key": "requestBody", + "value": "", + "type": "string" + }, + { + "key": "expectedResponse", + "value": "", + "type": "string" + }, + { + "key": "sequenceNumber", + "value": 0, + "type": "int" + }, + { + "key": "sourceFile", + "value": "", + "type": "string" + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "testNumber = pm.variables.get(\"testNumber\");", + "let testData = pm.iterationData.get(\"testData\")", + "let requestBody = JSON.stringify(testData[testNumber]? testData[testNumber].requestBody:{} )", + "let expectedResponse = JSON.stringify(testData[testNumber]? testData[testNumber].expectedResponse:{} )", + "let sourceFile = testData[testNumber].sourceFile", + "++testNumber", + "pm.variables.set(\"testNumber\",testNumber);", + "pm.variables.set(\"requestBody\",requestBody);", + "pm.variables.set(\"sourceFile\",sourceFile);" + ] + } + } + ], + "item": [ + { + "name": "ADMIN API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Admin API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-admin-api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "ADMIN API HEALTH CHECK" + }, + "response": [] + }, + { + "name": "Filing API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Filing API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Filing HEALTH CHECK" + }, + "response": [] + }, + { + "name": "HMDA Public API Health Check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Public API Health Check\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.service).to.equal(testDataChunk.expectedID);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-public-api}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Public HEALTH CHECK" + }, + "response": [] + }, + { + "name": "Create Institution", + "event": [ + { + "listen": "test", + "script": { + "id": "2b368fb0-0268-4c8a-974e-bc10439be682", + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([201,400]);", + "});", + "pm.test(\"Create Institution\", function () {", + "var actualResponse = JSON.parse(responseBody);", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "if(pm.response.code==400){pm.expect(actualResponse.message).to.equal(testDataChunk.expectedMessage);}", + "if(pm.response.code==201){pm.expect(actualResponse).to.eql(testDataChunk.expectedResponse)}", + "});", + "" + ] + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "url": { + "raw": "http://{{host-admin-api}}/institutions", + "protocol": "http", + "host": [ + "{{host-admin-api}}" + ], + "path": [ + "institutions" + ] + } + }, + "response": [] + }, + { + "name": "Get Institution Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"GET Institution Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "console.log(JSON.stringify(actualResponse))", + "console.log(JSON.stringify(testDataChunk.expectedResponse))", + "pm.expect(actualResponse).to.eql(testDataChunk.expectedResponse)", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host-admin-api}}/institutions/{{test-lei}}/year/{{filing-year}}", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "GET Institution Test" + }, + "response": [] + }, + { + "name": "Start A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "if(pm.response.code==200){pm.expect(actualResponse.filing.period).to.equal(testDataChunk.expectedResponse.filing.period)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.lei).to.equal(testDataChunk.expectedResponse.filing.lei)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.period).to.equal(testDataChunk.expectedResponse.filing.period)}", + "if(pm.response.code==200){pm.expect(actualResponse.filing.status).to.eql(testDataChunk.expectedResponse.filing.status)}", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Start A Filing Test" + }, + "response": [] + }, + { + "name": "Create A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 201\",function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Create A Filing Test\", function () {", + "let actualResponseID = pm.response.json().id", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponseID.lei).to.equal(testDataChunk.expectedResponse.id.lei)", + "pm.expect(actualResponseID.period).to.equal(testDataChunk.expectedResponse.id.period)", + "pm.variables.set(\"sequenceNumber\",actualResponseID.sequenceNumber);", + "console.log(pm.variables.get(\"sequenceNumber\"))", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Create A Filing Test" + }, + "response": [] + }, + { + "name": "Upload A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 202\",function () {", + "pm.response.to.have.status(202);", + "});", + "", + "pm.test(\"Upload A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.status.code).to.equal(testDataChunk.expectedResponse.status.code)", + "pm.expect(actualResponse.status.message).to.equal(testDataChunk.expectedResponse.status.message)", + "pm.expect(actualResponse.status.description).to.equal(testDataChunk.expectedResponse.status.description)", + "setTimeout(function(){console.log(\"Sleeping for 100 seconds before next request.\");}, 100000);", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}", + "method": "POST", + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "enabled": true, + "src": "{{sourceFile}}" + } + ] + }, + "description": "Upload A Filing Test" + }, + "response": [] + }, + { + "name": "Get Latest Submission Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200\",function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Get Latest Submission Test\", function () {", + "let actualResponse = pm.response.json()", + "let testData = pm.iterationData.get(\"testData\")", + "let testDataChunk = testData[testNumber-1]", + "pm.expect(actualResponse.status.code).to.be.oneOf([13]);", + "console.log(JSON.stringify(actualResponse))", + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/latest", + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": {}, + "description": "Get Latest Submission Test" + }, + "response": [] + }, { + "name": "Quality Edits Verification Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([13]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/edits/quality", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Quality Edits Verification Test" + }, + "response": [] + }, { + "name": "Macro Edits Verification Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([14]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/edits/macro", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Macro Edits Verification Test" + }, + "response": [] + }, + { + "name": "Sign A Filing Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "pm.test(\"Status code is 200, 201 or 400\",function () {", + "pm.expect(pm.response.code).to.be.oneOf([200,201,400]);", + "});", + "", + "pm.test(\"Start A Filing Test\", function () {", + "let actualResponse = pm.response.json()", + "console.log(JSON.stringify(actualResponse))", + "pm.expect(actualResponse.status.code).to.be.oneOf([15]);", + + "});" + ] + } + } + ], + "request": { + "url": "http://{{host_filing_api}}/institutions/{{test-lei}}/filings/{{filing-year}}/submissions/{{sequenceNumber}}/sign", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{{requestBody}}" + }, + "description": "Sign A Filing Test" + }, + "response": [] + } + ] +}