summaryrefslogtreecommitdiffstats
path: root/portal-BE/deliveries/postman
diff options
context:
space:
mode:
authorDominik Mizyn <d.mizyn@samsung.com>2019-08-22 14:04:44 +0200
committerDominik Mizyn <d.mizyn@samsung.com>2019-08-22 14:04:47 +0200
commit88db33c6a8e2a03e72a0c676f51937418ee84912 (patch)
tree254454cefc443f3521f74299e5d2d61821f29ba5 /portal-BE/deliveries/postman
parent233bc890b4c79e78ff7c654568ff5b327df7648f (diff)
Postman tests up
Postman tests up Issue-ID: PORTAL-710 Change-Id: I2bdb4ba12b35f7c17014eff2a68fd5534e307bbd Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'portal-BE/deliveries/postman')
-rw-r--r--portal-BE/deliveries/postman/Portal.postman_collection.json267
1 files changed, 267 insertions, 0 deletions
diff --git a/portal-BE/deliveries/postman/Portal.postman_collection.json b/portal-BE/deliveries/postman/Portal.postman_collection.json
new file mode 100644
index 00000000..e0b51e9e
--- /dev/null
+++ b/portal-BE/deliveries/postman/Portal.postman_collection.json
@@ -0,0 +1,267 @@
+{
+ "info": {
+ "_postman_id": "1c6e52dd-039b-400b-a986-49d25e5a1428",
+ "name": "Portal",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "LanguageController",
+ "item": [
+ {
+ "name": "localhost:8080/auxapi/languageSetting/user/2",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "2fc1aa20-6048-4500-bdd2-5b2cc070f27c",
+ "exec": [
+ "pm.test(\"Status code is 200\", function () {",
+ " pm.response.to.have.status(200);",
+ "});",
+ "pm.test(\"Response time is less than 200ms\", function () {",
+ " pm.expect(pm.response.responseTime).to.be.below(200);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "auth": {
+ "type": "basic",
+ "basic": [
+ {
+ "key": "password",
+ "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
+ "type": "string"
+ },
+ {
+ "key": "username",
+ "value": "demo",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "GET",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": ""
+ },
+ "url": {
+ "raw": "localhost:8080/auxapi/languageSetting/user/2",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "auxapi",
+ "languageSetting",
+ "user",
+ "2"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "localhost:8080/auxapi/language",
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": ""
+ },
+ "url": {
+ "raw": "localhost:8080/auxapi/language",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "auxapi",
+ "language"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "localhost:8080/auxapi/language",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "2fc1aa20-6048-4500-bdd2-5b2cc070f27c",
+ "exec": [
+ "pm.test(\"Status code is 200\", function () {",
+ " pm.response.to.have.status(200);",
+ "});",
+ "pm.test(\"Response time is less than 200ms\", function () {",
+ " pm.expect(pm.response.responseTime).to.be.below(200);",
+ "});"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "auth": {
+ "type": "basic",
+ "basic": [
+ {
+ "key": "password",
+ "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
+ "type": "string"
+ },
+ {
+ "key": "username",
+ "value": "demo",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "name": "Content-Type",
+ "value": "application/json",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"languageName\": \"PL\",\n \"languageAlias\": \"Polish\"\n}"
+ },
+ "url": {
+ "raw": "localhost:8080/auxapi/language",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "auxapi",
+ "language"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "localhost:8080/auxapi/language",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "2fc1aa20-6048-4500-bdd2-5b2cc070f27c",
+ "exec": [
+ "pm.test(\"Status code is 200\", function () {",
+ " pm.response.to.have.status(200);",
+ "});",
+ "",
+ "pm.test(\"Response time is less than 200ms\", function () {",
+ " pm.expect(pm.response.responseTime).to.be.below(200);",
+ "});",
+ "",
+ "var customer = JSON.parse(responseBody);",
+ "",
+ "tests[\"Message is valid\"] = customer.message === \"FAILURE\"",
+ "tests[\"Status is valid\"] = customer.status === \"ERROR\"",
+ "tests[\"Response is valid\"] = customer.response === \"FnLanguage is not valid, may have unsafe html content\""
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "auth": {
+ "type": "basic",
+ "basic": [
+ {
+ "key": "password",
+ "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
+ "type": "string"
+ },
+ {
+ "key": "username",
+ "value": "demo",
+ "type": "string"
+ }
+ ]
+ },
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "name": "Content-Type",
+ "value": "application/json",
+ "type": "text"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"languageName\": \"PL\",\n \"languageAlias\": \"<script>alert(“XSS”)</script>\"\n}"
+ },
+ "url": {
+ "raw": "localhost:8080/auxapi/language",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "auxapi",
+ "language"
+ ]
+ },
+ "description": "XSS test"
+ },
+ "response": []
+ }
+ ],
+ "auth": {
+ "type": "basic",
+ "basic": [
+ {
+ "key": "password",
+ "value": "4Gl6WL1bmwviYm+XZa6pS1vC0qKXWtn9wcZWdLx61L0=",
+ "type": "string"
+ },
+ {
+ "key": "username",
+ "value": "demo",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "name": "http://localhost:8080/logout",
+ "request": {
+ "auth": {
+ "type": "noauth"
+ },
+ "method": "GET",
+ "header": [],
+ "body": {
+ "mode": "raw",
+ "raw": ""
+ },
+ "url": {
+ "raw": "http://localhost:8080/logout",
+ "protocol": "http",
+ "host": [
+ "localhost"
+ ],
+ "port": "8080",
+ "path": [
+ "logout"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+} \ No newline at end of file