Commit ea8200b4 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

rename system tests

parent c7692c60
......@@ -2,7 +2,7 @@
"info": {
"_postman_id": "921725c4-398e-4e02-817b-266a9258fe62",
"name": "Endpoint bg/add",
"description": "This collection tests the direct responses of the API Endpoint bg/add of the [Reasoning WebAPI for Dare2Del](https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator) (Version 1.0.0). It is not checked, whether the correct information is stored on the server. This is part of the user stories.\n\nThe collection assumes that the background knowledge is empty.\n\nThe collection is to be run with the data file `endpoint_bg@add_data.json`.",
"description": "This collection tests the direct responses of the API Endpoint bg/add of the [Reasoning WebAPI for Dare2Del](https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator) (Version 1.0.0). It is not checked, whether the correct information is stored on the server. This is part of the user stories.\n\nThe collection assumes that the background knowledge is empty.\n\nThe collection is to be run with the data file `endpoint_bg@add-data.json`.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
......@@ -13,12 +13,12 @@
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
"pm.test(pm.variables.get(\"test_prefix\") + \"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"",
"pm.test(\"Response is JSON object\", function() {",
"pm.test(pm.variables.get(\"test_prefix\") + \"Response is JSON object\", function() {",
" pm.response.to.be.withBody;",
" pm.response.to.be.json;",
"",
......@@ -55,13 +55,13 @@
"listen": "test",
"script": {
"exec": [
"pm.test(\"Case: Created\", function () {",
"pm.test(pm.variables.get(\"test_prefix\") + \"Case: Created\", function () {",
" pm.expect(pm.response.code).to.eql(201);",
"});",
"",
"var jsonData;",
"",
"pm.test(\"Response JSON schema valid\", function() {",
"pm.test(pm.variables.get(\"test_prefix\") + \"Response JSON schema valid\", function() {",
" pm.response.to.be.withBody;",
" pm.response.to.be.json;",
"",
......@@ -72,7 +72,7 @@
" pm.expect(tv4.validate(jsonData, schema)).to.be.true;",
"});",
"",
"pm.test(\"Received and added all\", function () {",
"pm.test(pm.variables.get(\"test_prefix\") + \"Received and added all\", function () {",
" expected_count = pm.iterationData.get(\"item_count\")",
"",
" pm.expect(jsonData.received).to.eql(expected_count);",
......@@ -127,13 +127,13 @@
"listen": "test",
"script": {
"exec": [
"pm.test(\"Case: No Change\", function () {",
"pm.test(pm.variables.get(\"test_prefix\") + \"Case: No Change\", function () {",
" pm.expect(pm.response.code).to.eql(200);",
"});",
"",
"var jsonData;",
"",
"pm.test(\"Response JSON schema valid\", function() {",
"pm.test(\"pm.variables.get(\"test_prefix\") + Response JSON schema valid\", function() {",
" pm.response.to.be.withBody;",
" pm.response.to.be.json;",
"",
......@@ -144,7 +144,7 @@
" pm.expect(tv4.validate(jsonData, schema)).to.be.true;",
"});",
"",
"pm.test(\"Received all, added none\", function () {",
"pm.test(pm.variables.get(\"test_prefix\") + \"Received all, added none\", function () {",
" expected_count = pm.iterationData.get(\"item_count\")",
"",
" pm.expect(jsonData.received).to.eql(expected_count);",
......@@ -188,11 +188,32 @@
"add"
]
},
"description": "Add a single, previously unknown file (good case)."
"description": "Add a single, previously known file (good case)."
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
"pm.variables.set(\"test_prefix\", \"[\" + (pm.info.iteration + 1).toString() + '/' ",
" + pm.info.iterationCount.toString() + '] ' + pm.info.requestName + \": \");"
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "expected_json_schema",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment