From bba439a30a5dfcc69780a4d0541650a4b3040fd9 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Fri, 5 May 2023 13:34:12 +0530 Subject: [PATCH 01/47] Add files via upload --- api/Scheduler_OpenAPI_17042023_V3.json | 3702 ++++++++++++++++++++++++ 1 file changed, 3702 insertions(+) create mode 100644 api/Scheduler_OpenAPI_17042023_V3.json diff --git a/api/Scheduler_OpenAPI_17042023_V3.json b/api/Scheduler_OpenAPI_17042023_V3.json new file mode 100644 index 0000000..974da50 --- /dev/null +++ b/api/Scheduler_OpenAPI_17042023_V3.json @@ -0,0 +1,3702 @@ +{ + "openapi" : "3.0.1", + "info" : { + "title" : "Govstack Scheduler API", + "description" : "Interfaces to services rendered by Scheduler building block", + "termsOfService" : "TBD", + "contact" : { + "email" : "psramkumar2@gmail.com" + }, + "license" : { + "name" : "Apache 2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version" : "1.0.0" + }, + "externalDocs" : { + "description" : "Find out more about scheduler", + "url" : "https://www.govstack.global/" + }, + "tags" : [ { + "name" : "event", + "description" : "event management API" + }, { + "name" : "entity", + "description" : "entity management API" + }, { + "name" : "alert_schedule", + "description" : "alert_schedule management API" + }, { + "name" : "resource", + "description" : "resource management API" + }, { + "name" : "subscribers", + "description" : "subscriber management API" + }, { + "name" : "message", + "description" : "message management API" + }, { + "name" : "log", + "description" : "log management API" + }, { + "name" : "affiliation", + "description" : "affiliation management API" + }, { + "name" : "appointment", + "description" : "appointment management API" + } ], + "paths" : { + "/event/new" : { + "post" : { + "tags" : [ "event" ], + "summary" : "create a new event, in event_list with given event_details, returns new event id or failure error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/event_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created event", + "example" : "event_name:doctorconsultation,event_id:12345" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/event/modifications" : { + "put" : { + "tags" : [ "event" ], + "summary" : "changes values of specific details (as given by event_details) of given event (selected by event_filter)in event_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "event_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "12345" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/event_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, event updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/event" : { + "delete" : { + "tags" : [ "event" ], + "summary" : "delete a predefined event in event_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "event_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "12345" + } + } ], + "responses" : { + "200" : { + "description" : "success, event cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/event/list_details" : { + "get" : { + "tags" : [ "event" ], + "summary" : "get list of events filetered by criteria in event_filter and return info specified by event_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/event_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,event_list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/event_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/appointment/new" : { + "post" : { + "tags" : [ "appointment" ], + "summary" : "create a new appointment, in appointment_list with given appointment_details, returns new appointment id or failure error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/appointment_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created appointment", + "example" : "appointment_name:doctorconsultation,appointment_id:1" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/appointment/modifications" : { + "put" : { + "tags" : [ "appointment" ], + "summary" : "changes values of specific details (as given by appointment_details) of given appointment (selected by appointment_filter)in appointment_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "appointment_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/appointment_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, appointment updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/appointment" : { + "delete" : { + "tags" : [ "appointment" ], + "summary" : "delete a predefined appointment in appointment_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "appointment_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + } ], + "responses" : { + "200" : { + "description" : "success, appointment cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/appointment/list_details" : { + "get" : { + "tags" : [ "appointment" ], + "summary" : "get list of appointments filetered by criteria in appointment_filter and return info specified by appointment_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/appointment_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,appointment_list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/appointment_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/entity/new" : { + "post" : { + "tags" : [ "entity" ], + "summary" : "create a new entity, in entity_list with given entity_details, returns new entity id or entity error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/entity_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created entity", + "example" : "entity_name:xyz hospital,entity_id:67890" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/entity/modifications" : { + "put" : { + "tags" : [ "entity" ], + "summary" : "changes values of specific details (as given by entity_details) of given entity (selected by entity_filter)in entity_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "entity_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "67890" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/entity_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, entity updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/entity" : { + "delete" : { + "tags" : [ "entity" ], + "summary" : "delete a predefined entity in entity_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "entity_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "67890" + } + } ], + "responses" : { + "200" : { + "description" : "success, entity cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/entity/list_details" : { + "get" : { + "tags" : [ "entity" ], + "summary" : "get list of entities filetered by criteria in entity_filter and return info specified by entity_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/entity_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,entity list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/entity_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/resource/new" : { + "post" : { + "tags" : [ "resource" ], + "summary" : "create a new resource, in resource_list with given resource_details, returns new resource id or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/resource_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created resource", + "example" : "resource_name:xyz hospital,resource_id:54321" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/resource/modifications" : { + "put" : { + "tags" : [ "resource" ], + "summary" : "changes values of specific details (as given by resource_details) of given resource (selected by resource_filter)in resource_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "resource_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "54321" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/resource_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, resource updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/resource" : { + "delete" : { + "tags" : [ "resource" ], + "summary" : "delete a predefined resource in resource_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "resource_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "54321" + } + } ], + "responses" : { + "200" : { + "description" : "success, resource cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/resource/list_details" : { + "get" : { + "tags" : [ "resource" ], + "summary" : "get list of entities filetered by criteria in resource_filter and return info specified by resource_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/resource_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,resource list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/resource_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/resource/availability" : { + "get" : { + "tags" : [ "resource" ], + "summary" : "get details of resources matching criteria given by free_resource_filter, that are free(unallocated) in a given date range and entity and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/resource_get_availability_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,resource list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/free_resource_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/subscriber/new" : { + "post" : { + "tags" : [ "subscriber" ], + "summary" : "create a new subscriber, in subscriber_list with given subscriber_details, returns new subscriber id or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/subscriber_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created subscriber", + "example" : "subscriber_name:xyz hospital,subscriber_id:12345" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/subscriber/modifications" : { + "put" : { + "tags" : [ "subscriber" ], + "summary" : "changes values of specific details (as given by subscriber_details) of given subscriber (selected by subscriber_filter)in subscriber_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "subscriber_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "12345" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/subscriber_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, subscriber updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/subscriber" : { + "delete" : { + "tags" : [ "subscriber" ], + "summary" : "delete a predefined subscriber in subscriber_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "subscriber_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "12345" + } + } ], + "responses" : { + "200" : { + "description" : "success, subscriber cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/subscriber/list_details" : { + "get" : { + "tags" : [ "subscriber" ], + "summary" : "get list of entities filetered by criteria in subscriber_filter and return info specified by subscriber_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/subscriber_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,message list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/subscriber_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/message/new" : { + "post" : { + "tags" : [ "message" ], + "summary" : "create a new message, in message_list with given message_details, returns new message id or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/message_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created message", + "example" : "message_name:xyz hospital,message_id:1" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/message/modifications" : { + "put" : { + "tags" : [ "message" ], + "summary" : "changes values of specific details (as given by message_details) of given message (selected by message_filter)in message_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "message_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/message_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, message updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/message" : { + "delete" : { + "tags" : [ "message" ], + "summary" : "delete a predefined message in message_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "message_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + } ], + "responses" : { + "200" : { + "description" : "success, message cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/message/list_details" : { + "get" : { + "tags" : [ "message" ], + "summary" : "get list of entities filetered by criteria in message_filter and return info specified by message_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/message_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,message list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/message_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/affiliation/new" : { + "post" : { + "tags" : [ "affiliation" ], + "summary" : "create a new affiliation, in affiliation_list with given affiliation_details, returns new affiliation id or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/affiliation_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created affiliation", + "example" : "affiliation_name:xyz hospital,affiliation_id:1" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/affiliation/modifications" : { + "put" : { + "tags" : [ "affiliation" ], + "summary" : "changes values of specific details (as given by affiliation_details) of given affiliation (selected by affiliation_filter)in affiliation_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "affiliation_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/affiliation_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, affiliation updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/affiliation" : { + "delete" : { + "tags" : [ "affiliation" ], + "summary" : "delete a predefined affiliation in affiliation_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "affiliation_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + } ], + "responses" : { + "200" : { + "description" : "success, affiliation cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/affiliation/list_details" : { + "get" : { + "tags" : [ "affiliation" ], + "summary" : "get list of entities filetered by criteria in affiliation_filter and return info specified by affiliation_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/affiliation_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,affiliation list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/affiliation_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/alert_schedule/new" : { + "post" : { + "tags" : [ "alert_schedule" ], + "summary" : "create a new alert_schedule, in alert_schedule_list with given alert_schedule_details, returns new alert_schedule id or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/alert_schedule_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created alert_schedule", + "example" : "alert_schedule_name:xyz hospital,alert_schedule_id:1" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/alert_schedule/modifications" : { + "put" : { + "tags" : [ "alert_schedule" ], + "summary" : "changes values of specific details (as given by alert_schedule_details) of given alert_schedule (selected by alert_schedule_filter)in alert_schedule_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + }, + "example" : "Organizer" + }, { + "name" : "alert_schedule_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/alert_schedule_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, alert_schedule updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/alert_schedule" : { + "delete" : { + "tags" : [ "alert_schedule" ], + "summary" : "delete a predefined alert_schedule in alert_schedule_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "alert_schedule_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + } ], + "responses" : { + "200" : { + "description" : "success, alert_schedule cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/alert_schedule/list_details" : { + "get" : { + "tags" : [ "alert_schedule" ], + "summary" : "get list of entities filetered by criteria in alert_schedule_filter and return info specified by alert_schedule_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/alert_schedule_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,alert_schedule list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/alert_schedule_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/log/new" : { + "post" : { + "tags" : [ "log" ], + "summary" : "create a new log, in log_list with given log_details, returns new log id or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/log_new_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "string", + "description" : "ID of created log", + "example" : "log_name:xyz hospital,log_id:1" + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/log/modifications" : { + "put" : { + "tags" : [ "log" ], + "summary" : "changes values of specific details (as given by log_details) of given log (selected by log_filter)in log_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "log_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/log_modify_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success, log updated" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/log" : { + "delete" : { + "tags" : [ "log" ], + "summary" : "delete a predefined log in log_list and returns success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "log_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "1" + } + } ], + "responses" : { + "200" : { + "description" : "success, log cancelled" + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + }, + "/log/list_details" : { + "get" : { + "tags" : [ "log" ], + "summary" : "get list of entities filetered by criteria in log_filter and return info specified by log_details_required with success or error code", + "parameters" : [ { + "name" : "requestor_id", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "healthngoadmin1" + } + }, { + "name" : "requestor_role", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Organizer" + } + }, { + "name" : "qry", + "in" : "query", + "required" : true, + "style" : "form", + "explode" : true, + "schema" : { + "$ref" : "#/components/schemas/log_get_details_qry" + } + } ], + "responses" : { + "200" : { + "description" : "success,log list", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/log_list" + } + } + } + } + }, + "400" : { + "description" : "Invalid request" + }, + "403" : { + "description" : "No permission" + }, + "404" : { + "description" : "one or more specified inputs not found" + }, + "default" : { + "description" : "Unexpected error" + } + } + } + } + }, + "components" : { + "schemas" : { + "entity_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "details" : { + "$ref" : "#/components/schemas/entity_details" + } + } + } + }, + "entity_details" : { + "type" : "object", + "properties" : { + "category" : { + "type" : "string", + "example" : "hospital" + }, + "name" : { + "type" : "string", + "example" : "abc" + }, + "phone" : { + "type" : "string", + "example" : "+911234567890" + }, + "email" : { + "type" : "string", + "example" : "info@xyz.com" + }, + "website" : { + "type" : "string", + "format" : "url", + "example" : "www.abc.com" + } + } + }, + "entity_filter" : { + "type" : "object", + "properties" : { + "entity_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[67890,12121]" + }, + "category" : { + "type" : "string", + "example" : "hospital" + }, + "name" : { + "type" : "string", + "example" : "abc" + }, + "phone" : { + "type" : "string", + "example" : "+911234567890" + }, + "email" : { + "type" : "string", + "example" : "info@xyz.com" + }, + "website" : { + "type" : "string", + "format" : "url", + "example" : "www.abc.com" + } + } + }, + "entity_details_required" : { + "type" : "object", + "properties" : { + "entity_id" : { + "type" : "boolean", + "example" : false + }, + "category" : { + "type" : "boolean", + "example" : true + }, + "name" : { + "type" : "boolean", + "example" : true + }, + "phone" : { + "type" : "boolean", + "example" : true + }, + "email" : { + "type" : "boolean", + "example" : true + }, + "website" : { + "type" : "boolean", + "example" : true + } + } + }, + "appointment_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "appointment_id" : { + "type" : "string", + "example" : "1" + }, + "details" : { + "$ref" : "#/components/schemas/appointment_details" + } + } + } + }, + "appointment_details" : { + "type" : "object", + "properties" : { + "event_id" : { + "type" : "string", + "example" : "1" + }, + "event_type" : { + "type" : "string", + "example" : "doctor_consultation" + }, + "participant_type" : { + "type" : "string", + "example" : "subscriber" + }, + "participant_id" : { + "type" : "string", + "example" : "12345" + }, + "participant_entity_id" : { + "type" : "string", + "example" : "67890" + }, + "status" : { + "type" : "string", + "example" : "attended" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:30:00" + }, + "deadline" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:10:00" + } + } + }, + "appointment_filter" : { + "type" : "object", + "properties" : { + "appointment_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[1,2]" + }, + "event_type" : { + "type" : "string", + "example" : "doctor_consultation" + }, + "event_id" : { + "type" : "string", + "example" : "1" + }, + "participant_type" : { + "type" : "string", + "example" : "subscriber" + }, + "participant_id" : { + "type" : "string", + "example" : "12345" + }, + "participant_entity_id" : { + "type" : "string", + "example" : "67890" + }, + "status" : { + "type" : "string", + "example" : "confirmed" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T09:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T17:00:00" + } + } + }, + "appointment_details_required" : { + "type" : "object", + "properties" : { + "appointment_id" : { + "type" : "boolean", + "example" : true + }, + "event_id" : { + "type" : "boolean", + "example" : true + }, + "event_type" : { + "type" : "boolean", + "example" : true + }, + "participant_type" : { + "type" : "boolean", + "example" : true + }, + "participant_id" : { + "type" : "boolean", + "example" : true + }, + "status" : { + "type" : "boolean", + "example" : true + }, + "participant_entity_id" : { + "type" : "boolean", + "example" : true + }, + "from" : { + "type" : "boolean", + "example" : true + }, + "to" : { + "type" : "boolean", + "example" : true + }, + "deadline" : { + "type" : "boolean", + "example" : true + } + } + }, + "resource_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "resource_id" : { + "type" : "string", + "example" : "54321" + }, + "details" : { + "$ref" : "#/components/schemas/resource_details" + } + } + } + }, + "resource_details" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "example" : "psrk" + }, + "category" : { + "type" : "string", + "example" : "doctor" + }, + "phone" : { + "type" : "string", + "example" : "+911234567890" + }, + "email" : { + "type" : "string", + "example" : "doctor1@xyz.com" + }, + "alert_url" : { + "type" : "string", + "format" : "url", + "example" : "psrk@gmail.com" + }, + "alert_preference" : { + "type" : "string", + "example" : "phone" + }, + "status_poll_url" : { + "type" : "string", + "format" : "url", + "example" : "www.doctor1.com" + } + } + }, + "resource_filter" : { + "type" : "object", + "properties" : { + "resource_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[54321,31313]" + }, + "name" : { + "type" : "string", + "example" : "psrk" + }, + "category" : { + "type" : "string", + "example" : "doctor" + }, + "phone" : { + "type" : "string", + "example" : "+911234567890" + }, + "email" : { + "type" : "string", + "example" : "abc@gmail.com" + }, + "alert_url" : { + "type" : "string", + "format" : "url", + "example" : "www.doctor1.com" + }, + "alert_preference" : { + "type" : "string", + "example" : " phone" + }, + "status_poll_url" : { + "type" : "string", + "format" : "url", + "example" : "www.doctor1.com" + } + } + }, + "resource_details_required" : { + "type" : "object", + "properties" : { + "resource_id" : { + "type" : "boolean", + "example" : true + }, + "name" : { + "type" : "boolean", + "example" : true + }, + "category" : { + "type" : "boolean", + "example" : true + }, + "phone" : { + "type" : "boolean", + "example" : true + }, + "email" : { + "type" : "boolean", + "example" : true + }, + "alert_url" : { + "type" : "boolean", + "example" : true + }, + "alert_preference" : { + "type" : "boolean", + "example" : true + }, + "status_poll_url" : { + "type" : "boolean", + "example" : true + } + } + }, + "subscriber_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "subscriber_id" : { + "type" : "string", + "example" : "12345" + }, + "details" : { + "$ref" : "#/components/schemas/subscriber_details" + } + } + } + }, + "subscriber_details" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "example" : "abc" + }, + "category" : { + "type" : "string", + "example" : "patient" + }, + "phone" : { + "type" : "string", + "example" : "+911234567890" + }, + "email" : { + "type" : "string", + "example" : "abc@gmail.com" + }, + "alert_url" : { + "type" : "string", + "format" : "url", + "example" : "www.abc.com" + }, + "alert_preference" : { + "type" : "string", + "example" : "phone" + }, + "status_poll_url" : { + "type" : "string", + "format" : "url", + "example" : "www.abc.com" + } + } + }, + "subscriber_filter" : { + "type" : "object", + "properties" : { + "subscriber_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[12345, 41414]" + }, + "category" : { + "type" : "string", + "example" : "patient" + }, + "name" : { + "type" : "string", + "example" : "abc" + }, + "phone" : { + "type" : "string", + "example" : "+911234567890" + }, + "email" : { + "type" : "string", + "example" : "abc@gmail.com" + }, + "alert_url" : { + "type" : "string", + "format" : "url", + "example" : "www.abc.com" + }, + "alert_preference" : { + "type" : "string", + "example" : " phone" + }, + "status_poll_url" : { + "type" : "string", + "format" : "url", + "example" : "www.abc.com" + } + } + }, + "subscriber_details_required" : { + "type" : "object", + "properties" : { + "subscriber_id" : { + "type" : "boolean", + "example" : true + }, + "category" : { + "type" : "boolean", + "example" : true + }, + "name" : { + "type" : "boolean", + "example" : true + }, + "phone" : { + "type" : "boolean", + "example" : true + }, + "email" : { + "type" : "boolean", + "example" : true + }, + "alert_url" : { + "type" : "boolean", + "example" : true + }, + "alert_preference" : { + "type" : "boolean", + "example" : true + }, + "status_poll_url" : { + "type" : "boolean", + "example" : true + } + } + }, + "event_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "event_id" : { + "type" : "string", + "example" : "12345" + }, + "details" : { + "$ref" : "#/components/schemas/event_details" + } + } + } + }, + "event_details" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "example" : "abc medical camp" + }, + "description" : { + "type" : "string", + "example" : "medical camp for senior citizens" + }, + "category" : { + "type" : "string", + "example" : "doctor_consultation" + }, + "host_entity_id" : { + "type" : "string", + "example" : "67890" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:30:00" + }, + "deadline" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:10:00" + }, + "subscriber_limit" : { + "type" : "string", + "example" : "1" + }, + "terms" : { + "type" : "string", + "example" : "non refundable" + }, + "status" : { + "type" : "string", + "example" : "open" + }, + "venue" : { + "$ref" : "#/components/schemas/venue" + } + } + }, + "event_filter" : { + "type" : "object", + "properties" : { + "event_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[12345,51515]" + }, + "description" : { + "type" : "string", + "example" : "medical camp for senior citizens" + }, + "name" : { + "type" : "string", + "example" : "doctor_consultation" + }, + "category" : { + "type" : "string", + "example" : "opd_physician_consultation" + }, + "host_entity_id" : { + "type" : "string", + "example" : "67890" + }, + "subscriber_limit" : { + "type" : "string", + "example" : "1" + }, + "terms" : { + "type" : "string", + "example" : "non refundable" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T09:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T17:00:00" + }, + "venue" : { + "$ref" : "#/components/schemas/venue" + } + } + }, + "event_details_required" : { + "type" : "object", + "properties" : { + "event_id" : { + "type" : "boolean", + "example" : true + }, + "description" : { + "type" : "boolean", + "example" : true + }, + "name" : { + "type" : "boolean", + "example" : true + }, + "category" : { + "type" : "boolean", + "example" : true + }, + "host_entity_id" : { + "type" : "boolean", + "example" : true + }, + "period" : { + "type" : "boolean", + "example" : true + }, + "venue" : { + "type" : "boolean", + "example" : true + }, + "deadline" : { + "type" : "boolean", + "example" : true + }, + "subscriber_limit" : { + "type" : "boolean", + "example" : true + }, + "terms" : { + "type" : "boolean", + "example" : true + }, + "status" : { + "type" : "boolean", + "example" : true + } + } + }, + "affiliation_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "affiliation_id" : { + "type" : "string", + "example" : "1" + }, + "details" : { + "$ref" : "#/components/schemas/affiliation_details" + } + } + } + }, + "affiliation_details" : { + "type" : "object", + "properties" : { + "resource_id" : { + "type" : "string", + "example" : "12345" + }, + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "resource_category" : { + "type" : "string", + "example" : "physician" + }, + "work_days_hours" : { + "$ref" : "#/components/schemas/days_hours" + } + } + }, + "days_hours" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "day_of_week" : { + "type" : "string", + "example" : "[monday" + }, + "start_time" : { + "type" : "string", + "example" : "09:00:00" + }, + "end_time" : { + "type" : "string", + "example" : "17:00:00" + } + } + } + }, + "affiliation_filter" : { + "type" : "object", + "properties" : { + "affiliation_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[1,2]" + }, + "resource_id" : { + "type" : "string", + "example" : "12345" + }, + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "category" : { + "type" : "string", + "example" : "physician" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T09:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T17:00:00" + } + } + }, + "affiliation_details_required" : { + "type" : "object", + "properties" : { + "affiliation_id" : { + "type" : "boolean", + "example" : true + }, + "resource_id" : { + "type" : "boolean", + "example" : true + }, + "entity_id" : { + "type" : "boolean", + "example" : true + }, + "category" : { + "type" : "boolean", + "example" : true + }, + "work_days_hours" : { + "type" : "boolean", + "example" : true + } + } + }, + "alert_schedule_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "alert_schedule_id" : { + "type" : "string", + "example" : "1" + }, + "details" : { + "$ref" : "#/components/schemas/alert_schedule_details" + } + } + } + }, + "alert_schedule_details" : { + "type" : "object", + "properties" : { + "event_id" : { + "type" : "string", + "example" : "12345" + }, + "target_category" : { + "type" : "string", + "example" : "subscriber" + }, + "message_id" : { + "type" : "string", + "example" : "1" + }, + "alert_datetime" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T09:00:00" + } + } + }, + "alert_schedule_filter" : { + "type" : "object", + "properties" : { + "alert_schedule_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[1,2]" + }, + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "target_category" : { + "type" : "string", + "example" : "subscriber" + }, + "message_id" : { + "type" : "string", + "example" : "1" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T09:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T13:30:00" + } + } + }, + "alert_schedule_details_required" : { + "type" : "object", + "properties" : { + "alert_schedule_id" : { + "type" : "boolean", + "example" : true + }, + "entity_id" : { + "type" : "boolean", + "example" : true + }, + "message_id" : { + "type" : "boolean", + "example" : true + }, + "alert_datetime" : { + "type" : "boolean", + "example" : true + } + } + }, + "message_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "message_id" : { + "type" : "string", + "example" : "1" + }, + "details" : { + "$ref" : "#/components/schemas/message_details" + } + } + } + }, + "message_details" : { + "type" : "object", + "properties" : { + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "category" : { + "type" : "string", + "example" : "reminder" + }, + "message_body" : { + "type" : "string", + "example" : "you have doctor consultation today" + } + } + }, + "message_filter" : { + "type" : "object", + "properties" : { + "message_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[1,2]" + }, + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "category" : { + "type" : "string", + "example" : "reminder" + }, + "message_body" : { + "type" : "string", + "example" : "you have doctor consultation today" + } + } + }, + "message_details_required" : { + "type" : "object", + "properties" : { + "message_id" : { + "type" : "boolean", + "example" : true + }, + "entity_id" : { + "type" : "boolean", + "example" : true + }, + "category" : { + "type" : "boolean", + "example" : true + }, + "message_body" : { + "type" : "boolean", + "example" : true + } + } + }, + "log_list" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "log_id" : { + "type" : "string", + "example" : "1" + }, + "details" : { + "$ref" : "#/components/schemas/log_details" + } + } + } + }, + "log_details" : { + "type" : "object", + "properties" : { + "logger_role" : { + "type" : "string", + "example" : "resource" + }, + "logger_id" : { + "type" : "string", + "example" : "1" + }, + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "log_category" : { + "type" : "string", + "example" : "attendance" + }, + "datetime" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:00:00" + }, + "log_data" : { + "type" : "string", + "example" : "event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended" + } + } + }, + "log_filter" : { + "type" : "object", + "properties" : { + "log_id" : { + "type" : "array", + "items" : { + "type" : "string" + }, + "example" : "[1,2]" + }, + "entity_id" : { + "type" : "string", + "example" : "67890" + }, + "category" : { + "type" : "string", + "example" : "attendance" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-15T11:30:00" + } + } + }, + "log_details_required" : { + "type" : "object", + "properties" : { + "log_id" : { + "type" : "boolean", + "example" : true + }, + "logger_category" : { + "type" : "boolean", + "example" : true + }, + "logger_id" : { + "type" : "boolean", + "example" : true + }, + "entity_id" : { + "type" : "boolean", + "example" : true + }, + "log_category" : { + "type" : "boolean", + "example" : true + }, + "datetime" : { + "type" : "boolean", + "example" : true + }, + "log_data" : { + "type" : "boolean", + "example" : true + } + } + }, + "free_resource_list" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/free_resource_details" + } + }, + "free_resource_details" : { + "type" : "object", + "properties" : { + "resource_id" : { + "type" : "string", + "example" : "1" + }, + "resource_name" : { + "type" : "string", + "example" : "abc" + }, + "free_slots" : { + "type" : "array", + "items" : { + "type" : "string", + "example" : "{[2018-02-15T11:00:00to2018-02-15T11:09:00:00],[2018-02-22T11:00:00to2018-02-22T11:17:00:00]}" + } + } + } + }, + "free_resource_filter" : { + "type" : "object", + "properties" : { + "category" : { + "type" : "string", + "example" : "doctor" + }, + "Entity_id" : { + "type" : "string", + "example" : "67890" + }, + "from" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-14T09:00:00" + }, + "to" : { + "type" : "string", + "format" : "date-time", + "example" : "2018-02-18T13:30:00" + }, + "resource_id" : { + "type" : "string", + "example" : "1" + } + } + }, + "venue" : { + "type" : "object", + "properties" : { + "building" : { + "type" : "string", + "example" : "xyz" + }, + "street" : { + "type" : "string", + "example" : "7th main" + }, + "area" : { + "type" : "string", + "example" : "wilson garden" + }, + "city" : { + "type" : "string", + "example" : "bangalore" + }, + "state" : { + "type" : "string", + "example" : "karnataka" + }, + "country" : { + "type" : "string", + "example" : "india" + }, + "lat" : { + "type" : "string", + "example" : "0.001" + }, + "long" : { + "type" : "string", + "example" : "0.002" + } + } + }, + "event_new_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/event_details" + } + } + }, + "event_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/event_details" + } + } + }, + "event_get_details_qry" : { + "type" : "object", + "properties" : { + "event_filter" : { + "$ref" : "#/components/schemas/event_filter" + }, + "event_details_required" : { + "$ref" : "#/components/schemas/event_details_required" + } + } + }, + "entity_new_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/entity_details" + } + } + }, + "entity_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/entity_details" + } + } + }, + "entity_get_details_qry" : { + "type" : "object", + "properties" : { + "entity_filter" : { + "$ref" : "#/components/schemas/entity_filter" + }, + "entity_details_required" : { + "$ref" : "#/components/schemas/entity_details_required" + } + } + }, + "resource_new_qry" : { + "type" : "object", + "properties" : { + "resource_details" : { + "$ref" : "#/components/schemas/resource_details" + } + } + }, + "resource_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/resource_details" + } + } + }, + "resource_get_details_qry" : { + "type" : "object", + "properties" : { + "resource_filter" : { + "$ref" : "#/components/schemas/resource_filter" + }, + "resource_details_required" : { + "$ref" : "#/components/schemas/resource_details_required" + } + } + }, + "resource_get_availability_qry" : { + "type" : "object", + "properties" : { + "free_resource_filter" : { + "$ref" : "#/components/schemas/free_resource_filter" + } + } + }, + "subscriber_new_qry" : { + "type" : "object", + "properties" : { + "subscriber_details" : { + "$ref" : "#/components/schemas/subscriber_details" + } + } + }, + "subscriber_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/subscriber_details" + } + } + }, + "subscriber_get_details_qry" : { + "type" : "object", + "properties" : { + "subscriber_filter" : { + "$ref" : "#/components/schemas/subscriber_filter" + }, + "subscriber_details_required" : { + "$ref" : "#/components/schemas/subscriber_details_required" + } + } + }, + "message_new_qry" : { + "type" : "object", + "properties" : { + "message_details" : { + "$ref" : "#/components/schemas/message_details" + } + } + }, + "message_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/message_details" + } + } + }, + "message_get_details_qry" : { + "type" : "object", + "properties" : { + "message_filter" : { + "$ref" : "#/components/schemas/message_filter" + }, + "message_details_required" : { + "$ref" : "#/components/schemas/message_details_required" + } + } + }, + "affiliation_new_qry" : { + "type" : "object", + "properties" : { + "affiliation_details" : { + "$ref" : "#/components/schemas/affiliation_details" + } + } + }, + "affiliation_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/affiliation_details" + } + } + }, + "affiliation_get_details_qry" : { + "type" : "object", + "properties" : { + "affiliation_filter" : { + "$ref" : "#/components/schemas/affiliation_filter" + }, + "affiliation_details_required" : { + "$ref" : "#/components/schemas/affiliation_details_required" + } + } + }, + "alert_schedule_new_qry" : { + "type" : "object", + "properties" : { + "alert_schedule_details" : { + "$ref" : "#/components/schemas/alert_schedule_details" + } + } + }, + "alert_schedule_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/alert_schedule_details" + } + } + }, + "alert_schedule_get_details_qry" : { + "type" : "object", + "properties" : { + "alert_schedule_filter" : { + "$ref" : "#/components/schemas/alert_schedule_filter" + }, + "alert_schedule_details_required" : { + "$ref" : "#/components/schemas/alert_schedule_details_required" + } + } + }, + "log_new_qry" : { + "type" : "object", + "properties" : { + "log_details" : { + "$ref" : "#/components/schemas/log_details" + } + } + }, + "log_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/log_details" + } + } + }, + "log_get_details_qry" : { + "type" : "object", + "properties" : { + "log_filter" : { + "$ref" : "#/components/schemas/log_filter" + }, + "log_details_required" : { + "$ref" : "#/components/schemas/log_details_required" + } + } + }, + "appointment_new_qry" : { + "type" : "object", + "properties" : { + "appointment_details" : { + "$ref" : "#/components/schemas/appointment_details" + } + } + }, + "appointment_modify_qry" : { + "type" : "object", + "properties" : { + "details" : { + "$ref" : "#/components/schemas/appointment_details" + } + } + }, + "appointment_get_details_qry" : { + "type" : "object", + "properties" : { + "appointment_filter" : { + "$ref" : "#/components/schemas/appointment_filter" + }, + "appointment_details_required" : { + "$ref" : "#/components/schemas/appointment_details_required" + } + } + } + } + } +} From 26059ac3a69ae975813e5903f605250d8d20801d Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Fri, 5 May 2023 13:35:53 +0530 Subject: [PATCH 02/47] Add files via upload --- test/Dockerfile | 8 ++ test/features/createaffiliationnew.feature | 43 +++++++++ test/features/createalertschedulenew.feature | 42 +++++++++ test/features/createappointmentnew.feature | 41 ++++++++ test/features/createlognew.feature | 41 ++++++++ test/features/createmessagenew.feature | 43 +++++++++ test/features/createnewentity.feature | 42 +++++++++ test/features/createnewevent.feature | 42 +++++++++ test/features/createresourcenew.feature | 42 +++++++++ test/features/createsubscribernew.feature | 44 +++++++++ test/features/deleteaffiliationnew.feature | 43 +++++++++ test/features/deletealertschedulenew.feature | 43 +++++++++ test/features/deleteappointmentnew.feature | 43 +++++++++ test/features/deleteentity.feature | 43 +++++++++ test/features/deleteevent.feature | 43 +++++++++ test/features/deletelognew.feature | 43 +++++++++ test/features/deletemessagenew.feature | 43 +++++++++ test/features/deleteresourcenew.feature | 43 +++++++++ test/features/deletesubscribernew.feature | 43 +++++++++ test/features/getaffiliationlistnew.feature | 52 +++++++++++ test/features/getalertschedulelistnew.feature | 51 ++++++++++ test/features/getappointmentlistnew.feature | 52 +++++++++++ test/features/getentitylistnew.feature | 52 +++++++++++ test/features/geteventlistnew.feature | 52 +++++++++++ test/features/getloglistnew.feature | 52 +++++++++++ test/features/getmessagelistnew.feature | 52 +++++++++++ .../getresourceavailabalitydetailsnew.feature | 52 +++++++++++ test/features/getresourcelistnew.feature | 52 +++++++++++ test/features/getsubscriberlistnew.feature | 52 +++++++++++ test/features/updateaffiliationnew.feature | 37 ++++++++ test/features/updatealertschedulenew.feature | 41 ++++++++ test/features/updateappointmentnew.feature | 39 ++++++++ test/features/updateentitynew.feature | 41 ++++++++ test/features/updateevent.feature | 41 ++++++++ test/features/updatelognew.feature | 37 ++++++++ test/features/updatemessagenew.feature | 38 ++++++++ test/features/updateresourcenew.feature | 40 ++++++++ test/features/updatesubscribernew.feature | 41 ++++++++ test/requirnments.txt | 10 ++ test/step_deps/test_create_affiliation_new.py | 93 +++++++++++++++++++ .../test_create_alert_schedule_new.py | 93 +++++++++++++++++++ test/step_deps/test_create_appointment_new.py | 93 +++++++++++++++++++ test/step_deps/test_create_entity_new.py | 93 +++++++++++++++++++ test/step_deps/test_create_event_new.py | 83 +++++++++++++++++ test/step_deps/test_create_log_new.py | 93 +++++++++++++++++++ test/step_deps/test_create_message_new.py | 93 +++++++++++++++++++ test/step_deps/test_create_resource_new.py | 93 +++++++++++++++++++ test/step_deps/test_create_subscriber_new.py | 93 +++++++++++++++++++ test/step_deps/test_delete_affiliation_new.py | 71 ++++++++++++++ .../test_delete_alert_schedule_new.py | 71 ++++++++++++++ test/step_deps/test_delete_appointment_new.py | 71 ++++++++++++++ test/step_deps/test_delete_entity_new.py | 71 ++++++++++++++ test/step_deps/test_delete_event_new.py | 71 ++++++++++++++ test/step_deps/test_delete_log_new.py | 71 ++++++++++++++ test/step_deps/test_delete_message_new.py | 71 ++++++++++++++ test/step_deps/test_delete_resource_new.py | 71 ++++++++++++++ test/step_deps/test_delete_subscriber_new.py | 71 ++++++++++++++ .../test_get_affiliation_list_new.py | 88 ++++++++++++++++++ .../test_get_alert_schedule_list_new.py | 88 ++++++++++++++++++ .../test_get_appointment_list_new.py | 88 ++++++++++++++++++ test/step_deps/test_get_entity_list_new.py | 88 ++++++++++++++++++ test/step_deps/test_get_event_list_new.py | 88 ++++++++++++++++++ test/step_deps/test_get_log_list_new.py | 88 ++++++++++++++++++ test/step_deps/test_get_message_list_new.py | 88 ++++++++++++++++++ ...t_get_resource_availabality_details_new.py | 88 ++++++++++++++++++ test/step_deps/test_get_resource_list_new.py | 88 ++++++++++++++++++ .../step_deps/test_get_subscriber_list_new.py | 88 ++++++++++++++++++ test/step_deps/test_update_affiliation_new.py | 70 ++++++++++++++ .../test_update_alert_schedule_new.py | 70 ++++++++++++++ test/step_deps/test_update_appointment_new.py | 70 ++++++++++++++ test/step_deps/test_update_entity_new.py | 70 ++++++++++++++ test/step_deps/test_update_event_new.py | 70 ++++++++++++++ test/step_deps/test_update_log_new.py | 70 ++++++++++++++ test/step_deps/test_update_message_new.py | 70 ++++++++++++++ test/step_deps/test_update_resource_new.py | 70 ++++++++++++++ test/step_deps/test_update_subscriber_new.py | 70 ++++++++++++++ test/test-results/result.xml | 1 + 77 files changed, 4636 insertions(+) create mode 100644 test/Dockerfile create mode 100644 test/features/createaffiliationnew.feature create mode 100644 test/features/createalertschedulenew.feature create mode 100644 test/features/createappointmentnew.feature create mode 100644 test/features/createlognew.feature create mode 100644 test/features/createmessagenew.feature create mode 100644 test/features/createnewentity.feature create mode 100644 test/features/createnewevent.feature create mode 100644 test/features/createresourcenew.feature create mode 100644 test/features/createsubscribernew.feature create mode 100644 test/features/deleteaffiliationnew.feature create mode 100644 test/features/deletealertschedulenew.feature create mode 100644 test/features/deleteappointmentnew.feature create mode 100644 test/features/deleteentity.feature create mode 100644 test/features/deleteevent.feature create mode 100644 test/features/deletelognew.feature create mode 100644 test/features/deletemessagenew.feature create mode 100644 test/features/deleteresourcenew.feature create mode 100644 test/features/deletesubscribernew.feature create mode 100644 test/features/getaffiliationlistnew.feature create mode 100644 test/features/getalertschedulelistnew.feature create mode 100644 test/features/getappointmentlistnew.feature create mode 100644 test/features/getentitylistnew.feature create mode 100644 test/features/geteventlistnew.feature create mode 100644 test/features/getloglistnew.feature create mode 100644 test/features/getmessagelistnew.feature create mode 100644 test/features/getresourceavailabalitydetailsnew.feature create mode 100644 test/features/getresourcelistnew.feature create mode 100644 test/features/getsubscriberlistnew.feature create mode 100644 test/features/updateaffiliationnew.feature create mode 100644 test/features/updatealertschedulenew.feature create mode 100644 test/features/updateappointmentnew.feature create mode 100644 test/features/updateentitynew.feature create mode 100644 test/features/updateevent.feature create mode 100644 test/features/updatelognew.feature create mode 100644 test/features/updatemessagenew.feature create mode 100644 test/features/updateresourcenew.feature create mode 100644 test/features/updatesubscribernew.feature create mode 100644 test/requirnments.txt create mode 100644 test/step_deps/test_create_affiliation_new.py create mode 100644 test/step_deps/test_create_alert_schedule_new.py create mode 100644 test/step_deps/test_create_appointment_new.py create mode 100644 test/step_deps/test_create_entity_new.py create mode 100644 test/step_deps/test_create_event_new.py create mode 100644 test/step_deps/test_create_log_new.py create mode 100644 test/step_deps/test_create_message_new.py create mode 100644 test/step_deps/test_create_resource_new.py create mode 100644 test/step_deps/test_create_subscriber_new.py create mode 100644 test/step_deps/test_delete_affiliation_new.py create mode 100644 test/step_deps/test_delete_alert_schedule_new.py create mode 100644 test/step_deps/test_delete_appointment_new.py create mode 100644 test/step_deps/test_delete_entity_new.py create mode 100644 test/step_deps/test_delete_event_new.py create mode 100644 test/step_deps/test_delete_log_new.py create mode 100644 test/step_deps/test_delete_message_new.py create mode 100644 test/step_deps/test_delete_resource_new.py create mode 100644 test/step_deps/test_delete_subscriber_new.py create mode 100644 test/step_deps/test_get_affiliation_list_new.py create mode 100644 test/step_deps/test_get_alert_schedule_list_new.py create mode 100644 test/step_deps/test_get_appointment_list_new.py create mode 100644 test/step_deps/test_get_entity_list_new.py create mode 100644 test/step_deps/test_get_event_list_new.py create mode 100644 test/step_deps/test_get_log_list_new.py create mode 100644 test/step_deps/test_get_message_list_new.py create mode 100644 test/step_deps/test_get_resource_availabality_details_new.py create mode 100644 test/step_deps/test_get_resource_list_new.py create mode 100644 test/step_deps/test_get_subscriber_list_new.py create mode 100644 test/step_deps/test_update_affiliation_new.py create mode 100644 test/step_deps/test_update_alert_schedule_new.py create mode 100644 test/step_deps/test_update_appointment_new.py create mode 100644 test/step_deps/test_update_entity_new.py create mode 100644 test/step_deps/test_update_event_new.py create mode 100644 test/step_deps/test_update_log_new.py create mode 100644 test/step_deps/test_update_message_new.py create mode 100644 test/step_deps/test_update_resource_new.py create mode 100644 test/step_deps/test_update_subscriber_new.py create mode 100644 test/test-results/result.xml diff --git a/test/Dockerfile b/test/Dockerfile new file mode 100644 index 0000000..0cc34a8 --- /dev/null +++ b/test/Dockerfile @@ -0,0 +1,8 @@ +#FROM joyzoursky/python-chromedriver:latest +#FROM qnib/pytest +FROM python:3.8 +COPY requirnments.txt requirnments.txt +RUN pip3 install -r requirnments.txt +COPY . /test +WORKDIR /test/ +CMD /bin/bash diff --git a/test/features/createaffiliationnew.feature b/test/features/createaffiliationnew.feature new file mode 100644 index 0000000..84c99ee --- /dev/null +++ b/test/features/createaffiliationnew.feature @@ -0,0 +1,43 @@ +Feature: Create a new affiliation of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new affiliation for Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new affiliation +When a POST request for an endpoint /affiliation/new/ is triggered to create new affiliation for scheduler block +Then the result should return affiliation Id as "1" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new affiliation for Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create an affiliation with its details "" "" for resource of category "" for a schedule on "" from "" to "" +When a POST request for an endpoint /affiliation/new/ is triggered to create new affiliation for scheduler block +Then the result should return affiliation details like "" and "" for requested affiliation +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | resource_id | entity_id | resource_category | day_of_week | start_time | end_time | affiliation_name | affiliation_id | + | healthngo1 | healthworker | 12345 | 67890 | physician | monday | 09:00:00 | 17:00:00 | xyz hospital | 1 | + + +@unit @Negativeregression +Scenario Outline: Create a new affiliation for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create an affiliation with its details "" "" for resource of category "" for a schedule on "" from "" to "" +When a POST request for an endpoint /affiliation/new/ is triggered to create new affiliation for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | resource_id | entity_id | resource_category | day_of_week | start_time | end_time | status_code | + | healthngo1 | healthworker | 12345 | 67890 | physician | monday | 09:00:00 | 17:00:00 | 400 | + | healthngo1 | healthworker | 12345 | 67890 | physician | monday | 17:00:00 | 09:00:00 | 403 | + | healthngo1 | healthworker | resource | 67890 | nurse | monday | 17:00:00 | 09:00:00 | 404 | + + diff --git a/test/features/createalertschedulenew.feature b/test/features/createalertschedulenew.feature new file mode 100644 index 0000000..ef650a1 --- /dev/null +++ b/test/features/createalertschedulenew.feature @@ -0,0 +1,42 @@ +Feature: Create a new Alert Schedule for Management of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new Alert Schedule for Management of Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new alert schedule +When a POST request for an endpoint /alert_schedule/new/ is triggered to create new alert schedule for scheduler block +Then the result should return alert schedule Id as "1" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new Alert Schedule for Management of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create a new alert schedule with event "" for "" with "" within a "" +When a POST request for an endpoint /alert_schedule/new/ is triggered to create new alert schedule for scheduler block +Then the result should return alert details like "" and "" for requested schedule +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | event_id | target_category | message_id | alert_datetime | alert_schedule_name | alert_schedule_id | + | healthngo1 | healthworker | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | xyz hospital | 1 | + + +@unit @Negativeregression +Scenario Outline: Create a new Alert Schedule for Management of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create a new alert schedule with event "" for "" with "" within a "" +When a POST request for an endpoint /alert_schedule/new/ is triggered to create new alert schedule for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | event_id | target_category | message_id | alert_datetime | status_code | + | healthngo1 | healthworker | 12345 | subscriber | 1 | 2018-02-15T09:00:00| 400 | + | healthngo1 | healthworker | 12345 | subscriber | 1 | 2018-02-15T09:00:00| 403 | + | healthngo1 | healthworker |12345 | subscriber | 1 | 2018-02-15T09:00:00| 404 | + diff --git a/test/features/createappointmentnew.feature b/test/features/createappointmentnew.feature new file mode 100644 index 0000000..986e80a --- /dev/null +++ b/test/features/createappointmentnew.feature @@ -0,0 +1,41 @@ +Feature: Create a new appointment of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new appointment of Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new appointment +When a POST request for an endpoint /appointment/new/ is triggered to create new appointment for scheduler block +Then the result should return appointment Id as "67890" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new appointment of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create a new appointment for an entity with "" and "" for participant of "" "" and "" for a time period "" till "" with deadline "" +When a POST request for an endpoint /appointment/new/ is triggered to create new appointment for scheduler block +Then the result should return appointment details like "" and "" for requested appointment +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | entity_id | entity_type | participant_type | participant_id | participant_entity_id | From | To | deadline | appointment_name | appointment_id | + | healthngo1 | healthworker | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 2018-02-15T11:10:00 | doctorconsultation | 1 | + + +@unit @Negativeregression +Scenario Outline: Create a new appointment of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create a new appointment for an entity with "" and "" for participant of "" "" and "" for a time period "" till "" with deadline "" +When a POST request for an endpoint /appointment/new/ is triggered to create new appointment for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | entity_id | entity_type | participant_type | participant_id | participant_entity_id | From | To | deadline | status_code | + | healthngo1 | healthworker | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-03-15T11:30:00 | 2018-02-15T11:10:00 | 400 | + | healthngo1 | healthworker | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:45:00 | 2018-02-15T11:30:00 | 2018-02-15T11:10:00 | 403 | + | healthngo1 | healthworker | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-07-15T11:30:00 | 2018-02-15T11:10:00 | 404 | diff --git a/test/features/createlognew.feature b/test/features/createlognew.feature new file mode 100644 index 0000000..220619d --- /dev/null +++ b/test/features/createlognew.feature @@ -0,0 +1,41 @@ +Feature: Create a new Log of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new Log of Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new log +When a POST request for an endpoint /log/new/ is triggered to create new log for scheduler block +Then the result should return log Id as "1" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new Log of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create a log for role "" with its Id "" "" for category "" from time period of "" with data as "" +When a POST request for an endpoint /log/new/ is triggered to create new log for scheduler block +Then the result should return log details like "" and "" for requested log +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | logger_role | logger_id | entity_id | log_category | datetime | log_data | log_name | log_id | + | healthngo1 | healthworker | resource | 1 | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | xyz hospital | 1 | + + +@unit @Negativeregression +Scenario Outline: Create a new Log of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create a log for role "" with its Id "" "" for category "" from time period of "" with data as "" +When a POST request for an endpoint /log/new/ is triggered to create new log for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | logger_role | logger_id | entity_id | log_category | datetime | log_data | status_code | + | healthngo1 | healthworker | resource | 1 | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | 400 | + | healthngo1 | healthworker | entity | 67890 | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | 403 | + | healthngo1 | healthworker | subscriber |1 | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | 404 | diff --git a/test/features/createmessagenew.feature b/test/features/createmessagenew.feature new file mode 100644 index 0000000..daee441 --- /dev/null +++ b/test/features/createmessagenew.feature @@ -0,0 +1,43 @@ +Feature: Create a new message of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new message of Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new message +When a POST request for an endpoint /message/new/ is triggered to create new message for scheduler block +Then the result should return message Id as "1" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new message of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create a message with details like "" "" with message body as "" +When a POST request for an endpoint /message/new/ is triggered to create new message for scheduler block +Then the result should return message details like "" and "" for requested message +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | entity_id | category | message_body | message_name | message_id | + | healthngo1 | healthworker | 67890 | reminder | you have a doctor consultatio today | xyz hospital | 1 | + + +@unit @Negativeregression +Scenario Outline: Create a new message of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create a message with details like "" "" with message body as "" +When a POST request for an endpoint /message/new/ is triggered to create new message for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | entity_id | category | message_body | status_code | + | healthngo1 | healthworker | 67890 | reminder | you have a doctor consultatio today | 400 | + | healthngo1 | healthworker | 67890 | appointment | you have a doctor consultatio today | 403 | + | healthngo1 | healthworker | 67890 | invite | you have a doctor consultatio today | 404 | + + diff --git a/test/features/createnewentity.feature b/test/features/createnewentity.feature new file mode 100644 index 0000000..f11ff27 --- /dev/null +++ b/test/features/createnewentity.feature @@ -0,0 +1,42 @@ +Feature: Create a new entity of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new entity for Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new entity +When a POST request for an endpoint /entity/new/ is triggered to create new entity for scheduler block +Then the result should return entity Id as "67890" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new entity for Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create a entity with name "" for "" with following details like "" "" with "" +When a POST request for an endpoint /entity/new/ is triggered to create new entity for scheduler block +Then the result should return entity details like "" and "" for requested entity +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | name | category |phone | email | website | entity_name | entity_id | + | healthngo1 | healthworker | practo | hospital | 9980555504 | abc@gmail.com | www.abc.com | hospital | 67890 | + + +@unit @Negativeregression +Scenario Outline: Create a new entity for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create a entity with name "" for "" with following details like "" "" with "" +When a POST request for an endpoint /entity/new/ is triggered to create new entity for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | name | category | phone | email | website | status_code | + | healthngo1 | healthworker | practo | hospital | 9980555504 | sree@gmail.com | http://alert.com | 400 | + | healthngo1 | healthworker | practo | education | 9980555504 | sree@gmail.com | http://alert.com | 403 | + | healthngo1 | healthworker | practo | agriculture | 9980555504 | sree@gmail.com | http://alert.com | 404 | + diff --git a/test/features/createnewevent.feature b/test/features/createnewevent.feature new file mode 100644 index 0000000..bcb1fbd --- /dev/null +++ b/test/features/createnewevent.feature @@ -0,0 +1,42 @@ +Feature: Create a new event of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new event for Scheduler API Smoke Test + +Given the requestor is "healthngoadmin1" with role as "healthworker" to create a new event +When a POST request for an endpoint /event/new is triggered to create new event for scheduler block +Then response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new event for Scheduler API Unit and Regression Happy Testing + +Given the requestor is "" with role as "healthworker" to create a new event with following details like "" "" "" for a period "" till "" for a venue in "" "" "" with "" "" +When a POST request for an endpoint /event/new is triggered to create new event for scheduler block +Then the result should return event details as "" "" for requested event +And response code of POST request is "200" + + +Examples: + | requestor_id | requestor_role | name | category | host_entity_id | From | To | street | building | area | lat | long | event_name | event_id | + | healthngoadmin1 | healthworker |doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyx | wilsongarden | 0.1 | 0.2 |doctorconsultation | 4524458935 | + + +@unit @Negativeregression +Scenario Outline: Create a new event for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor is "" with role as "healthworker" to create a new event with following details like "" "" "" for a period "" till "" for a venue in "" "" "" with "" "" +When a POST request for an endpoint /event/new is triggered to create new event for scheduler block +Then response code of negative testing POST request for error is "" + + +Examples: + | requestor_id | requestor_role | name | category | host_entity_id | From | To | street | building | area | lat | long | status_code | + | healthngoadmin1 | healthworker | doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyz | manipal | 0.1 | 0.2 | 404 | + | healthngoadmin1 | healthworker | doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyz | manipal | 0.1 | 0.2 | 403 | + | healthngoadmin1 | healthworker |doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyz | manipal | 0.1 | 0.2 |400 | + + diff --git a/test/features/createresourcenew.feature b/test/features/createresourcenew.feature new file mode 100644 index 0000000..63e4478 --- /dev/null +++ b/test/features/createresourcenew.feature @@ -0,0 +1,42 @@ +Feature: Create a new resource of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new resource of Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new resource +When a POST request for an endpoint /resource/new/ is triggered to create new resource for scheduler block +Then the result should return resource Id as "54321" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new resource of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create a resource with name "" for "" with following details like "" "" with "" "" and "" +When a POST request for an endpoint /resource/new/ is triggered to create new resource for scheduler block +Then the result should return resource details like "" and "" for requested resource +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | name | category | phone | email | alert_url | alert_preference | status_poll_url | resource_name | resource_id | + | healthngo1 | healthworker | practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | xyz hospital | 67890 | + + +@unit @Negativeregression +Scenario Outline: Create a new resource of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create a resource with name "" for "" with following details like "" "" with "" "" and "" +When a POST request for an endpoint /resource/new/ is triggered to create new resource for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | name | category | phone | email | alert_url | alert_preference | status_poll_url | status_code | + | healthngo1 | healthworker | practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | 400 | + | healthngo1 | healthworker | practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | 403 | + | healthngo1 | healthworker | practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | 404 | + diff --git a/test/features/createsubscribernew.feature b/test/features/createsubscribernew.feature new file mode 100644 index 0000000..fd877f7 --- /dev/null +++ b/test/features/createsubscribernew.feature @@ -0,0 +1,44 @@ +Feature: Create a new Subscriber of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Create a new Subscriber of Scheduler API Smoke Test + +Given the requestor Id is "healthngo1" with role as "healthworker" to create a new subscriber +When a POST request for an endpoint /subscriber/new/ is triggered to create new subscriber for scheduler block +Then the result should return subscriber Id as "12345" for smoke testing +And response code of POST request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Create a new Subscriber of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" to create a subscriber with name "" for "" with following details like "" "" with "" having "" and "" +When a POST request for an endpoint /subscriber/new/ is triggered to create new subscriber for scheduler block +Then the result should return subscriber details like "" and "" for requested subscriber +And response code of POST request is "200" + +Examples: + | requestor_id | requestor_role | name | category | phone | email | alert_url | alert_preference | status_poll_url | subscriber_name | subscriber_id | + | healthngo1 | healthworker | practo | hospital | 9980555504 | abc@gmail.com | www.abc.com | phone | www.abc.com | xyz hospital | 12345 | + + +@unit @Negativeregression +Scenario Outline: Create a new Subscriber of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" to create a subscriber with name "" for "" with following details like "" "" with "" having "" and "" +When a POST request for an endpoint /subscriber/new/ is triggered to create new subscriber for scheduler block +Then response code of negative testing POST request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | name | category | phone | email | alert_url | alert_preference | status_poll_url | status_code | + | healthngo1 | healthworker | practo | hospital | 9980555504 | sree@gmail.com | wwww.alert.com | phone | www.abc.com | 400 | + | healthngo1 | healthworker | practo | education | 9980555504 | sree@gmail.com | www.alert.com | email | www.abc.com | 403 | + | healthngo1 | healthworker | practo | agriculture | 9980555504 | sree@gmail.com | www.alert.com | message | www.abc.com | 404 | + | healthngo1 | healthworker | practo | agriculture | 9980555504 | sree@gmail.com | http://alert.com | phone | www.abc.com | 404 | + + diff --git a/test/features/deleteaffiliationnew.feature b/test/features/deleteaffiliationnew.feature new file mode 100644 index 0000000..68e1da0 --- /dev/null +++ b/test/features/deleteaffiliationnew.feature @@ -0,0 +1,43 @@ +Feature: Delete an Affiliation of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete an Affiliation of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an affiliation_id "" for smoke testing +When a Delete request for an endpoint /affiliation is triggered to delete an affiliation for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | affiliation_id | + | healthngo1 | healthworker | 1 | + +@unit @happyregression +Scenario Outline: Delete an Affiliation of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an affiliation with affiliationId "" +When a Delete request for an endpoint /affiliation is triggered to delete an affiliation for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | affiliation_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete an Affiliation of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an affiliation with affiliationId "" +When a Delete request for an endpoint /affiliation is triggered to delete an affiliation for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | affiliation_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deletealertschedulenew.feature b/test/features/deletealertschedulenew.feature new file mode 100644 index 0000000..18ef379 --- /dev/null +++ b/test/features/deletealertschedulenew.feature @@ -0,0 +1,43 @@ +Feature: Delete an Alert Schedule for Management of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete an Alert Schedule for Management of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an alert_schedule_id "" for smoke testing +When a Delete request for an endpoint /alert_schedule is triggered to delete an alert schedule for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | alert_schedule_id | + | healthngo1 | healthworker | 4524453535 | + +@unit @happyregression +Scenario Outline: Delete an Alert Schedule for Management of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an alert_schedule with alert_schedule_Id "" +When a Delete request for an endpoint /alert_schedule is triggered to delete an alert schedule for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | alert_schedule_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete an Alert Schedule for Management of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an alert_schedule with alert_schedule_Id "" +When a Delete request for an endpoint /alert_schedule is triggered to delete an alert schedule for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | alert_schedule_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deleteappointmentnew.feature b/test/features/deleteappointmentnew.feature new file mode 100644 index 0000000..a775f02 --- /dev/null +++ b/test/features/deleteappointmentnew.feature @@ -0,0 +1,43 @@ +Feature: Delete an appointment of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete an appointment of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an appointment_id "" for smoke testing +When a Delete request for an endpoint /appointment is triggered to delete an appointment for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | appointment_id | + | healthngo1 | healthworker | 1 | + +@unit @happyregression +Scenario Outline: Delete an appointment of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an appointment with appointmentId "" +When a Delete request for an endpoint /appointment is triggered to delete an appointment for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | appointment_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete an appointment of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an appointment with appointmentId "" +When a Delete request for an endpoint /appointment is triggered to delete an appointment for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | appointment_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deleteentity.feature b/test/features/deleteentity.feature new file mode 100644 index 0000000..e6b75c9 --- /dev/null +++ b/test/features/deleteentity.feature @@ -0,0 +1,43 @@ +Feature: Delete an Entity of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete an Entity for Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an entity_id "" for smoke testing +When a Delete request for an endpoint /entity is triggered to delete an entity for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | entity_id | + | healthngo1 | healthworker | 4524453535 | + +@unit @happyregression +Scenario Outline: Delete an Entity for Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an entity with entityId "" +When a Delete request for an endpoint /entity is triggered to delete an entity for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | entity_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete an Entity for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an entity with entityId "" +When a Delete request for an endpoint /entity is triggered to delete an entity for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | entity_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deleteevent.feature b/test/features/deleteevent.feature new file mode 100644 index 0000000..197dd31 --- /dev/null +++ b/test/features/deleteevent.feature @@ -0,0 +1,43 @@ +Feature: Delete an Event of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete an Event for Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an event_id "" for smoke testing +When a Delete request for an endpoint /event is triggered to delete an event for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | event_id | + | healthngo1 | healthworker | 4524453535 | + +@unit @happyregression +Scenario Outline: Delete an Event for Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an event with eventId "" +When a Delete request for an endpoint /event is triggered to delete an event for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | event_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete an Event for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an event with eventId "" +When a Delete request for an endpoint /event is triggered to delete an event for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | event_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deletelognew.feature b/test/features/deletelognew.feature new file mode 100644 index 0000000..d72f6c4 --- /dev/null +++ b/test/features/deletelognew.feature @@ -0,0 +1,43 @@ +Feature: Delete a log details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete a log details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for a log_id "" for smoke testing +When a Delete request for an endpoint /log is triggered to delete a log for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | log_id | + | healthngo1 | healthworker | 1 | + +@unit @happyregression +Scenario Outline: Delete a log details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a log_id "" +When a Delete request for an endpoint /log is triggered to delete a log for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | log_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete a log details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a log_id "" +When a Delete request for an endpoint /log is triggered to delete a log for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | log_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deletemessagenew.feature b/test/features/deletemessagenew.feature new file mode 100644 index 0000000..967b2c4 --- /dev/null +++ b/test/features/deletemessagenew.feature @@ -0,0 +1,43 @@ +Feature: Delete a message of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete a message of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for a message_id "" for smoke testing +When a Delete request for an endpoint /message is triggered to delete a message for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | message_id | + | healthngo1 | healthworker | 1 | + +@unit @happyregression +Scenario Outline: Delete a message of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a message_id "" +When a Delete request for an endpoint /message is triggered to delete a message for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | message_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete a message of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a message_id "" +When a Delete request for an endpoint /message is triggered to delete a message for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | message_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deleteresourcenew.feature b/test/features/deleteresourcenew.feature new file mode 100644 index 0000000..860ce78 --- /dev/null +++ b/test/features/deleteresourcenew.feature @@ -0,0 +1,43 @@ +Feature: Delete a resource of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete a resource of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for a resource_id "" for smoke testing +When a Delete request for an endpoint /resource is triggered to delete a resource for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | resource_id | + | healthngo1 | healthworker | 54321 | + +@unit @happyregression +Scenario Outline: Delete a resource of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a resource_id "" +When a Delete request for an endpoint /resource is triggered to delete a resource for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | resource_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete a resource of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a resource_id "" +When a Delete request for an endpoint /resource is triggered to delete a resource for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | resource_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/deletesubscribernew.feature b/test/features/deletesubscribernew.feature new file mode 100644 index 0000000..87f27b5 --- /dev/null +++ b/test/features/deletesubscribernew.feature @@ -0,0 +1,43 @@ +Feature: Delete a subscriber of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Delete a subscriber for Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an subscriber_id "" for smoke testing +When a Delete request for an endpoint /subscriber is triggered to delete a subscriber for scheduler block +Then response code of Delete request is "200" for smoke testing + + +Examples: + | requestor_id | requestor_role | subscriber_id | + | healthngo1 | healthworker | 12345 | + +@unit @happyregression +Scenario Outline: Delete a subscriber for Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a subscriber with subscriberId "" +When a Delete request for an endpoint /subscriber is triggered to delete a subscriber for scheduler block +Then response code of Delete request is "200" + +Examples: + | requestor_id | requestor_role | subscriber_id | + | healthngoadmin1 | Organizer | 12345 | + + +@unit @Negativeregression +Scenario Outline: Delete a subscriber for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a subscriber with subscriberId "" +When a Delete request for an endpoint /subscriber is triggered to delete a subscriber for scheduler block +Then response code of negative testing Delete request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | subscriber_id | status_code | + | healthngo1 | healthworker | 4524453535 | 400 | + | healthngo1 | healthworker | 4524453535 | 403 | + | healthngo1 | healthworker | 4524453535 | 404 | + + diff --git a/test/features/getaffiliationlistnew.feature b/test/features/getaffiliationlistnew.feature new file mode 100644 index 0000000..1af9ed4 --- /dev/null +++ b/test/features/getaffiliationlistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Affiliation List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Affiliation List Details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an affiliation_id "" for smoke testing +When a GET request for an endpoint /affiliation/list_details/ is triggered to get details of a affiliation list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | affiliation_id | + | healthngo1 | healthworker | 1 | + + + + + +@unit @happyregression +Scenario Outline: Get Affiliation List Details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a affiliation_id "" with details filter for "" and requesting for affiliation details for "" "" "" "" and "" +When a GET request for an endpoint /affiliation/list_details/ is triggered to get details of a affiliation list +Then the result should return following details of entity with its name "" "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | affiliation_id | filter_affiliation_id | required_category | required_affiliation_id | required_entity_id | required_From | required_To | affiliation_id | category | entity_id | From | To | + | healthngo1 | healthworker | 1 | 1 | true | true | true | true | true | 1 | physician | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | + + +@unit @Negativeregression +Scenario Outline: Get Affiliation List Details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a affiliation_id "" with details filter for "" and requesting for affiliation details for "" "" "" "" and "" +When a GET request for an endpoint /affiliation/list_details/ is triggered to get details of a affiliation list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | affiliation_id | filter_affiliation_id | required_category | required_affiliation_id | required_entity_id | required_From | required_To | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | true | true | true | true | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | no | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | yes | 404 | + + + + diff --git a/test/features/getalertschedulelistnew.feature b/test/features/getalertschedulelistnew.feature new file mode 100644 index 0000000..4e43aeb --- /dev/null +++ b/test/features/getalertschedulelistnew.feature @@ -0,0 +1,51 @@ +Feature: Get Alert List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Alert List Details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an alert_schedule_id "" for smoke testing +When a GET request for an endpoint /alert_schedule/list_details/ is triggered to get details of an alert schedule list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | alert_schedule_id | + | healthngo1 | healthworker | 1 | + + + + + +@unit @happyregression +Scenario Outline: Get Alert List Details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an alert schedule list with details filter for "" and requesting for alert schedule details for "" "" "" and "" +When a GET request for an endpoint /alert_schedule/list_details/ is triggered to get details of an alert schedule list +Then the result should return following details of entity with its name "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | filter_alert_schedule_id | required_target_category | required_entity_id | required_alert_schedule_id | required_message_id | target_category | entity_id | alert_schedule_id | message_id | + | healthngo1 | healthworker | 1 | true | true | true | true | subscriber | 67890 | 1 | 1 | + +@unit @Negativeregression +Scenario Outline: Get Alert List Details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an alert schedule list with details filter for "" and requesting for alert schedule details for "" "" "" and "" +When a GET request for an endpoint /alert_schedule/list_details/ is triggered to get details of an alert schedule list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | filter_alert_schedule_id | required_target_category | required_entity_id | required_alert_schedule_id | required_message_id | status_code | + | healthngo1 | healthworker | myresource | true | false | false | true | 400 | + | healthngo1 | healthworker | 4524453535 | false | true | true | true | 403 | + | healthngo1 | healthworker | 4524453535 | no | true | true | true | 404 | + + + + diff --git a/test/features/getappointmentlistnew.feature b/test/features/getappointmentlistnew.feature new file mode 100644 index 0000000..ad9b7a9 --- /dev/null +++ b/test/features/getappointmentlistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Appointment List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Appointment List Details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an appointment_id "" for smoke testing +When a GET request for an endpoint /appointment/list_details/ is triggered to get details of a appointment list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | appointment_id | + | healthngo1 | healthworker | 1 | + + + + + +@unit @happyregression +Scenario Outline: Get Appointment List Details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an appointment_id "" with details filter for "" and requesting for appointment details for "" "" "" "" "" "" and "" +When a GET request for an endpoint /appointment/list_details/ is triggered to get details of a appointment list +Then the result should return following details of entity with its name "" "" "" "" "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | appointment_id | filter_appointment_id | required_event_type | required_event_id | required_participant_type | required_participant_id | required_appointment_id | required_From | required_To | appointment_id | participant_type | participant_id | event_type | event_id | From | To | + | healthngo1 | healthworker | 1 | 1 | true | true | true | true | true | true | true | 1 | subscriber | 12345 | doctor_consultation | 1 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | + + +@unit @Negativeregression +Scenario Outline: Get Appointment List Details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an appointment_id "" with details filter for "" and requesting for appointment details for "" "" "" "" "" "" and "" +When a GET request for an endpoint /appointment/list_details/ is triggered to get details of a appointment list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | appointment_id | filter_appointment_id | required_participant_type | required_participant_id | required_appointment_id | required_event_id | required_event_type | required_From | required_To | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | true | true | true | true | true | yes | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | yes | true | true | true | true | true | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | no | true | true | true | false | yes | 404 | + + + + diff --git a/test/features/getentitylistnew.feature b/test/features/getentitylistnew.feature new file mode 100644 index 0000000..000d0fe --- /dev/null +++ b/test/features/getentitylistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Entity List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Entity List Details for Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an entity_id "" for smoke testing +When a GET request for an endpoint /entity/list_details/ is triggered to get details of an entity list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | entity_id | + | healthngo1 | healthworker | 4524453535 | + + + + + +@unit @happyregression +Scenario Outline: Get Entity List Details for Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an entity_id "" with details filter for "" and requesting for entity details for "" "" "required_name>" and "" +When a GET request for an endpoint /entity/list_details/ is triggered to get details of an entity list +Then the result should return following details of entity with its name "" "" "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | entity_id | filter_entity_id | required_category | required_entity_id | required_name | required_email | name | category | entity_id | phone | email | website | + | healthngo1 | healthworker | 4524453535| 4524453535 | true | true | true | true |doctor_consultation | opd_physician_consultation | 67890 | 9980555504 | abc@gmail.com | http://abc.com | + + +@unit @Negativeregression +Scenario Outline: Get Entity List Details for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an entity_id "" with details filter for "" and requesting for entity details for "" "" "required_name>" and "" +When a GET request for an endpoint /entity/list_details/ is triggered to get details of an entity list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | entity_id |filter_entity_id | required_category | required_entity_id | required_name | required_email | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | true | true | true | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | 404 | + + + + diff --git a/test/features/geteventlistnew.feature b/test/features/geteventlistnew.feature new file mode 100644 index 0000000..7818154 --- /dev/null +++ b/test/features/geteventlistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Event List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Event List Details for Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an event_id "" for smoke testing +When a GET request for an endpoint /event/list_details/ is triggered to get details of an event list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | event_id | + | healthngo1 | healthworker | 4524453535 | + + + + + +@unit @happyregression +Scenario Outline: Get Event List Details for Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an event_id "" with details filter for "" and requesting for event details for "" "" "" and "" +When a GET request for an endpoint /event/list_details/ is triggered to get details of an event list +Then the result should return following details of entity with its name "" "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | event_id | filter_event_id | required_category | required_host_entity_id | required_name | required_venue | name | category | event_id | host_entity_id | venue | + | healthngo1 | healthworker | 12345 | 12345 | true | true | true | true | doctor_consultation | opd_physician_consultation | 12345 | 67890 | 7th Street, Wilson Garden, Bangalore | + + +@unit @Negativeregression +Scenario Outline: Get Event List Details for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an event_id "" with details filter for "" and requesting for event details for "" "" "" and "" +When a GET request for an endpoint /event/list_details/ is triggered to get details of an event list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | event_id | filter_event_id | required_category | required_host_entity_id | required_name | required_venue | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | yes | true | true | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | no | true | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | false | true | yes | 404 | + + + + diff --git a/test/features/getloglistnew.feature b/test/features/getloglistnew.feature new file mode 100644 index 0000000..5be6ca7 --- /dev/null +++ b/test/features/getloglistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Log List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Log List Details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an log_id "" for smoke testing +When a GET request for an endpoint /log/list_details/ is triggered to get details of a log list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | log_id | + | healthngo1 | healthworker | 1 | + + + + + +@unit @happyregression +Scenario Outline: Get Log List Details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a log_id "" with details filter for "" and requesting for log details for "" "" "" "" and "" +When a GET request for an endpoint /log/list_details/ is triggered to get details of a log list +Then the result should return following details of entity with its name "" "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | log_id | filter_log_id | required_category | required_log_id | required_entity_id | required_From | required_To | log_id | category | entity_id | From | To | + | healthngo1 | healthworker | 1 | 1 | true | true | true | true | true | 1 | attendence | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | + + +@unit @Negativeregression +Scenario Outline: Get Log List Details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a log_id "" with details filter for "" and requesting for log details for "" "" "" "" and "" +When a GET request for an endpoint /log/list_details/ is triggered to get details of a log list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | log_id | filter_log_id | required_category | required_log_id | required_entity_id | required_From | required_To | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | true | true | true | true | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | no | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | yes | 404 | + + + + diff --git a/test/features/getmessagelistnew.feature b/test/features/getmessagelistnew.feature new file mode 100644 index 0000000..180fec8 --- /dev/null +++ b/test/features/getmessagelistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Message List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Message List Details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an message_id "" for smoke testing +When a GET request for an endpoint /message/list_details/ is triggered to get details of a messages list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | message_id | + | healthngo1 | healthworker | 1 | + + + + + +@unit @happyregression +Scenario Outline: Get Message List Details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a message_id "" with details filter for "" and requesting for message details for "" "" "" and "" +When a GET request for an endpoint /message/list_details/ is triggered to get details of a messages list +Then the result should return following details of entity with its name "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | message_id | filter_message_id | required_category | required_message_id | required_entity_id | required_message_body | message_id | category | entity_id | message_body | + | healthngo1 | healthworker | 1 | 1 | true | true | true | true |1 | reminder | 1 | you have doctor consultation today | + + +@unit @Negativeregression +Scenario Outline: Get Message List Details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a message_id "" with details filter for "" and requesting for message details for "" "" "" and "" +When a GET request for an endpoint /message/list_details/ is triggered to get details of a messages list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | message_id | filter_message_id | required_category | required_message_id | required_entity_id | required_message_body | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | true | true | true | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | 404 | + + + + diff --git a/test/features/getresourceavailabalitydetailsnew.feature b/test/features/getresourceavailabalitydetailsnew.feature new file mode 100644 index 0000000..c1f23b8 --- /dev/null +++ b/test/features/getresourceavailabalitydetailsnew.feature @@ -0,0 +1,52 @@ +Feature: Get Resource Availabality Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Resource Availabality Details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an resource_id "" for smoke testing +When a GET request for an endpoint /resource/availabality/ is triggered to get details of a resource availabality list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | resource_id | + | healthngo1 | healthworker | 1 | + + + + + +@unit @happyregression +Scenario Outline: Get Resource Availabality Details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an resource_id "" with entity Id "" for category "" for a date period from "" to "" +When a GET request for an endpoint /resource/availabality/ is triggered to get details of a resource availabality list +Then the result should return following details of entity with its name "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | resource_id | Entity_id | category | From | To | resource_id | resource_name | free_slots | + | healthngo1 | healthworker | 1 | 67890 | doctor | 2018-02-14T09:00:00 | 2018-02-18T13:30:00 | 1 | abc | [2018-02-15T11:00:00to2018-02-15T11:09:00:00],[2018-02-22T11:00:00to2018-02-22T11:17:00:00] | + + +@unit @Negativeregression +Scenario Outline: Get Resource Availabality Details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an resource_id "" with entity Id "" for category "" for a date period from "" to "" +When a GET request for an endpoint /resource/availabality/ is triggered to get details of a resource availabality list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | resource_id | Entity_id | category | From | To | status_code | + | healthngo1 | healthworker | myresource | 4524453535| lawyer | 2018-02-18T13:30:00 | 2018-02-14T09:00:00 | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535| doctor | 2018-02-18T13:30:00 | 2018-02-14T09:00:00 | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535| academician | 2018-02-18T13:30:00 | 2018-02-14T09:00:00 | 404 | + + + + diff --git a/test/features/getresourcelistnew.feature b/test/features/getresourcelistnew.feature new file mode 100644 index 0000000..54f48c5 --- /dev/null +++ b/test/features/getresourcelistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Resource List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Resource List Details for Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for an resource_id "" for smoke testing +When a GET request for an endpoint /resource/list_details/ is triggered to get details of a resources list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | resource_id | + | healthngo1 | healthworker | 54321 | + + + + + +@unit @happyregression +Scenario Outline: Get Resource List Details for Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for an resource_id "" with details filter for "" and requesting for resource details for "" "" "" and "" +When a GET request for an endpoint /resource/list_details/ is triggered to get details of a resources list +Then the result should return following details of entity with its name "" "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | resource_id | filter_resource_id | required_category | required_resource_id | required_name | required_email | name | category | resource_id | phone | email | + | healthngo1 | healthworker | 54321 |54321 | true | true | true | true |doctor_consultation | opd_physician_consultation | 54321 | 9980555504 | abc@gmail.com | + + +@unit @Negativeregression +Scenario Outline: Get Resource List Details for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for an resource_id "" with details filter for "" and requesting for resource details for "" "" "" and "" +When a GET request for an endpoint /resource/list_details/ is triggered to get details of a resources list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | resource_id | filter_resource_id | required_category | required_resource_id | required_name | required_phone | required_email | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | true | true | true | true | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | false | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | yes | 404 | + + + + diff --git a/test/features/getsubscriberlistnew.feature b/test/features/getsubscriberlistnew.feature new file mode 100644 index 0000000..d8ffd8d --- /dev/null +++ b/test/features/getsubscriberlistnew.feature @@ -0,0 +1,52 @@ +Feature: Get Subscriber List Details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Get Subscriber List Details of Scheduler API Smoke Test + +Given the requestor Id is "" with role as "" for a subscriber_id "" for smoke testing +When a GET request for an endpoint /subscriber/list_details/ is triggered to get details of a subscribers list +Then response code of GET request is "200" for smoke testing + + + +Examples: + | requestor_id | requestor_role | subscriber_id | + | healthngo1 | healthworker | 12345 | + + + + + +@unit @happyregression +Scenario Outline: Get Subscriber List Details of Scheduler API Unit and Regression Happy Testing + +Given the requestor Id is "" with role as "" for a subscriber_id "" with details filter for "" and requesting for subscriber details for "" "" "" "" and "" +When a GET request for an endpoint /subscriber/list_details/ is triggered to get details of a subscribers list +Then the result should return following details of entity with its name "" "" "" "" and "" +And response code of GET request is "200" + +Examples: + | requestor_id | requestor_role | subscriber_id | filter_subscriber_id | required_category | required_subscriber_id | required_name | required_email | required_phone | name | category | resource_id | phone | email | + | healthngo1 | healthworker | 12345 | 12345 | true | true | true | true | true |abc | patient | 12345 | 9980555504 | abc@gmail.com | + + +@unit @Negativeregression +Scenario Outline: Get Subscriber List Details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor Id is "" with role as "" for a subscriber_id "" with details filter for "" and requesting for subscriber details for "" "" "" "" and "" +When a GET request for an endpoint /subscriber/list_details/ is triggered to get details of a subscribers list +Then response code of negative testing GET request for invalid data is "" + + + +Examples: + | requestor_id | requestor_role | subscriber_id | filter_subscriber_id | required_category | required_subscriber_id | required_name | required_phone | required_email | status_code | + | healthngo1 | healthworker | myresource | 4524453535 | false | true | true | true | true | 400 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | false | 403 | + | healthngo1 | healthworker | 4524453535 | 4524453535 | true | true | true | true | yes | 404 | + + + + diff --git a/test/features/updateaffiliationnew.feature b/test/features/updateaffiliationnew.feature new file mode 100644 index 0000000..afb6894 --- /dev/null +++ b/test/features/updateaffiliationnew.feature @@ -0,0 +1,37 @@ +Feature: Update an affiliation details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update an affiliation details of Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update an affiliation with its ID "1" +When an Update request for an endpoint /affiliation/modifications/ is triggered to update existing affiliation details for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update an affiliation details of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for an affiliation with Id "" to update an affiliation details like "" "" for resource of category "" for a schedule on "" from "" to "" +When an Update request for an endpoint /affiliation/modifications/ is triggered to update existing affiliation details for scheduler block +Then response code of Update request is "200" + +Examples: + | requestor_id | requestor_role | affiliation_id | resource_id | entity_id | resource_category | day_of_week | start_time | end_time | + | healthngo1 | healthworker | 1 | 12345 | 67890 | physician | monday | 09:00:00 | 17:00:00 | + + +@unit @Negativeregression +Scenario Outline: Update an affiliation details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for an affiliation with Id "" to update an affiliation details like "" "" for resource of category "" for a schedule on "" from "" to "" +When an Update request for an endpoint /affiliation/modifications/ is triggered to update existing affiliation details for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | affiliation_id | resource_id | entity_id | resource_category | day_of_week | start_time | end_time | status_code | + | healthngo1 | healthworker | 0 | 12345 | 67890 | physician | monday | 09:00:00 | 17:00:00 | 400 | + | healthngo1 | healthworker | 333 | 12345 | 67890 | physician | monday | 17:00:00 | 09:00:00 | 403 | + | healthngo1 | healthworker | my |resource | 67890 | nurse | monday | 17:00:00 | 09:00:00 | 404 | diff --git a/test/features/updatealertschedulenew.feature b/test/features/updatealertschedulenew.feature new file mode 100644 index 0000000..8d8b707 --- /dev/null +++ b/test/features/updatealertschedulenew.feature @@ -0,0 +1,41 @@ +Feature: Update an Alert Schedule for Management of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update an Alert Schedule for Management of Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update an alert schedule with its ID "2" +When an Update request for an endpoint /alert_schedule/modifications/ is triggered to update existing alert schedule for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update an Alert Schedule for Management of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for an alert schedule with Id "" to update an alert with its details like "" for "" with "" within a "" +When an Update request for an endpoint /alert_schedule/modifications/ is triggered to update existing alert schedule for scheduler block +Then response code of Update request is "200" +Examples: + + Examples: + | requestor_id | requestor_role | alert_schedule_id | event_id | target_category | message_id | alert_datetime | + | healthngo1 | healthworker | 2 | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | + + +@unit @Negativeregression +Scenario Outline: Update an Alert Schedule for Management of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for an alert schedule with Id "" to update an alert with its details like "" for "" with "" within a "" +When an Update request for an endpoint /alert_schedule/modifications/ is triggered to update existing alert schedule for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | alert_schedule_id | event_id | target_category | message_id | alert_datetime | status_code | + | healthngo1 | healthworker | 2 | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | 400 | + | healthngo1 | healthworker | 1 | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | 403 | + | healthngo1 | healthworker | 2 | 12345 | subscriber | 1 | 2018-02-15T09:00:00| 404 | + + + diff --git a/test/features/updateappointmentnew.feature b/test/features/updateappointmentnew.feature new file mode 100644 index 0000000..8459c33 --- /dev/null +++ b/test/features/updateappointmentnew.feature @@ -0,0 +1,39 @@ +Feature: Update an appointment details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update an appointment details for Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update an appointment details with its ID "4524453535" +When an Update request for an endpoint /appointment/modifications/ is triggered to update existing appointment details for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update an appointment details for Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for an appointment with Id "" to update an appointment with its details like "" and "" for participant of "" "" and "" for a time period "" till "" with deadline "" +When an Update request for an endpoint /appointment/modifications/ is triggered to update existing appointment details for scheduler block +Then response code of Update request is "200" + +Examples: + | requestor_id | requestor_role | appointment_id | entity_id | entity_type | participant_type | participant_id | participant_entity_id | From | To | deadline | + | healthngo1 | healthworker | 1 |1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 2018-02-15T11:10:00 | + +@unit @Negativeregression +Scenario Outline: Update an appointment details for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for an appointment with Id "" to update an appointment with its details like "" and "" for participant of "" "" and "" for a time period "" till "" with deadline "" +When an Update request for an endpoint /appointment/modifications/ is triggered to update existing appointment details for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | appointment_id | entity_id | entity_type | participant_type | participant_id | participant_entity_id | From | To | deadline | status_code | + | healthngo1 | healthworker | 3456 | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-03-15T11:30:00 | 2018-02-15T11:10:00 | 400 | + | healthngo1 | healthworker | 1 | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:45:00 | 2018-02-15T11:30:00 | 2018-02-15T11:10:00 | 403 | + | healthngo1 | healthworker | 12345 |1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-07-15T11:30:00 | 2018-02-15T11:10:00 | 404 | + + + diff --git a/test/features/updateentitynew.feature b/test/features/updateentitynew.feature new file mode 100644 index 0000000..69cbe5c --- /dev/null +++ b/test/features/updateentitynew.feature @@ -0,0 +1,41 @@ +Feature: Update an entity of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update an entity for Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update an entity with its ID "4524453535" +When an Update request for an endpoint /entity/modifications/ is triggered to update existing entity for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update an entity for Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for an entity with Id "" to update an entity with name "" for "" with following details like "" "" with "" +When an Update request for an endpoint /entity/modifications/ is triggered to update existing entity for scheduler block +Then response code of Update request is "200" +Examples: + + Examples: + | requestor_id | requestor_role | entity_id | name | category | phone | email | website | + | healthngo1 | healthworker | 67890 |practo | hospital | 9980555504 | abc@gmail.com | www.abc.com | + + +@unit @Negativeregression +Scenario Outline: Update an entity for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for an entity with Id "" to update an entity with name "" for "" with following details like "" "" with "" +When an Update request for an endpoint /entity/modifications/ is triggered to update existing entity for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | entity_id | name | category | phone | email | website | status_code | + | healthngo1 | healthworker | 67890 | practo | hospital | 9980555504 | sree@gmail.com | http://alert.com | 400 | + | healthngo1 | healthworker | 67890 | practo | education | 9980555504 | sree@gmail.com | http://alert.com | 403 | + | healthngo1 | healthworker | 67890 | practo | agriculture| 9980555504 | sree@gmail.com | http://alert.com | 404 | + + + diff --git a/test/features/updateevent.feature b/test/features/updateevent.feature new file mode 100644 index 0000000..ecdcbad --- /dev/null +++ b/test/features/updateevent.feature @@ -0,0 +1,41 @@ +Feature: Update an event of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update an event for Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update an event with its ID "4524453535" +When an Update request for an endpoint /event/modifications/ is triggered to update existing event for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update an event for Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for an event with Id "" to update an event with name "" "" "" for a period "" till "" for a venue in "" "" "" with "" "" +When an Update request for an endpoint /event/modifications/ is triggered to update existing event for scheduler block +Then response code of Update request is "200" +Examples: + + Examples: + | requestor_id | requestor_role | event_id | name | category | host_entity_id | From | To | street | building | area | lat | long | + | healthngoadmin1 | healthworker | 4524458935 | doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyx | wilsongarden | 0.1 | 0.2 | + + +@unit @Negativeregression +Scenario Outline: Update an event for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for an event with Id "" to update an event with name "" "" "" for a period "" till "" for a venue in "" "" "" with "" "" +When an Update request for an endpoint /event/modifications/ is triggered to update existing event for scheduler block +Then response code of negative testing an Update request for invalid data is "" + + +Examples: + | requestor_id | requestor_role | event_id | name | category | host_entity_id | From | To | street | building | area | lat | long | status_code | + | healthngo1 | healthworker | 4524453535| doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyx | wilsongarden | 0.1 | 0.2 | 400 | + | healthngo1 | healthworker | 4524453535| doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyx | wilsongarden | 0.1 | 0.2 | 403 | + | healthngo1 | healthworker | 4524453535| doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyx | wilsongarden | 0.1 | 0.2 | 404 | + + diff --git a/test/features/updatelognew.feature b/test/features/updatelognew.feature new file mode 100644 index 0000000..8aa5e81 --- /dev/null +++ b/test/features/updatelognew.feature @@ -0,0 +1,37 @@ +Feature: Update a log details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update a log details of Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update a log with its ID "1" +When an Update request for an endpoint /log/modifications/ is triggered to update existing log details for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update a log details of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for a log with Id "" to update a log details for role "" with its Id "" "" for category "" from time period of "" with data as "" +When an Update request for an endpoint /log/modifications/ is triggered to update existing log details for scheduler block +Then response code of Update request is "200" + +Examples: + | requestor_id | requestor_role | log_id | logger_role | logger_id | entity_id | log_category | datetime | log_data | + | healthngo1 | healthworker | 1 | resource | 1 | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | + +@unit @Negativeregression +Scenario Outline: Update a log details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for a log with Id "" to update a log details for role "" with its Id "" "" for category "" from time period of "" with data as "" +When an Update request for an endpoint /log/modifications/ is triggered to update existing log details for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | log_id | logger_role | logger_id | entity_id | log_category | datetime | log_data | status_code | + | healthngo1 | healthworker | 54321 | resource | 1 | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | 400 | + | healthngo1 | healthworker | mylog | 67890 | resource | 1 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | 403 | + | healthngo1 | healthworker | 67890 | 67890 |resource | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | 404 | + diff --git a/test/features/updatemessagenew.feature b/test/features/updatemessagenew.feature new file mode 100644 index 0000000..0c2799a --- /dev/null +++ b/test/features/updatemessagenew.feature @@ -0,0 +1,38 @@ +Feature: Update a message of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update a message of Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update a message with its ID "1" +When an Update request for an endpoint /message/modifications/ is triggered to update existing message details for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update a message of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for a message with Id "" to update a message details like "" "" and "" +When an Update request for an endpoint /message/modifications/ is triggered to update existing message details for scheduler block +Then response code of Update request is "200" + +Examples: + | requestor_id | requestor_role | message_id | entity_id | category | message_body | + | healthngo1 | healthworker | 1 | 67890 | reminder | you have a doctor consultatio today | + + +@unit @Negativeregression +Scenario Outline: Update a message of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for a message with Id "" to update a message details like "" "" and "" +When an Update request for an endpoint /message/modifications/ is triggered to update existing message details for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | message_id | entity_id | category | message_body | status_code | + | healthngo1 | healthworker | 54321 | 67890 | reminder | you have a doctor consultatio today | 400 | + | healthngo1 | healthworker | 67890 | 67890 | reminder | you have a doctor consultatio today | 403 | + | healthngo1 | healthworker | 67890 | 67890 | reminder | you have a doctor consultatio today | 404 | + diff --git a/test/features/updateresourcenew.feature b/test/features/updateresourcenew.feature new file mode 100644 index 0000000..90e8557 --- /dev/null +++ b/test/features/updateresourcenew.feature @@ -0,0 +1,40 @@ +Feature: Update a resource of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update a resource for Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update a resource with its ID "54321" +When an Update request for an endpoint /resource/modifications/ is triggered to update existing resource for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update a resource for Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for a resource with Id "" to update a resource details like "" for "" with "" "" "" "" and "" +When an Update request for an endpoint /resource/modifications/ is triggered to update existing resource for scheduler block +Then response code of Update request is "200" + +Examples: + | requestor_id | requestor_role | resource_id | name | category | phone | email | alert_url | alert_preference | status_poll_url | + | healthngo1 | healthworker | 54321 |practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | + + +@unit @Negativeregression +Scenario Outline: Update a resource for Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for a resource with Id "" to update a resource details like "" for "" with "" "" "" "" and "" +When an Update request for an endpoint /resource/modifications/ is triggered to update existing resource for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | resource_id | name | category | phone | email | alert_url | alert_preference | status_poll_url | status_code | + | healthngo1 | healthworker | 54321 | practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | 400 | + | healthngo1 | healthworker | 67890 | practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | 403 | + | healthngo1 | healthworker | 67890 | practo | hospital | 9980555504 | abc@gmail.com | psrk@gmail.com | phone | www.doctor1.com | 404 | + + + diff --git a/test/features/updatesubscribernew.feature b/test/features/updatesubscribernew.feature new file mode 100644 index 0000000..cad000b --- /dev/null +++ b/test/features/updatesubscribernew.feature @@ -0,0 +1,41 @@ +Feature: Update a subscriber details of Scheduler API + +Gherkin feature files for GovStack Scheduler services + +@smoke +Scenario Outline: Update a subscriber details of Scheduler API Smoke Test + +Given the requestor id is "healthngo1" with role as "healthworker" to update a subscriber details with its ID "12345" +When an Update request for an endpoint /subscriber/modifications/ is triggered to update existing subscriber details for scheduler block +Then response code of Update request is "200" for smoke testing + + + +@unit @happyregression +Scenario Outline: Update a subscriber details of Scheduler API Unit and Regression Happy Testing + +Given the requestor id is "" with role as "" for a subscriber with Id "" to update a subscriber details name "" for "" with following details like "" "" with "" having "" and "" +When an Update request for an endpoint /subscriber/modifications/ is triggered to update existing subscriber details for scheduler block +Then response code of Update request is "200" + +Examples: + | requestor_id | requestor_role | subscriber_id | name | category | phone | email | alert_url | alert_preference | status_poll_url | + | healthngo1 | healthworker | 12345 |practo | hospital | 9980555504 | abc@gmail.com | www.abc.com | phone | www.abc.com | + + +@unit @Negativeregression +Scenario Outline: Update a subscriber details of Scheduler API Unit and Regression Negative Testing + +Given the invalid inputs for the requestor id is "" with role as "" for a subscriber with Id "" to update a subscriber details name "" for "" with following details like "" "" with "" having "" and "" +When an Update request for an endpoint /subscriber/modifications/ is triggered to update existing subscriber details for scheduler block +Then response code of negative testing an Update request for invalid data is "" + +Examples: + | requestor_id | requestor_role | subscriber_id | name | category | phone | email | alert_url | alert_preference | status_poll_url | status_code | + | healthngo1 | healthworker | hello | practo | hospital | 9980555504 | sree@gmail.com | wwww.alert.com | phone | www.abc.com | 400 | + | healthngo1 | healthworker | 3456 | practo | education | 9980555504 | sree@gmail.com | www.alert.com | email | www.abc.com | 403 | + | healthngo1 | healthworker | 1234 | practo | agriculture | 9980555504 | sree@gmail.com | www.alert.com | message | www.abc.com | 404 | + | healthngo1 | healthworker | 4567 | practo | agriculture | 9980555504 | sree@gmail.com | http://alert.com | phone | www.abc.com | 404 | + + + diff --git a/test/requirnments.txt b/test/requirnments.txt new file mode 100644 index 0000000..49f090b --- /dev/null +++ b/test/requirnments.txt @@ -0,0 +1,10 @@ +fastapi +uvicorn +python-multipart +pytest +pytest-bdd +requests +#selenium +#webdriver_manager +pytest-html +pytest-json-report diff --git a/test/step_deps/test_create_affiliation_new.py b/test/step_deps/test_create_affiliation_new.py new file mode 100644 index 0000000..c410896 --- /dev/null +++ b/test/step_deps/test_create_affiliation_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/affiliation/new' + +# Scenarios + +scenarios('../features/createaffiliationnew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new affiliation'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create an affiliation with its details "{resource_id}" "{entity_id}" for resource of category "{resource_category}" for a schedule on "{day_of_week}" from "{start_time}" to "{end_time}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role,resource_id, entity_id, resource_category,day_of_week, start_time, end_time ): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'affiliation_details[entity_id]': entity_id, 'affiliation_details[resource_id]': resource_id, 'affiliation_details[resource_category]': resource_category, 'affiliation_details[work_days_hours][day_of_week]': day_of_week, 'affiliation_details[work_days_hours][start_time]': start_time, 'affiliation_details[work_days_hours][end_time]':end_time} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create an affiliation with its details "{resource_id}" "{entity_id}" for resource of category "{resource_category}" for a schedule on "{day_of_week}" from "{start_time}" to "{end_time}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role,resource_id, entity_id, resource_category,day_of_week, start_time, end_time): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'affiliation_details[entity_id]': entity_id, 'affiliation_details[resource_id]': resource_id, 'affiliation_details[resource_category]': resource_category, 'affiliation_details[work_days_hours][day_of_week]': day_of_week, 'affiliation_details[work_days_hours][start_time]': start_time, 'affiliation_details[work_days_hours][end_time]':end_time} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return affiliation Id as "{affiliation_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,affiliation_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(affiliation_id) + assert affiliation_id == affiliation_id + +@then(parsers.parse('the result should return affiliation details like "{affiliation_id}" and "{affiliation_name}" for requested affiliation')) +def unit_response_assert(unit_post_request, affiliation_name, affiliation_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(affiliation_id) + assert affiliation_id == affiliation_id + +@when(parsers.parse('a POST request for an endpoint /affiliation/new/ is triggered to create new affiliation for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_alert_schedule_new.py b/test/step_deps/test_create_alert_schedule_new.py new file mode 100644 index 0000000..575e43a --- /dev/null +++ b/test/step_deps/test_create_alert_schedule_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/alert_schedule/new' + +# Scenarios + +scenarios('../features/createalertschedulenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new alert schedule'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a new alert schedule with event "{event_id}" for "{target_category}" with "{message_id}" within a "{alert_datetime}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, event_id,target_category,message_id,alert_datetime): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'alert_schedule_details[event_id]': event_id, 'alert_schedule_details[target_category]': target_category, 'alert_schedule_details[message_id]': message_id, 'alert_schedule_details[alert_datetime]': alert_datetime} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a new alert schedule with event "{event_id}" for "{target_category}" with "{message_id}" within a "{alert_datetime}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, event_id,target_category,message_id,alert_datetime): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'alert_schedule_details[event_id]': event_id, 'alert_schedule_details[target_category]': target_category, 'alert_schedule_details[message_id]': message_id, 'alert_schedule_details[alert_datetime]': alert_datetime} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return alert schedule Id as "{alert_schedule_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,alert_schedule_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(alert_schedule_id) + assert alert_schedule_id == alert_schedule_id + +@then(parsers.parse('the result should return alert details like "{alert_schedule_id}" and "{alert_schedule_name}" for requested schedule')) +def unit_response_assert(unit_post_request, alert_schedule_id, alert_schedule_name): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(alert_schedule_id) + assert alert_schedule_id == alert_schedule_id + +@when(parsers.parse('a POST request for an endpoint /alert_schedule/new/ is triggered to create new alert schedule for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_appointment_new.py b/test/step_deps/test_create_appointment_new.py new file mode 100644 index 0000000..3c524c6 --- /dev/null +++ b/test/step_deps/test_create_appointment_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/appointment/new' + +# Scenarios + +scenarios('../features/createappointmentnew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new appointment'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a new appointment for an entity with "{entity_id}" and "{entity_type}" for participant of "{participant_type}" "{participant_id}" and "{participant_entity_id}" for a time period "{From}" till "{To}" with deadline "{deadline}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, entity_id, entity_type, participant_type, participant_id, participant_entity_id, From, To, deadline): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'appointment_details[entity_id]': entity_id, 'appointment_details[entity_type]': entity_type, 'appointment_details[participant_type]': participant_type, 'appointment_details[participant_id]': participant_id, 'appointment_details[participant_entity_id]': participant_entity_id, 'appointment_details[From]':From,'appointment_details[To]':To, 'appointment_details[deadline]': deadline} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a new appointment for an entity with "{entity_id}" and "{entity_type}" for participant of "{participant_type}" "{participant_id}" and "{participant_entity_id}" for a time period "{From}" till "{To}" with deadline "{deadline}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, entity_id, entity_type, participant_type, participant_id, participant_entity_id, From, To, deadline): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'appointment_details[entity_id]': entity_id, 'appointment_details[entity_type]': entity_type, 'appointment_details[participant_type]': participant_type, 'appointment_details[participant_id]': participant_id, 'appointment_details[participant_entity_id]': participant_entity_id, 'appointment_details[From]':From,'appointment_details[To]':To, 'appointment_details[deadline]': deadline} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return appointment Id as "{appointment_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,appointment_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(appointment_id) + assert appointment_id == appointment_id + +@then(parsers.parse('the result should return appointment details like "{appointment_id}" and "{appointment_name}" for requested appointment')) +def unit_response_assert(unit_post_request, appointment_name, appointment_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(appointment_id) + assert appointment_id == appointment_id + +@when(parsers.parse('a POST request for an endpoint /appointment/new/ is triggered to create new appointment for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_entity_new.py b/test/step_deps/test_create_entity_new.py new file mode 100644 index 0000000..cff7e2e --- /dev/null +++ b/test/step_deps/test_create_entity_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/entity/new' + +# Scenarios + +scenarios('../features/createnewentity.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new entity'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a entity with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{website}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, name, category, phone, email, website ): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[website]':website} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a entity with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{website}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, name, category, phone, email, website): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[website]':website} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return entity Id as "{entity_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,entity_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(entity_id) + assert entity_id == entity_id + +@then(parsers.parse('the result should return entity details like "{entity_id}" and "{entity_name}" for requested entity')) +def unit_response_assert(unit_post_request, entity_name, entity_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(entity_id) + assert entity_id == entity_id + +@when(parsers.parse('a POST request for an endpoint /entity/new/ is triggered to create new entity for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_event_new.py b/test/step_deps/test_create_event_new.py new file mode 100644 index 0000000..dcedf42 --- /dev/null +++ b/test/step_deps/test_create_event_new.py @@ -0,0 +1,83 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/event/new' + +# Scenarios + +scenarios('../features/createnewevent.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor is "{healthngoadmin1}" with role as "{healthworker}" to create a new event'), target_fixture='smoke_post_request') +def smoke_post_request(healthngoadmin1,healthworker): + data = {'requestor_id': healthngoadmin1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor is "{requestor_id}" with role as "{requestor_role}" to create a new event with following details like "{name}" "{category}" "{host_entity_id}" for a period "{From}" till "{To}" for a venue in "{street}" "{building}" "{area}" with "{lat}" "{long}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, name, category, host_entity_id, From, To, street, building, area, lat, long ): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'details[name]': name, 'details[category]': category, 'details[host_entity_id]': host_entity_id, 'details[From]': From, 'details[To]': To, 'details[venue][street]': street, 'details[venue][building]': building, 'details[venue][area]': area,'details[venue][lat]': lat, 'details[venue][long]': long} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor is "{requestor_id}" with role as "{requestor_role}" to create a new event with following details like "{name}" "{category}" "{host_entity_id}" for a period "{From}" till "{To}" for a venue in "{street}" "{building}" "{area}" with "{lat}" "{long}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, name, category, host_entity_id, From, To, street, building, area, lat, long): + + data = {'requestor_id': requestor_id,'requestor_role': requestor_role, 'details[name]': name, 'details[category]': category, 'details[host_entity_id]': host_entity_id, 'details[From]': From, 'details[To]': To, 'details[venue][street]': street, 'details[venue][building]': building, 'details[venue][area]': area,'details[venue][lat]': lat, 'details[venue][long]': long} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return event details as "{event_name}" "{event_id}" for requested event')) +def unit_response_assert(unit_post_request, event_name, event_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(event_id) + assert event_id == event_id + +@when(parsers.parse('a POST request for an endpoint /event/new is triggered to create new event for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for error is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_log_new.py b/test/step_deps/test_create_log_new.py new file mode 100644 index 0000000..6116a8c --- /dev/null +++ b/test/step_deps/test_create_log_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/log/new' + +# Scenarios + +scenarios('../features/createlognew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new log'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a log for role "{logger_role}" with its Id "{logger_id}" "{entity_id}" for category "{log_category}" from time period of "{datetime}" with data as "{log_data}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, logger_role, logger_id, entity_id, log_category, datetime, log_data): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'log_details[logger_role]': logger_role, 'log_details[logger_id]': logger_id, 'log_details[entity_id]': entity_id, 'log_details[log_category]':log_category,'log_details[datetime]':datetime,'log_details[log_data]':log_data } + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a log for role "{logger_role}" with its Id "{logger_id}" "{entity_id}" for category "{log_category}" from time period of "{datetime}" with data as "{log_data}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, logger_role, logger_id, entity_id, log_category, datetime, log_data): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'log_details[logger_role]': logger_role, 'log_details[logger_id]': logger_id, 'log_details[entity_id]': entity_id, 'log_details[log_category]':log_category,'log_details[datetime]':datetime,'log_details[log_data]':log_data} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return log Id as "{log_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,log_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(log_id) + assert log_id == log_id + +@then(parsers.parse('the result should return log details like "{log_name}" and "{log_id}" for requested log')) +def unit_response_assert(unit_post_request, log_name, log_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(log_id) + assert log_id == log_id + +@when(parsers.parse('a POST request for an endpoint /log/new/ is triggered to create new log for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_message_new.py b/test/step_deps/test_create_message_new.py new file mode 100644 index 0000000..2e45c85 --- /dev/null +++ b/test/step_deps/test_create_message_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/message/new' + +# Scenarios + +scenarios('../features/createmessagenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new message'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a message with details like "{entity_id}" "{category}" with message body as "{message_body}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, entity_id, category, message_body): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'message_details[entity_id]': entity_id, 'message_details[category]': category, 'message_details[message_body]': message_body} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a message with details like "{entity_id}" "{category}" with message body as "{message_body}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, entity_id, category, message_body): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'message_details[entity_id]': entity_id, 'message_details[category]': category, 'message_details[message_body]': message_body} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return message Id as "{message_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,message_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(message_id) + assert message_id == message_id + +@then(parsers.parse('the result should return message details like "{message_name}" and "{message_id}" for requested message')) +def unit_response_assert(unit_post_request, message_name, message_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(message_id) + assert message_id == message_id + +@when(parsers.parse('a POST request for an endpoint /message/new/ is triggered to create new message for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_resource_new.py b/test/step_deps/test_create_resource_new.py new file mode 100644 index 0000000..d0819bd --- /dev/null +++ b/test/step_deps/test_create_resource_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/resource/new' + +# Scenarios + +scenarios('../features/createresourcenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new resource'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a resource with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{alert_url}" "{alert_preference}" and "{status_poll_url}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, name, category, phone, email, alert_url,alert_preference,status_poll_url): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'resource_details[name]': name, 'resource_details[category]': category, 'resource_details[phone]': phone, 'resource_details[email]': email, 'resource_details[alert_url]':alert_url, 'resource_details[alert_preference]': alert_preference, 'resource_details[status_poll_url]': status_poll_url} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a resource with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{alert_url}" "{alert_preference}" and "{status_poll_url}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, name, category, phone, email, alert_url,alert_preference,status_poll_url): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'resource_details[name]': name, 'resource_details[category]': category, 'resource_details[phone]': phone, 'resource_details[email]': email, 'resource_details[alert_url]':alert_url, 'resource_details[alert_preference]': alert_preference, 'resource_details[status_poll_url]': status_poll_url} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return resource Id as "{resource_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,resource_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(resource_id) + assert resource_id == resource_id + +@then(parsers.parse('the result should return resource details like "{resource_id}" and "{resource_name}" for requested resource')) +def unit_response_assert(unit_post_request, resource_name, resource_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(resource_id) + assert resource_id == resource_id + +@when(parsers.parse('a POST request for an endpoint /resource/new/ is triggered to create new resource for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_create_subscriber_new.py b/test/step_deps/test_create_subscriber_new.py new file mode 100644 index 0000000..94682e8 --- /dev/null +++ b/test/step_deps/test_create_subscriber_new.py @@ -0,0 +1,93 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +#API_HOME = 'http://myapi:3000/entity/create_entity/' +API_HOME = 'http://myapi:3000/subscriber/new' + +# Scenarios + +scenarios('../features/createsubscribernew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{healthngo1}" with role as "{healthworker}" to create a new subscriber'), target_fixture='smoke_post_request') +def smoke_post_request(healthngo1,healthworker): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker} + response = requests.post(API_HOME, data = data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a subscriber with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{alert_url}" having "{alert_preference}" and "{status_poll_url}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, name, category, phone, email, alert_url, alert_preference, status_poll_url): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'subscriber_details[name]': name, 'subscriber_details[category]': category, 'subscriber_details[phone]': phone, 'subscriber_details[email]': email, 'subscriber_details[alert_url]': alert_url, 'subscriber_details[alert_prefernce]':alert_preference,'subscriber_details[status_poll_url]':status_poll_url} + response = requests.post(API_HOME, data = data) + print(data) + print(response.url) + print(response.text) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" to create a subscriber with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{alert_url}" having "{alert_preference}" and "{status_poll_url}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, name, category, phone, email, alert_url, alert_preference, status_poll_url): + + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'subscriber_details[name]': name, 'subscriber_details[category]': category, 'subscriber_details[phone]': phone, 'subscriber_details[email]': email, 'subscriber_details[alert_url]': alert_url, 'subscriber_details[alert_prefernce]':alert_preference,'subscriber_details[status_poll_url]':status_poll_url} + response = requests.post(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + + +@then(parsers.parse('the result should return subscriber Id as "{subscriber_id:d}" for smoke testing')) +def unit_response_assert(smoke_post_request,subscriber_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = smoke_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(subscriber_id) + assert subscriber_id == subscriber_id + +@then(parsers.parse('the result should return subscriber details like "{subscriber_id}" and "{subscriber_name}" for requested subscriber')) +def unit_response_assert(unit_post_request, subscriber_name, subscriber_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_response = unit_post_request.json() + print(assert_response) + print(type(assert_response.split(",", 1))) + print(assert_response.split(",", 1)[1]) + print(subscriber_id) + assert subscriber_id == subscriber_id + +@when(parsers.parse('a POST request for an endpoint /subscriber/new/ is triggered to create new subscriber for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + +@then(parsers.parse('response code of POST request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of POST request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing POST request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code diff --git a/test/step_deps/test_delete_affiliation_new.py b/test/step_deps/test_delete_affiliation_new.py new file mode 100644 index 0000000..aa7c1f3 --- /dev/null +++ b/test/step_deps/test_delete_affiliation_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/affiliation/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deleteaffiliationnew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an affiliation_id "{affiliation_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,affiliation_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'affiliation_id':affiliation_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an affiliation with affiliationId "{affiliation_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, affiliation_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'affiliation_id': affiliation_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an affiliation with affiliationId "{affiliation_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, affiliation_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'affiliation_id': affiliation_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /affiliation is triggered to delete an affiliation for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_alert_schedule_new.py b/test/step_deps/test_delete_alert_schedule_new.py new file mode 100644 index 0000000..265e4c2 --- /dev/null +++ b/test/step_deps/test_delete_alert_schedule_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/alert_schedule/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deletealertschedulenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an alert_schedule_id "{alert_schedule_id:d}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,alert_schedule_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'alert_schedule_id':alert_schedule_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an alert_schedule with alert_schedule_Id "{alert_schedule_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, alert_schedule_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'alert_schedule': alert_schedule_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an alert_schedule with alert_schedule_Id "{alert_schedule_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, alert_schedule_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'alert_schedule_id': alert_schedule_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /alert_schedule is triggered to delete an alert schedule for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_appointment_new.py b/test/step_deps/test_delete_appointment_new.py new file mode 100644 index 0000000..944224f --- /dev/null +++ b/test/step_deps/test_delete_appointment_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/appointment/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deleteappointmentnew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an appointment_id "{appointment_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,appointment_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'appointment_id':appointment_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an appointment with appointmentId "{appointment_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, appointment_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'appointment_id': appointment_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an appointment with appointmentId "{appointment_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, appointment_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'appointment_id': appointment_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /appointment is triggered to delete an appointment for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_entity_new.py b/test/step_deps/test_delete_entity_new.py new file mode 100644 index 0000000..374aec6 --- /dev/null +++ b/test/step_deps/test_delete_entity_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/entity/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deleteentity.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an entity_id "{entity_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,entity_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'entity_id':entity_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an entity with entityId "{entity_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, entity_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'entity_id': entity_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an entity with entityId "{entity_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, entity_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'entity_id': entity_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /entity is triggered to delete an entity for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_event_new.py b/test/step_deps/test_delete_event_new.py new file mode 100644 index 0000000..7fdcfa4 --- /dev/null +++ b/test/step_deps/test_delete_event_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/event/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deleteevent.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event_id "{event_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,event_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'event_id':event_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event with eventId "{event_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, event_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'event_id': event_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event with eventId "{event_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, event_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'event_id': event_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /event is triggered to delete an event for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_log_new.py b/test/step_deps/test_delete_log_new.py new file mode 100644 index 0000000..22b0382 --- /dev/null +++ b/test/step_deps/test_delete_log_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/log/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deletelognew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a log_id "{log_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,log_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'log_id':log_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a log_id "{log_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id,requestor_role,log_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'log_id':log_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a log_id "{log_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id,requestor_role,log_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'log_id':log_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /log is triggered to delete a log for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_message_new.py b/test/step_deps/test_delete_message_new.py new file mode 100644 index 0000000..b9db7fe --- /dev/null +++ b/test/step_deps/test_delete_message_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/message/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deletemessagenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a message_id "{message_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,message_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'message_id':message_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a message_id "{message_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id,requestor_role,message_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'message_id':message_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a message_id "{message_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id,requestor_role,message_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'message_id':message_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /message is triggered to delete a message for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_resource_new.py b/test/step_deps/test_delete_resource_new.py new file mode 100644 index 0000000..2f82c07 --- /dev/null +++ b/test/step_deps/test_delete_resource_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/resource/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deleteresourcenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a resource_id "{resource_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,resource_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'resource_id':resource_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a resource_id "{resource_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id,requestor_role,resource_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'resource_id':resource_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a resource_id "{resource_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id,requestor_role,resource_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'resource_id':resource_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /resource is triggered to delete a resource for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_delete_subscriber_new.py b/test/step_deps/test_delete_subscriber_new.py new file mode 100644 index 0000000..1fbab8c --- /dev/null +++ b/test/step_deps/test_delete_subscriber_new.py @@ -0,0 +1,71 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/subscriber/' +#API_HOME = 'http://myapi:3000/session/create_session/' + +# Scenarios + +scenarios('../features/deletesubscribernew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an subscriber_id "{subscriber_id}" for smoke testing'), target_fixture='smoke_post_request') +def smoke_post_request(requestor_id,requestor_role,subscriber_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'subscriber_id':subscriber_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a subscriber with subscriberId "{subscriber_id}"'), target_fixture='unit_post_request') +def unit_post_request(requestor_id, requestor_role, subscriber_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'subscriber_id': subscriber_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a subscriber with subscriberId "{subscriber_id}"'), target_fixture='neg_post_request') +def neg_post_request(requestor_id, requestor_role, subscriber_id): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'subscriber_id': subscriber_id} + response = requests.delete(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('a Delete request for an endpoint /subscriber is triggered to delete a subscriber for scheduler block'), target_fixture = 'post_request') +def post_request(): + pass + + +@then(parsers.parse('response code of Delete request is "{code:d}" for smoke testing')) +def smoke_post_response_code(smoke_post_request, code): + assert smoke_post_request.status_code == code + +@then(parsers.parse('response code of Delete request is "{code:d}"')) +def unit_post_response_code(unit_post_request, code): + assert unit_post_request.status_code == code + + +@then(parsers.parse('response code of negative testing Delete request for invalid data is "{status_code:d}"')) +def neg_post_response_code(neg_post_request, status_code): + assert neg_post_request.status_code != status_code + diff --git a/test/step_deps/test_get_affiliation_list_new.py b/test/step_deps/test_get_affiliation_list_new.py new file mode 100644 index 0000000..2d69968 --- /dev/null +++ b/test/step_deps/test_get_affiliation_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/affiliation/list_details/' + +# Scenarios + +scenarios('../features/getaffiliationlistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an affiliation_id "{affiliation_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an affiliation_id "{affiliation_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role,affiliation_id ): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'affiliation_id': affiliation_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a affiliation_id "{affiliation_id}" with details filter for "{filter_affiliation_id}" and requesting for affiliation details for "{required_category}" "{required_affiliation_id}" "{required_entity_id}" "{required_From}" and "{required_To}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, affiliation_id, filter_affiliation_id, required_category, required_affiliation_id, required_entity_id, required_From, required_To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'affiliation_id': affiliation_id, 'affiliation_filter[affiliation_id]': filter_affiliation_id, 'affiliation_details_required[category]': required_category,'affiliation_details_required[affiliation_id]': required_affiliation_id,'affiliation_details_required[entity_id]': required_entity_id,'affiliation_details_required[From]': required_From, 'affiliation_details_required[To]':required_To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a affiliation_id "{affiliation_id}" with details filter for "{filter_affiliation_id}" and requesting for affiliation details for "{required_category}" "{required_affiliation_id}" "{required_entity_id}" "{required_From}" and "{required_To}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, affiliation_id, filter_affiliation_id, required_category, required_affiliation_id, required_entity_id, required_From, required_To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'affiliation_id': affiliation_id, 'affiliation_filter[affiliation_id]': filter_affiliation_id, 'affiliation_details_required[category]': required_category,'affiliation_details_required[affiliation_id]': required_affiliation_id,'affiliation_details_required[entity_id]': required_entity_id,'affiliation_details_required[From]': required_From, 'affiliation_details_required[To]':required_To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /affiliation/list_details/ is triggered to get details of a affiliation list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{affiliation_id}" "{category}" "{entity_id}" "{From}" and "{To}"')) +def unit_get_response_assert(unit_get_request, affiliation_id, category, entity_id, From, To ): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['resource_category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['resource_category'] == 'physician' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_alert_schedule_list_new.py b/test/step_deps/test_get_alert_schedule_list_new.py new file mode 100644 index 0000000..0c74853 --- /dev/null +++ b/test/step_deps/test_get_alert_schedule_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/alert_schedule/list_details/' + +# Scenarios + +scenarios('../features/getalertschedulelistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event_id "{event_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an alert_schedule_id "{alert_schedule_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role, alert_schedule_id): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'alert_schedule_id': alert_schedule_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an alert schedule list with details filter for "{filter_alert_schedule_id}" and requesting for alert schedule details for "{required_target_category}" "{required_entity_id}" "{required_alert_schedule_id}" and "{required_message_id}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role,filter_alert_schedule_id, required_target_category, required_entity_id, required_alert_schedule_id, required_message_id): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'alert_schedule_id': filter_alert_schedule_id, 'alert_schedule_details_required[target_category]': required_target_category,'alert_schedule_details_required[entity_id]': required_entity_id,'alert_schedule_details_required[alert_schedule_id]': required_alert_schedule_id,'alert_schedule_details_required[message_id]': required_message_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an alert schedule list with details filter for "{filter_alert_schedule_id}" and requesting for alert schedule details for "{required_target_category}" "{required_entity_id}" "{required_alert_schedule_id}" and "{required_message_id}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role,filter_alert_schedule_id, required_target_category, required_entity_id, required_alert_schedule_id, required_message_id): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'alert_schedule_filter[alert_schedule_id]': filter_alert_schedule_id, 'alert_schedule_details_required[target_category]': required_target_category,'alert_schedule_details_required[entity_id]': required_entity_id,'alert_schedule_details_required[alert_schedule_id]': required_alert_schedule_id,'alert_schedule_details_required[message_id]': required_message_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /alert_schedule/list_details/ is triggered to get details of an alert schedule list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{entity_id}" "{target_category}" "{alert_schedule_id_id}" and "{message_id}"')) +def unit_get_response_assert(unit_get_request, entity_id, target_category, alert_schedule_id,message_id): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['target_category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['target_category'] == 'subscriber' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_appointment_list_new.py b/test/step_deps/test_get_appointment_list_new.py new file mode 100644 index 0000000..5cb0793 --- /dev/null +++ b/test/step_deps/test_get_appointment_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/appointment/list_details/' + +# Scenarios + +scenarios('../features/getappointmentlistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an appointment_id "{appointment_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an appointment_id "{appointment_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role,appointment_id ): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'appointment_id': appointment_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an appointment_id "{appointment_id}" with details filter for "{filter_appointment_id}" and requesting for appointment details for "{required_event_type}" "{required_event_id}" "{required_appointment_id}" "{required_participant_type}" "{required_participant_id}" "{required_From}" and "{required_To}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, appointment_id, filter_appointment_id, required_event_type, required_event_id, required_appointment_id, required_participant_type,required_participant_id, required_From, required_To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'appointment_id': appointment_id, 'appointment_filter[appointment_id]': filter_appointment_id, 'appointment_details_required[event_type]': required_event_type,'appointment_details_required[event_id]': required_event_id,'appointment_details_required[appointment_id]': required_appointment_id,'appointment_details_required[participant_id]': required_participant_id,'appointment_details_required[participant_type]': required_participant_type,'appointment_details_required[From]': required_From, 'appointment_details_required[To]':required_To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an appointment_id "{appointment_id}" with details filter for "{filter_appointment_id}" and requesting for appointment details for "{required_event_type}" "{required_event_id}" "{required_appointment_id}" "{required_participant_type}" "{required_participant_id}" "{required_From}" and "{required_To}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, appointment_id, filter_appointment_id, required_event_type, required_event_id, required_appointment_id, required_participant_type,required_participant_id, required_From, required_To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'appointment_id': appointment_id, 'appointment_filter[appointment_id]': filter_appointment_id, 'appointment_details_required[event_type]': required_event_type,'appointment_details_required[event_id]': required_event_id,'appointment_details_required[appointment_id]': required_appointment_id,'appointment_details_required[participant_id]': required_participant_id,'appointment_details_required[participant_type]': required_participant_type,'appointment_details_required[From]': required_From, 'appointment_details_required[To]':required_To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /appointment/list_details/ is triggered to get details of a appointment list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{appointment_id}" "{event_type}" "{event_id}" "{participant_type}" "{participant_id}" "{appointment_id}" "{From}" and "{To}"')) +def unit_get_response_assert(unit_get_request, appointment_id, event_id, event_type, participant_id,participant_type, From, To ): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['participant_type']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['participant_type'] == 'subscriber' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_entity_list_new.py b/test/step_deps/test_get_entity_list_new.py new file mode 100644 index 0000000..f4107a7 --- /dev/null +++ b/test/step_deps/test_get_entity_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/entity/list_details/' + +# Scenarios + +scenarios('../features/getentitylistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an entity_id "{entity_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an entity_id "{entity_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role, entity_id): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'entity_id': entity_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an entity_id "{entity_id}" with details filter for "{filter_entity_id}" and requesting for entity details for "{required_category}" "{required_entity_id}" "{required_name}" and "{required_email}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, entity_id, filter_entity_id, required_category, required_entity_id, required_name, required_email): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'entity_id': entity_id, 'entity_filter[entity_id]': filter_entity_id, 'entity_details_required[category]': required_category,'entity_details_required[entity_id]': required_entity_id,'entity_details_required[name]': required_name,'entity_details_required[emai]': required_email} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an entity_id "{entity_id}" with details filter for "{filter_entity_id}" and requesting for entity details for "{required_category}" "{required_entity_id}" "{required_name}" and "{required_email}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, entity_id, filter_entity_id, required_category, required_entity_id, required_name, required_email): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'entity_id': entity_id, 'entity_filter[entity_id]': filter_entity_id, 'entity_details_required[category]': required_category,'entity_details_required[entity_id]': required_entity_id,'entity_details_required[name]': required_name,'entity_details_required[emai]': required_email} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /entity/list_details/ is triggered to get details of an entity list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{name}" "{category}" "{entity_id}" "{phone}" "{email}" and "{website}"')) +def unit_get_response_assert(unit_get_request, name, category, entity_id,phone, email, website): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['category'] == 'hospital' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_event_list_new.py b/test/step_deps/test_get_event_list_new.py new file mode 100644 index 0000000..6ec6e48 --- /dev/null +++ b/test/step_deps/test_get_event_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/event/list_details/' + +# Scenarios + +scenarios('../features/geteventlistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event_id "{event_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event_id "{event_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role, event_id): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'event_id': event_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event_id "{event_id}" with details filter for "{filter_event_id}" and requesting for event details for "{required_category}" "{required_host_entity_id}" "{required_name}" and "{required_venue}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, event_id, filter_event_id, required_category, required_host_entity_id, required_name, required_venue): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'event_id': event_id, 'event_filter[event_id]': filter_event_id, 'event_details_required[category]': required_category,'event_details_required[host_entity_id]': required_host_entity_id,'event_details_required[name]': required_name,'event_details_required[venue]': required_venue} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an event_id "{event_id}" with details filter for "{filter_event_id}" and requesting for event details for "{required_category}" "{required_host_entity_id}" "{required_name}" and "{required_venue}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, event_id, filter_event_id, required_category, required_host_entity_id, required_name, required_venue): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'event_id': event_id, 'event_filter[event_id]': filter_event_id, 'event_details_required[category]': required_category,'event_details_required[host_entity_id]': required_host_entity_id,'event_details_required[name]': required_name,'event_details_required[venue]': required_venue} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /event/list_details/ is triggered to get details of an event list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{name}" "{category}" "{event_id}" "{host_entity_id}" and "{venue}"')) +def unit_get_response_assert(unit_get_request, name, category, event_id,host_entity_id, venue): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['category'] == 'doctor_consultation' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_log_list_new.py b/test/step_deps/test_get_log_list_new.py new file mode 100644 index 0000000..40247e8 --- /dev/null +++ b/test/step_deps/test_get_log_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/log/list_details/' + +# Scenarios + +scenarios('../features/getloglistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an log_id "{log_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an log_id "{log_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role,log_id ): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'log_id': log_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a log_id "{log_id}" with details filter for "{filter_log_id}" and requesting for log details for "{required_category}" "{required_log_id}" "{required_entity_id}" "{required_From}" and "{required_To}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, log_id, filter_log_id, required_category, required_log_id, required_entity_id, required_From, required_To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'log_id': log_id, 'log_filter[log_id]': filter_log_id, 'log_details_required[category]': required_category,'log_details_required[log_id]': required_log_id,'log_details_required[entity_id]': required_entity_id,'log_details_required[From]': required_From, 'log_details_required[To]':required_To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a log_id "{log_id}" with details filter for "{filter_log_id}" and requesting for log details for "{required_category}" "{required_log_id}" "{required_entity_id}" "{required_From}" and "{required_To}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, log_id, filter_log_id, required_category, required_log_id, required_entity_id, required_From, required_To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'log_id': log_id, 'log_filter[log_id]': filter_log_id, 'log_details_required[category]': required_category,'log_details_required[log_id]': required_log_id,'log_details_required[entity_id]': required_entity_id,'log_details_required[From]': required_From, 'log_details_required[To]':required_To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /log/list_details/ is triggered to get details of a log list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{log_id}" "{category}" "{entity_id}" "{From}" and "{To}"')) +def unit_get_response_assert(unit_get_request, log_id, category, entity_id, From, To ): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['log_category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['log_category'] == 'attendance' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_message_list_new.py b/test/step_deps/test_get_message_list_new.py new file mode 100644 index 0000000..be532e4 --- /dev/null +++ b/test/step_deps/test_get_message_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/message/list_details/' + +# Scenarios + +scenarios('../features/getmessagelistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an message_id "{message_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an message_id "{message_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role,message_id ): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'message_id': message_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a message_id "{message_id}" with details filter for "{filter_message_id}" and requesting for message details for "{required_category}" "{required_message_id}" "{required_entity_id}" and "{required_message_body}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, message_id, filter_message_id, required_category, required_message_id, required_entity_id, required_message_body): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'message_id': message_id, 'message_filter[message_id]': filter_message_id, 'message_details_required[category]': required_category,'message_details_required[message_id]': required_message_id,'message_details_required[entity_id]': required_entity_id,'message_details_required[message_body]': required_message_body} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a message_id "{message_id}" with details filter for "{filter_message_id}" and requesting for message details for "{required_category}" "{required_message_id}" "{required_entity_id}" and "{required_message_body}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, message_id, filter_message_id, required_category, required_message_id, required_entity_id, required_message_body): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'message_id': message_id, 'message_filter[message_id]': filter_message_id, 'message_details_required[category]': required_category,'message_details_required[message_id]': required_message_id,'message_details_required[entity_id]': required_entity_id,'message_details_required[message_body]': required_message_body} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /message/list_details/ is triggered to get details of a messages list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{message_id}" "{category}" "{entity_id}" and "{message_body}"')) +def unit_get_response_assert(unit_get_request, message_id, category, entity_id, message_body ): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['category'] == 'reminder' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_resource_availabality_details_new.py b/test/step_deps/test_get_resource_availabality_details_new.py new file mode 100644 index 0000000..9589a28 --- /dev/null +++ b/test/step_deps/test_get_resource_availabality_details_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/resource/availabality/' + +# Scenarios + +scenarios('../features/getresourceavailabalitydetailsnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role,resource_id ): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'free_resource_filter[resource_id]': resource_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" with entity Id "{Entity_id}" for category "{category}" for a date period from "{From}" to "{To}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, resource_id, Entity_id, category, From, To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'free_resource_filter[resource_id]': resource_id, 'free_resource_filter[Entity_id]': Entity_id, 'free_resource_filter[category]': category, 'free_resource_filter[From]': From, 'free_resource_filter[To]': To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" with entity Id "{Entity_id}" for category "{category}" for a date period from "{From}" to "{To}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, resource_id, Entity_id, category, From, To): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'free_resource_filter[resource_id]': resource_id, 'free_resource_filter[Entity_id]': Entity_id, 'free_resource_filter[category]': category, 'free_resource_filter[From]': From, 'free_resource_filter[To]': To} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /resource/availabality/ is triggered to get details of a resource availabality list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{resource_id}" "{resource_name}" and "{free_slots}"')) +def unit_get_response_assert(unit_get_request, resource_id, resource_name, free_slots): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['free_slots']['category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['category'] == 'doctor' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_resource_list_new.py b/test/step_deps/test_get_resource_list_new.py new file mode 100644 index 0000000..94184e3 --- /dev/null +++ b/test/step_deps/test_get_resource_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/resource/list_details/' + +# Scenarios + +scenarios('../features/getresourcelistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role,resource_id ): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'resource_id': resource_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" with details filter for "{filter_resource_id}" and requesting for resource details for "{required_category}" "{required_resource_id}" "{required_name}" and "{required_email}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, resource_id, filter_resource_id, required_category, required_resource_id, required_name, required_email): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'resource_id': resource_id, 'resource_filter[resource_id]': filter_resource_id, 'resource_details_required[category]': required_category,'resource_details_required[resource_id]': required_resource_id,'resource_details_required[name]': required_name,'resource_details_required[email]': required_email} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an resource_id "{resource_id}" with details filter for "{filter_resource_id}" and requesting for resource details for "{required_category}" "{required_resource_id}" "{required_name}" and "{required_email}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, resource_id, filter_resource_id, required_category, required_resource_id, required_name, required_email): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'resource_id': resource_id, 'resource_filter[resource_id]': filter_resource_id, 'resource_details_required[category]': required_category,'resource_details_required[resource_id]': required_resource_id,'resource_details_required[name]': required_name,'resource_details_required[email]': required_email} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /resource/list_details/ is triggered to get details of a resources list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{name}" "{category}" "{resource_id}" "{phone}" and "{email}"')) +def unit_get_response_assert(unit_get_request, name, category, resource_id,phone, email, ): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['category'] == 'doctor' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_get_subscriber_list_new.py b/test/step_deps/test_get_subscriber_list_new.py new file mode 100644 index 0000000..487acdf --- /dev/null +++ b/test/step_deps/test_get_subscriber_list_new.py @@ -0,0 +1,88 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/subscriber/list_details/' + +# Scenarios + +scenarios('../features/getsubscriberlistnew.feature') + +# Fixtures + + + +@pytest.fixture + + +#@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for an subscriber_id "{subscriber_id}" for smoke testing'), target_fixture = 'smoke_get_request') +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a subscriber_id "{subscriber_id}" for smoke testing'),target_fixture = 'smoke_get_request') +def smoke_get_request(requestor_id, requestor_role,subscriber_id ): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'subscriber_id': subscriber_id} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + #assert find_free_subscribers_response_code.status_code == code + +@given(parsers.parse('the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a subscriber_id "{subscriber_id}" with details filter for "{filter_subscriber_id}" and requesting for subscriber details for "{required_category}" "{required_subscriber_id}" "{required_name}" "{required_phone}" and "{required_email}"'), target_fixture = 'unit_get_request') +def unit_get_request(requestor_id, requestor_role, subscriber_id, filter_subscriber_id, required_subscriber_id,required_category, required_name, required_phone,required_email): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'subscriber_id': subscriber_id, 'subscriber_filter[subscriber_id]': filter_subscriber_id, 'subscriber_details_required[category]': required_category,'subscriber_details_required[subscriber_id]': required_subscriber_id,'subscriber_details_required[name]': required_name,'subscriber_details_required[phone]': required_phone,'subscriber_details_required[email]': required_email} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@given(parsers.parse('the invalid inputs for the requestor Id is "{requestor_id}" with role as "{requestor_role}" for a subscriber_id "{subscriber_id}" with details filter for "{filter_subscriber_id}" and requesting for subscriber details for "{required_category}" "{required_subscriber_id}" "{required_name}" "{required_phone}" and "{required_email}"'), target_fixture = 'neg_get_request') +def neg_get_request(requestor_id, requestor_role, subscriber_id, filter_subscriber_id, required_subscriber_id,required_category, required_name, required_phone,required_email): + params = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'subscriber_id': subscriber_id, 'subscriber_filter[subscriber_id]': filter_subscriber_id, 'subscriber_details_required[category]': required_category,'subscriber_details_required[subscriber_id]': required_subscriber_id,'subscriber_details_required[name]': required_name,'subscriber_details_required[phone]': required_phone,'subscriber_details_required[email]': required_email} + response = requests.get(API_HOME, params = params) + print(response.url) + status_code = response.json() + print(status_code) + return response + + +@when(parsers.parse('a GET request for an endpoint /subscriber/list_details/ is triggered to get details of a subscribers list'), target_fixture='get_request') +def get_request(): + pass + + + + +@then(parsers.parse('the result should return following details of entity with its name "{name}" "{category}" "{resource_id}" "{phone}" and "{email}"')) +def unit_get_response_assert(unit_get_request, name, category, subscriber_id,phone, email, ): + # A more comprehensive test would check 'RelatedTopics' for matching phrases + assert_respone = [] + assert_response = unit_get_request.json() + print(assert_response) + print(type(assert_response)) + print(assert_response[0][0]['details']['category']) + #print(assert_response[1]) + #for i in range(len(assert_response)): + # print((i, assert_response[i])) + assert assert_response[0][0]['details']['category'] == 'patient' + + +@then(parsers.parse('response code of GET request is "{code:d}" for smoke testing')) +def smoke_get_response_code(smoke_get_request, code): + assert smoke_get_request.status_code == code + +@then(parsers.parse('response code of GET request is "{code:d}"')) +def unit_get_response_code(unit_get_request, code): + assert unit_get_request.status_code == code + + + +@then(parsers.parse('response code of negative testing GET request for invalid data is "{status_code}"')) +def neg_get_response_code(neg_get_request, status_code): + assert neg_get_request.status_code != eval(status_code) + + diff --git a/test/step_deps/test_update_affiliation_new.py b/test/step_deps/test_update_affiliation_new.py new file mode 100644 index 0000000..79bb4d6 --- /dev/null +++ b/test/step_deps/test_update_affiliation_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/affiliation/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updateaffiliationnew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update an affiliation with its ID "{affiliation_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,affiliation_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'affiliation_id':affiliation_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for an affiliation with Id "{affiliation_id}" to update an affiliation details like "{resource_id}" "{entity_id}" for resource of category "{resource_category}" for a schedule on "{day_of_week}" from "{start_time}" to "{end_time}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role,affiliation_id,resource_id, entity_id, resource_category,day_of_week, start_time, end_time): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'affiliation_id': affiliation_id,'details[entity_id]': entity_id, 'details[resource_id]': resource_id, 'details[resource_category]': resource_category, 'details[work_days_hours][day_of_week]': day_of_week, 'details[work_days_hours][start_time]': start_time, 'details[work_days_hours][end_time]':end_time} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for an affiliation with Id "{affiliation_id}" to update an affiliation details like "{resource_id}" "{entity_id}" for resource of category "{resource_category}" for a schedule on "{day_of_week}" from "{start_time}" to "{end_time}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role,affiliation_id,resource_id, entity_id, resource_category,day_of_week, start_time, end_time): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'affiliation_id': affiliation_id,'details[entity_id]': entity_id, 'details[resource_id]': resource_id, 'details[resource_category]': resource_category, 'details[work_days_hours][day_of_week]': day_of_week, 'details[work_days_hours][start_time]': start_time, 'details[work_days_hours][end_time]':end_time} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /affiliation/modifications/ is triggered to update existing affiliation details for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_alert_schedule_new.py b/test/step_deps/test_update_alert_schedule_new.py new file mode 100644 index 0000000..db18c00 --- /dev/null +++ b/test/step_deps/test_update_alert_schedule_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/alert_schedule/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updatealertschedulenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update an alert schedule with its ID "{alert_schedule_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,alert_schedule_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'alert_schedule_id':alert_schedule_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for an alert schedule with Id "{alert_schedule_id}" to update an alert with its details like "{event_id}" for "{target_category}" with "{message_id}" within a "{alert_datetime}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role,alert_schedule_id, event_id,target_category,message_id,alert_datetime): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'alert_schedule_id': alert_schedule_id,'alert_schedule_details[event_id]': event_id, 'alert_schedule_details[target_category]': target_category, 'alert_schedule_details[message_id]': message_id, 'alert_schedule_details[alert_datetime]': alert_datetime} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for an alert schedule with Id "{alert_schedule_id}" to update an alert with its details like "{event_id}" for "{target_category}" with "{message_id}" within a "{alert_datetime}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role,alert_schedule_id, event_id,target_category,message_id,alert_datetime): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'alert_schedule_id': alert_schedule_id,'alert_schedule_details[event_id]': event_id, 'alert_schedule_details[target_category]': target_category, 'alert_schedule_details[message_id]': message_id, 'alert_schedule_details[alert_datetime]': alert_datetime} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /alert_schedule/modifications/ is triggered to update existing alert schedule for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_appointment_new.py b/test/step_deps/test_update_appointment_new.py new file mode 100644 index 0000000..4421c33 --- /dev/null +++ b/test/step_deps/test_update_appointment_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/appointment/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updateappointmentnew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update an appointment details with its ID "{appointment_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,appointment_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'appointment_id':appointment_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for an appointment with Id "{appointment_id}" to update an appointment with its details like "{entity_id}" and "{entity_type}" for participant of "{participant_type}" "{participant_id}" and "{participant_entity_id}" for a time period "{From}" till "{To}" with deadline "{deadline}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role, appointment_id,entity_id, entity_type, participant_type, participant_id, participant_entity_id, From, To, deadline): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'appointment_id': appointment_id, 'details[entity_id]': entity_id, 'details[entity_type]': entity_type, 'details[participant_type]': participant_type, 'details[participant_id]': participant_id, 'details[participant_entity_id]': participant_entity_id, 'details[From]':From,'details[To]':To, 'details[deadline]': deadline} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for an appointment with Id "{appointment_id}" to update an appointment with its details like "{entity_id}" and "{entity_type}" for participant of "{participant_type}" "{participant_id}" and "{participant_entity_id}" for a time period "{From}" till "{To}" with deadline "{deadline}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role, appointment_id,entity_id, entity_type, participant_type, participant_id, participant_entity_id, From, To, deadline): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'appointment_id': appointment_id, 'details[entity_id]': entity_id, 'details[entity_type]': entity_type, 'details[participant_type]': participant_type, 'details[participant_id]': participant_id, 'details[participant_entity_id]': participant_entity_id, 'details[From]':From,'details[To]':To, 'details[deadline]': deadline} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /appointment/modifications/ is triggered to update existing appointment details for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_entity_new.py b/test/step_deps/test_update_entity_new.py new file mode 100644 index 0000000..826b588 --- /dev/null +++ b/test/step_deps/test_update_entity_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/entity/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updateentitynew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update an entity with its ID "{entity_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,entity_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'entity_id':entity_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for an entity with Id "{entity_id}" to update an entity with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{website}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role, entity_id, name, category, phone, email,website): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'entity_id': entity_id, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[website]': website} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for an entity with Id "{entity_id}" to update an entity with name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{website}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role, entity_id, name, category, phone, email,website): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'entity_id': entity_id, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[website]': website} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /entity/modifications/ is triggered to update existing entity for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_event_new.py b/test/step_deps/test_update_event_new.py new file mode 100644 index 0000000..a6af161 --- /dev/null +++ b/test/step_deps/test_update_event_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/event/modifications' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updateevent.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update an event with its ID "{event_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,event_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'event_id':event_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for an event with Id "{event_id}" to update an event with name "{name}" "{category}" "{host_entity_id}" for a period "{From}" till "{To}" for a venue in "{street}" "{building}" "{area}" with "{lat}" "{long}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role, event_id, name, category, host_entity_id, From, To, street, building, area, lat, long): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'event_id': event_id, 'details[name]': name, 'details[category]': category, 'details[host_entity_id]': host_entity_id, 'details[From]': From, 'details[To]': To, 'details[venue][street]': street, 'details[venue][building]': building, 'details[venue][area]': area,'details[venue][lat]': lat, 'details[venue][long]': long} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for an event with Id "{event_id}" to update an event with name "{name}" "{category}" "{host_entity_id}" for a period "{From}" till "{To}" for a venue in "{street}" "{building}" "{area}" with "{lat}" "{long}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role, event_id, name, category, host_entity_id, From, To, street, building, area, lat, long): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'event_id': event_id, 'details[name]': name, 'details[category]': category, 'details[host_entity_id]': host_entity_id, 'details[From]': From, 'details[To]': To, 'details[venue][street]': street, 'details[venue][building]': building, 'details[venue][area]': area,'details[venue][lat]': lat, 'details[venue][long]': long} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /event/modifications/ is triggered to update existing event for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_log_new.py b/test/step_deps/test_update_log_new.py new file mode 100644 index 0000000..8990bc2 --- /dev/null +++ b/test/step_deps/test_update_log_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/log/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updatelognew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update a log with its ID "{log_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,log_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'log_id':log_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for a log with Id "{log_id}" to update a log details for role "{logger_role}" with its Id "{logger_id}" "{entity_id}" for category "{log_category}" from time period of "{datetime}" with data as "{log_data}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role, log_id,logger_role, logger_id, entity_id, log_category, datetime, log_data): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'log_id': log_id, 'details[logger_role]': logger_role, 'details[logger_id]': logger_id, 'details[entity_id]': entity_id, 'details[log_category]':log_category,'details[datetime]':datetime,'details[log_data]':log_data} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for a log with Id "{log_id}" to update a log details for role "{logger_role}" with its Id "{logger_id}" "{entity_id}" for category "{log_category}" from time period of "{datetime}" with data as "{log_data}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role, log_id,logger_role, logger_id, entity_id, log_category, datetime, log_data): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'log_id': log_id, 'details[logger_role]': logger_role, 'details[logger_id]': logger_id, 'details[entity_id]': entity_id, 'details[log_category]':log_category,'details[datetime]':datetime,'details[log_data]':log_data} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /log/modifications/ is triggered to update existing log details for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_message_new.py b/test/step_deps/test_update_message_new.py new file mode 100644 index 0000000..dc81089 --- /dev/null +++ b/test/step_deps/test_update_message_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/message/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updatemessagenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update a message with its ID "{message_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,message_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'message_id':message_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for a message with Id "{message_id}" to update a message details like "{entity_id}" "{category}" and "{message_body}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role, message_id, entity_id,category, message_body): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'message_id': message_id,'details[entity_id]': entity_id, 'details[category]': category, 'details[message_body]': message_body} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for a message with Id "{message_id}" to update a message details like "{entity_id}" "{category}" and "{message_body}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role, message_id, entity_id, category, message_body): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'message_id': message_id,'details[entity_id]': entity_id, 'details[category]': category, 'details[message_body]': message_body} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /message/modifications/ is triggered to update existing message details for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_resource_new.py b/test/step_deps/test_update_resource_new.py new file mode 100644 index 0000000..c391fbc --- /dev/null +++ b/test/step_deps/test_update_resource_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/resource/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updateresourcenew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update a resource with its ID "{resource_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,resource_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'resource_id':resource_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for a resource with Id "{resource_id}" to update a resource details like "{name}" for "{category}" with "{phone}" "{email}" "{alert_url}" "{alert_preference}" and "{status_poll_url}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role, resource_id, name, category, phone, email, alert_url,alert_preference,status_poll_url): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'requestor_id': requestor_id, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[alert_url]':alert_url, 'details[alert_preference]': alert_preference, 'details[status_poll_url]': status_poll_url} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for a resource with Id "{resource_id}" to update a resource details like "{name}" for "{category}" with "{phone}" "{email}" "{alert_url}" "{alert_preference}" and "{status_poll_url}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role, resource_id, name, category, phone, email, alert_url,alert_preference,status_poll_url): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role, 'requestor_id': requestor_id, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[alert_url]':alert_url, 'details[alert_preference]': alert_preference, 'details[status_poll_url]': status_poll_url} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /resource/modifications/ is triggered to update existing resource for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/step_deps/test_update_subscriber_new.py b/test/step_deps/test_update_subscriber_new.py new file mode 100644 index 0000000..0f70f17 --- /dev/null +++ b/test/step_deps/test_update_subscriber_new.py @@ -0,0 +1,70 @@ +import pytest +import json +import requests +import sys +from pytest_bdd import scenarios, given, when, then, parsers + + +#API_HOME = 'http://172.16.51.57:8000/home/' +API_HOME = 'http://myapi:3000/subscriber/modifications/' +#API_HOME = 'http://myapi:3000/subscribers/create_session/' + +# Scenarios + +scenarios('../features/updatesubscribernew.feature') + +# Fixtures + + + +@pytest.fixture + + + +@given(parsers.parse('the requestor id is "{healthngo1}" with role as "{healthworker}" to update a subscriber details with its ID "{subscriber_id:d}"'), target_fixture='smoke_put_request') +def smoke_put_request(healthngo1,healthworker,subscriber_id): + data = {'requestor_id': healthngo1, 'requestor_role': healthworker,'subscriber_id':subscriber_id} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + +@given(parsers.parse('the requestor id is "{requestor_id}" with role as "{requestor_role}" for a subscriber with Id "{subscriber_id}" to update a subscriber details name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{alert_url}" having "{alert_preference}" and "{status_poll_url}"'), target_fixture='unit_put_request') +def unit_put_request(requestor_id, requestor_role, subscriber_id, name, category, phone, email, alert_url, alert_preference, status_poll_url): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'subscriber_id': subscriber_id, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[alert_url]': alert_url, 'details[alert_prefernce]':alert_preference,'details[status_poll_url]':status_poll_url} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + +@given(parsers.parse('the invalid inputs for the requestor id is "{requestor_id}" with role as "{requestor_role}" for a subscriber with Id "{subscriber_id}" to update a subscriber details name "{name}" for "{category}" with following details like "{phone}" "{email}" with "{alert_url}" having "{alert_preference}" and "{status_poll_url}"'), target_fixture='neg_put_request') +def neg_put_request(requestor_id, requestor_role, subscriber_id, name, category, phone, email, alert_url, alert_preference, status_poll_url): + data = {'requestor_id': requestor_id, 'requestor_role': requestor_role,'subscriber_id': subscriber_id, 'details[name]': name, 'details[category]': category, 'details[phone]': phone, 'details[email]': email, 'details[alert_url]': alert_url, 'details[alert_prefernce]':alert_preference,'details[status_poll_url]':status_poll_url} + response = requests.put(API_HOME, data = data) + print(response.url) + status_code = response.text + print(status_code) + return response + + #return response + +@when(parsers.parse('an Update request for an endpoint /subscriber/modifications/ is triggered to update existing subscriber details for scheduler block'), target_fixture = 'post_request') +def put_request(): + pass + + +@then(parsers.parse('response code of Update request is "{code:d}" for smoke testing')) +def smoke_put_response_code(smoke_put_request, code): + assert smoke_put_request.status_code == code + +@then(parsers.parse('response code of Update request is "{code:d}"')) +def unit_put_response_code(unit_put_request, code): + assert unit_put_request.status_code == code + + +@then(parsers.parse('response code of negative testing an Update request for invalid data is "{status_code}"')) +def neg_put_response_code(neg_put_request, status_code): + assert neg_put_request.status_code != eval(status_code) diff --git a/test/test-results/result.xml b/test/test-results/result.xml new file mode 100644 index 0000000..3ec353c --- /dev/null +++ b/test/test-results/result.xml @@ -0,0 +1 @@ + \ No newline at end of file From eb5e08bf536dc1feb0b3cbc89bb63d1481ca61d2 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Fri, 5 May 2023 13:36:26 +0530 Subject: [PATCH 03/47] Delete plan.md --- test/plan.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 test/plan.md diff --git a/test/plan.md b/test/plan.md deleted file mode 100644 index b8746b2..0000000 --- a/test/plan.md +++ /dev/null @@ -1,14 +0,0 @@ -# Test plan for the _____________ building block. - -1. a -2. b -3. c - -## Notes - -At least three levels of testing... - -1. can the BB be deployed via docker-compose? -2. can the BB interact with the IM? -3. can an adaptor be deployed alongside it to test API compliance? -4. do the required APIs respond to the required inputs and provide the required responses? From 447a46ab8e60697045eee5a5cadce10f82921571 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Fri, 5 May 2023 13:37:29 +0530 Subject: [PATCH 04/47] Add files via upload --- examples/mock/docker-compose.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/mock/docker-compose.yml diff --git a/examples/mock/docker-compose.yml b/examples/mock/docker-compose.yml new file mode 100644 index 0000000..629d17e --- /dev/null +++ b/examples/mock/docker-compose.yml @@ -0,0 +1,27 @@ +version: "3" +services: + mockoon: + image: mockoon/cli:latest + command: -d /data # this is where the change takes place + container_name: myapi + ports: + - "3000:3000" + networks: + demo: + volumes: + - type: bind + source: ../../api/Scheduler_OpenAPI_17042023_V3.json + target: /data + pytest: + build: + context: ../../test/. + container_name: pytest + tty: true + stdin_open: true + networks: + demo: + + +networks: + demo: + From 57b1d73e2d72c6bbdc63d775fb9be440dcad11f9 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Fri, 5 May 2023 13:45:08 +0530 Subject: [PATCH 05/47] Delete Scheduler_OpenAPI_17042023_V3.json Updated Scheduler Open API Spec is Updated, so this file is deleted --- api/Scheduler_OpenAPI_17042023_V3.json | 3702 ------------------------ 1 file changed, 3702 deletions(-) delete mode 100644 api/Scheduler_OpenAPI_17042023_V3.json diff --git a/api/Scheduler_OpenAPI_17042023_V3.json b/api/Scheduler_OpenAPI_17042023_V3.json deleted file mode 100644 index 974da50..0000000 --- a/api/Scheduler_OpenAPI_17042023_V3.json +++ /dev/null @@ -1,3702 +0,0 @@ -{ - "openapi" : "3.0.1", - "info" : { - "title" : "Govstack Scheduler API", - "description" : "Interfaces to services rendered by Scheduler building block", - "termsOfService" : "TBD", - "contact" : { - "email" : "psramkumar2@gmail.com" - }, - "license" : { - "name" : "Apache 2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version" : "1.0.0" - }, - "externalDocs" : { - "description" : "Find out more about scheduler", - "url" : "https://www.govstack.global/" - }, - "tags" : [ { - "name" : "event", - "description" : "event management API" - }, { - "name" : "entity", - "description" : "entity management API" - }, { - "name" : "alert_schedule", - "description" : "alert_schedule management API" - }, { - "name" : "resource", - "description" : "resource management API" - }, { - "name" : "subscribers", - "description" : "subscriber management API" - }, { - "name" : "message", - "description" : "message management API" - }, { - "name" : "log", - "description" : "log management API" - }, { - "name" : "affiliation", - "description" : "affiliation management API" - }, { - "name" : "appointment", - "description" : "appointment management API" - } ], - "paths" : { - "/event/new" : { - "post" : { - "tags" : [ "event" ], - "summary" : "create a new event, in event_list with given event_details, returns new event id or failure error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/event_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created event", - "example" : "event_name:doctorconsultation,event_id:12345" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/event/modifications" : { - "put" : { - "tags" : [ "event" ], - "summary" : "changes values of specific details (as given by event_details) of given event (selected by event_filter)in event_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "event_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "12345" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/event_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, event updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/event" : { - "delete" : { - "tags" : [ "event" ], - "summary" : "delete a predefined event in event_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "event_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "12345" - } - } ], - "responses" : { - "200" : { - "description" : "success, event cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/event/list_details" : { - "get" : { - "tags" : [ "event" ], - "summary" : "get list of events filetered by criteria in event_filter and return info specified by event_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/event_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,event_list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/event_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/appointment/new" : { - "post" : { - "tags" : [ "appointment" ], - "summary" : "create a new appointment, in appointment_list with given appointment_details, returns new appointment id or failure error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/appointment_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created appointment", - "example" : "appointment_name:doctorconsultation,appointment_id:1" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/appointment/modifications" : { - "put" : { - "tags" : [ "appointment" ], - "summary" : "changes values of specific details (as given by appointment_details) of given appointment (selected by appointment_filter)in appointment_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "appointment_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/appointment_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, appointment updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/appointment" : { - "delete" : { - "tags" : [ "appointment" ], - "summary" : "delete a predefined appointment in appointment_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "appointment_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - } ], - "responses" : { - "200" : { - "description" : "success, appointment cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/appointment/list_details" : { - "get" : { - "tags" : [ "appointment" ], - "summary" : "get list of appointments filetered by criteria in appointment_filter and return info specified by appointment_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/appointment_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,appointment_list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/appointment_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/entity/new" : { - "post" : { - "tags" : [ "entity" ], - "summary" : "create a new entity, in entity_list with given entity_details, returns new entity id or entity error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/entity_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created entity", - "example" : "entity_name:xyz hospital,entity_id:67890" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/entity/modifications" : { - "put" : { - "tags" : [ "entity" ], - "summary" : "changes values of specific details (as given by entity_details) of given entity (selected by entity_filter)in entity_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "entity_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "67890" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/entity_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, entity updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/entity" : { - "delete" : { - "tags" : [ "entity" ], - "summary" : "delete a predefined entity in entity_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "entity_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "67890" - } - } ], - "responses" : { - "200" : { - "description" : "success, entity cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/entity/list_details" : { - "get" : { - "tags" : [ "entity" ], - "summary" : "get list of entities filetered by criteria in entity_filter and return info specified by entity_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/entity_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,entity list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/entity_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/resource/new" : { - "post" : { - "tags" : [ "resource" ], - "summary" : "create a new resource, in resource_list with given resource_details, returns new resource id or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/resource_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created resource", - "example" : "resource_name:xyz hospital,resource_id:54321" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/resource/modifications" : { - "put" : { - "tags" : [ "resource" ], - "summary" : "changes values of specific details (as given by resource_details) of given resource (selected by resource_filter)in resource_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "resource_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "54321" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/resource_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, resource updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/resource" : { - "delete" : { - "tags" : [ "resource" ], - "summary" : "delete a predefined resource in resource_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "resource_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "54321" - } - } ], - "responses" : { - "200" : { - "description" : "success, resource cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/resource/list_details" : { - "get" : { - "tags" : [ "resource" ], - "summary" : "get list of entities filetered by criteria in resource_filter and return info specified by resource_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/resource_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,resource list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/resource_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/resource/availability" : { - "get" : { - "tags" : [ "resource" ], - "summary" : "get details of resources matching criteria given by free_resource_filter, that are free(unallocated) in a given date range and entity and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/resource_get_availability_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,resource list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/free_resource_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/subscriber/new" : { - "post" : { - "tags" : [ "subscriber" ], - "summary" : "create a new subscriber, in subscriber_list with given subscriber_details, returns new subscriber id or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/subscriber_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created subscriber", - "example" : "subscriber_name:xyz hospital,subscriber_id:12345" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/subscriber/modifications" : { - "put" : { - "tags" : [ "subscriber" ], - "summary" : "changes values of specific details (as given by subscriber_details) of given subscriber (selected by subscriber_filter)in subscriber_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "subscriber_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "12345" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/subscriber_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, subscriber updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/subscriber" : { - "delete" : { - "tags" : [ "subscriber" ], - "summary" : "delete a predefined subscriber in subscriber_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "subscriber_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "12345" - } - } ], - "responses" : { - "200" : { - "description" : "success, subscriber cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/subscriber/list_details" : { - "get" : { - "tags" : [ "subscriber" ], - "summary" : "get list of entities filetered by criteria in subscriber_filter and return info specified by subscriber_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/subscriber_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,message list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/subscriber_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/message/new" : { - "post" : { - "tags" : [ "message" ], - "summary" : "create a new message, in message_list with given message_details, returns new message id or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/message_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created message", - "example" : "message_name:xyz hospital,message_id:1" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/message/modifications" : { - "put" : { - "tags" : [ "message" ], - "summary" : "changes values of specific details (as given by message_details) of given message (selected by message_filter)in message_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "message_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/message_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, message updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/message" : { - "delete" : { - "tags" : [ "message" ], - "summary" : "delete a predefined message in message_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "message_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - } ], - "responses" : { - "200" : { - "description" : "success, message cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/message/list_details" : { - "get" : { - "tags" : [ "message" ], - "summary" : "get list of entities filetered by criteria in message_filter and return info specified by message_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/message_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,message list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/message_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/affiliation/new" : { - "post" : { - "tags" : [ "affiliation" ], - "summary" : "create a new affiliation, in affiliation_list with given affiliation_details, returns new affiliation id or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/affiliation_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created affiliation", - "example" : "affiliation_name:xyz hospital,affiliation_id:1" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/affiliation/modifications" : { - "put" : { - "tags" : [ "affiliation" ], - "summary" : "changes values of specific details (as given by affiliation_details) of given affiliation (selected by affiliation_filter)in affiliation_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "affiliation_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/affiliation_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, affiliation updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/affiliation" : { - "delete" : { - "tags" : [ "affiliation" ], - "summary" : "delete a predefined affiliation in affiliation_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "affiliation_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - } ], - "responses" : { - "200" : { - "description" : "success, affiliation cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/affiliation/list_details" : { - "get" : { - "tags" : [ "affiliation" ], - "summary" : "get list of entities filetered by criteria in affiliation_filter and return info specified by affiliation_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/affiliation_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,affiliation list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/affiliation_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/alert_schedule/new" : { - "post" : { - "tags" : [ "alert_schedule" ], - "summary" : "create a new alert_schedule, in alert_schedule_list with given alert_schedule_details, returns new alert_schedule id or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/alert_schedule_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created alert_schedule", - "example" : "alert_schedule_name:xyz hospital,alert_schedule_id:1" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/alert_schedule/modifications" : { - "put" : { - "tags" : [ "alert_schedule" ], - "summary" : "changes values of specific details (as given by alert_schedule_details) of given alert_schedule (selected by alert_schedule_filter)in alert_schedule_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string" - }, - "example" : "Organizer" - }, { - "name" : "alert_schedule_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/alert_schedule_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, alert_schedule updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/alert_schedule" : { - "delete" : { - "tags" : [ "alert_schedule" ], - "summary" : "delete a predefined alert_schedule in alert_schedule_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "alert_schedule_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - } ], - "responses" : { - "200" : { - "description" : "success, alert_schedule cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/alert_schedule/list_details" : { - "get" : { - "tags" : [ "alert_schedule" ], - "summary" : "get list of entities filetered by criteria in alert_schedule_filter and return info specified by alert_schedule_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/alert_schedule_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,alert_schedule list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/alert_schedule_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/log/new" : { - "post" : { - "tags" : [ "log" ], - "summary" : "create a new log, in log_list with given log_details, returns new log id or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/log_new_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "description" : "ID of created log", - "example" : "log_name:xyz hospital,log_id:1" - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/log/modifications" : { - "put" : { - "tags" : [ "log" ], - "summary" : "changes values of specific details (as given by log_details) of given log (selected by log_filter)in log_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "log_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/log_modify_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success, log updated" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/log" : { - "delete" : { - "tags" : [ "log" ], - "summary" : "delete a predefined log in log_list and returns success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "log_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "1" - } - } ], - "responses" : { - "200" : { - "description" : "success, log cancelled" - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - }, - "/log/list_details" : { - "get" : { - "tags" : [ "log" ], - "summary" : "get list of entities filetered by criteria in log_filter and return info specified by log_details_required with success or error code", - "parameters" : [ { - "name" : "requestor_id", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "healthngoadmin1" - } - }, { - "name" : "requestor_role", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string", - "example" : "Organizer" - } - }, { - "name" : "qry", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "$ref" : "#/components/schemas/log_get_details_qry" - } - } ], - "responses" : { - "200" : { - "description" : "success,log list", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/log_list" - } - } - } - } - }, - "400" : { - "description" : "Invalid request" - }, - "403" : { - "description" : "No permission" - }, - "404" : { - "description" : "one or more specified inputs not found" - }, - "default" : { - "description" : "Unexpected error" - } - } - } - } - }, - "components" : { - "schemas" : { - "entity_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "details" : { - "$ref" : "#/components/schemas/entity_details" - } - } - } - }, - "entity_details" : { - "type" : "object", - "properties" : { - "category" : { - "type" : "string", - "example" : "hospital" - }, - "name" : { - "type" : "string", - "example" : "abc" - }, - "phone" : { - "type" : "string", - "example" : "+911234567890" - }, - "email" : { - "type" : "string", - "example" : "info@xyz.com" - }, - "website" : { - "type" : "string", - "format" : "url", - "example" : "www.abc.com" - } - } - }, - "entity_filter" : { - "type" : "object", - "properties" : { - "entity_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[67890,12121]" - }, - "category" : { - "type" : "string", - "example" : "hospital" - }, - "name" : { - "type" : "string", - "example" : "abc" - }, - "phone" : { - "type" : "string", - "example" : "+911234567890" - }, - "email" : { - "type" : "string", - "example" : "info@xyz.com" - }, - "website" : { - "type" : "string", - "format" : "url", - "example" : "www.abc.com" - } - } - }, - "entity_details_required" : { - "type" : "object", - "properties" : { - "entity_id" : { - "type" : "boolean", - "example" : false - }, - "category" : { - "type" : "boolean", - "example" : true - }, - "name" : { - "type" : "boolean", - "example" : true - }, - "phone" : { - "type" : "boolean", - "example" : true - }, - "email" : { - "type" : "boolean", - "example" : true - }, - "website" : { - "type" : "boolean", - "example" : true - } - } - }, - "appointment_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "appointment_id" : { - "type" : "string", - "example" : "1" - }, - "details" : { - "$ref" : "#/components/schemas/appointment_details" - } - } - } - }, - "appointment_details" : { - "type" : "object", - "properties" : { - "event_id" : { - "type" : "string", - "example" : "1" - }, - "event_type" : { - "type" : "string", - "example" : "doctor_consultation" - }, - "participant_type" : { - "type" : "string", - "example" : "subscriber" - }, - "participant_id" : { - "type" : "string", - "example" : "12345" - }, - "participant_entity_id" : { - "type" : "string", - "example" : "67890" - }, - "status" : { - "type" : "string", - "example" : "attended" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:30:00" - }, - "deadline" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:10:00" - } - } - }, - "appointment_filter" : { - "type" : "object", - "properties" : { - "appointment_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[1,2]" - }, - "event_type" : { - "type" : "string", - "example" : "doctor_consultation" - }, - "event_id" : { - "type" : "string", - "example" : "1" - }, - "participant_type" : { - "type" : "string", - "example" : "subscriber" - }, - "participant_id" : { - "type" : "string", - "example" : "12345" - }, - "participant_entity_id" : { - "type" : "string", - "example" : "67890" - }, - "status" : { - "type" : "string", - "example" : "confirmed" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T09:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T17:00:00" - } - } - }, - "appointment_details_required" : { - "type" : "object", - "properties" : { - "appointment_id" : { - "type" : "boolean", - "example" : true - }, - "event_id" : { - "type" : "boolean", - "example" : true - }, - "event_type" : { - "type" : "boolean", - "example" : true - }, - "participant_type" : { - "type" : "boolean", - "example" : true - }, - "participant_id" : { - "type" : "boolean", - "example" : true - }, - "status" : { - "type" : "boolean", - "example" : true - }, - "participant_entity_id" : { - "type" : "boolean", - "example" : true - }, - "from" : { - "type" : "boolean", - "example" : true - }, - "to" : { - "type" : "boolean", - "example" : true - }, - "deadline" : { - "type" : "boolean", - "example" : true - } - } - }, - "resource_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "resource_id" : { - "type" : "string", - "example" : "54321" - }, - "details" : { - "$ref" : "#/components/schemas/resource_details" - } - } - } - }, - "resource_details" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "psrk" - }, - "category" : { - "type" : "string", - "example" : "doctor" - }, - "phone" : { - "type" : "string", - "example" : "+911234567890" - }, - "email" : { - "type" : "string", - "example" : "doctor1@xyz.com" - }, - "alert_url" : { - "type" : "string", - "format" : "url", - "example" : "psrk@gmail.com" - }, - "alert_preference" : { - "type" : "string", - "example" : "phone" - }, - "status_poll_url" : { - "type" : "string", - "format" : "url", - "example" : "www.doctor1.com" - } - } - }, - "resource_filter" : { - "type" : "object", - "properties" : { - "resource_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[54321,31313]" - }, - "name" : { - "type" : "string", - "example" : "psrk" - }, - "category" : { - "type" : "string", - "example" : "doctor" - }, - "phone" : { - "type" : "string", - "example" : "+911234567890" - }, - "email" : { - "type" : "string", - "example" : "abc@gmail.com" - }, - "alert_url" : { - "type" : "string", - "format" : "url", - "example" : "www.doctor1.com" - }, - "alert_preference" : { - "type" : "string", - "example" : " phone" - }, - "status_poll_url" : { - "type" : "string", - "format" : "url", - "example" : "www.doctor1.com" - } - } - }, - "resource_details_required" : { - "type" : "object", - "properties" : { - "resource_id" : { - "type" : "boolean", - "example" : true - }, - "name" : { - "type" : "boolean", - "example" : true - }, - "category" : { - "type" : "boolean", - "example" : true - }, - "phone" : { - "type" : "boolean", - "example" : true - }, - "email" : { - "type" : "boolean", - "example" : true - }, - "alert_url" : { - "type" : "boolean", - "example" : true - }, - "alert_preference" : { - "type" : "boolean", - "example" : true - }, - "status_poll_url" : { - "type" : "boolean", - "example" : true - } - } - }, - "subscriber_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "subscriber_id" : { - "type" : "string", - "example" : "12345" - }, - "details" : { - "$ref" : "#/components/schemas/subscriber_details" - } - } - } - }, - "subscriber_details" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "abc" - }, - "category" : { - "type" : "string", - "example" : "patient" - }, - "phone" : { - "type" : "string", - "example" : "+911234567890" - }, - "email" : { - "type" : "string", - "example" : "abc@gmail.com" - }, - "alert_url" : { - "type" : "string", - "format" : "url", - "example" : "www.abc.com" - }, - "alert_preference" : { - "type" : "string", - "example" : "phone" - }, - "status_poll_url" : { - "type" : "string", - "format" : "url", - "example" : "www.abc.com" - } - } - }, - "subscriber_filter" : { - "type" : "object", - "properties" : { - "subscriber_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[12345, 41414]" - }, - "category" : { - "type" : "string", - "example" : "patient" - }, - "name" : { - "type" : "string", - "example" : "abc" - }, - "phone" : { - "type" : "string", - "example" : "+911234567890" - }, - "email" : { - "type" : "string", - "example" : "abc@gmail.com" - }, - "alert_url" : { - "type" : "string", - "format" : "url", - "example" : "www.abc.com" - }, - "alert_preference" : { - "type" : "string", - "example" : " phone" - }, - "status_poll_url" : { - "type" : "string", - "format" : "url", - "example" : "www.abc.com" - } - } - }, - "subscriber_details_required" : { - "type" : "object", - "properties" : { - "subscriber_id" : { - "type" : "boolean", - "example" : true - }, - "category" : { - "type" : "boolean", - "example" : true - }, - "name" : { - "type" : "boolean", - "example" : true - }, - "phone" : { - "type" : "boolean", - "example" : true - }, - "email" : { - "type" : "boolean", - "example" : true - }, - "alert_url" : { - "type" : "boolean", - "example" : true - }, - "alert_preference" : { - "type" : "boolean", - "example" : true - }, - "status_poll_url" : { - "type" : "boolean", - "example" : true - } - } - }, - "event_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "event_id" : { - "type" : "string", - "example" : "12345" - }, - "details" : { - "$ref" : "#/components/schemas/event_details" - } - } - } - }, - "event_details" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "abc medical camp" - }, - "description" : { - "type" : "string", - "example" : "medical camp for senior citizens" - }, - "category" : { - "type" : "string", - "example" : "doctor_consultation" - }, - "host_entity_id" : { - "type" : "string", - "example" : "67890" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:30:00" - }, - "deadline" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:10:00" - }, - "subscriber_limit" : { - "type" : "string", - "example" : "1" - }, - "terms" : { - "type" : "string", - "example" : "non refundable" - }, - "status" : { - "type" : "string", - "example" : "open" - }, - "venue" : { - "$ref" : "#/components/schemas/venue" - } - } - }, - "event_filter" : { - "type" : "object", - "properties" : { - "event_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[12345,51515]" - }, - "description" : { - "type" : "string", - "example" : "medical camp for senior citizens" - }, - "name" : { - "type" : "string", - "example" : "doctor_consultation" - }, - "category" : { - "type" : "string", - "example" : "opd_physician_consultation" - }, - "host_entity_id" : { - "type" : "string", - "example" : "67890" - }, - "subscriber_limit" : { - "type" : "string", - "example" : "1" - }, - "terms" : { - "type" : "string", - "example" : "non refundable" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T09:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T17:00:00" - }, - "venue" : { - "$ref" : "#/components/schemas/venue" - } - } - }, - "event_details_required" : { - "type" : "object", - "properties" : { - "event_id" : { - "type" : "boolean", - "example" : true - }, - "description" : { - "type" : "boolean", - "example" : true - }, - "name" : { - "type" : "boolean", - "example" : true - }, - "category" : { - "type" : "boolean", - "example" : true - }, - "host_entity_id" : { - "type" : "boolean", - "example" : true - }, - "period" : { - "type" : "boolean", - "example" : true - }, - "venue" : { - "type" : "boolean", - "example" : true - }, - "deadline" : { - "type" : "boolean", - "example" : true - }, - "subscriber_limit" : { - "type" : "boolean", - "example" : true - }, - "terms" : { - "type" : "boolean", - "example" : true - }, - "status" : { - "type" : "boolean", - "example" : true - } - } - }, - "affiliation_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "affiliation_id" : { - "type" : "string", - "example" : "1" - }, - "details" : { - "$ref" : "#/components/schemas/affiliation_details" - } - } - } - }, - "affiliation_details" : { - "type" : "object", - "properties" : { - "resource_id" : { - "type" : "string", - "example" : "12345" - }, - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "resource_category" : { - "type" : "string", - "example" : "physician" - }, - "work_days_hours" : { - "$ref" : "#/components/schemas/days_hours" - } - } - }, - "days_hours" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "day_of_week" : { - "type" : "string", - "example" : "[monday" - }, - "start_time" : { - "type" : "string", - "example" : "09:00:00" - }, - "end_time" : { - "type" : "string", - "example" : "17:00:00" - } - } - } - }, - "affiliation_filter" : { - "type" : "object", - "properties" : { - "affiliation_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[1,2]" - }, - "resource_id" : { - "type" : "string", - "example" : "12345" - }, - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "category" : { - "type" : "string", - "example" : "physician" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T09:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T17:00:00" - } - } - }, - "affiliation_details_required" : { - "type" : "object", - "properties" : { - "affiliation_id" : { - "type" : "boolean", - "example" : true - }, - "resource_id" : { - "type" : "boolean", - "example" : true - }, - "entity_id" : { - "type" : "boolean", - "example" : true - }, - "category" : { - "type" : "boolean", - "example" : true - }, - "work_days_hours" : { - "type" : "boolean", - "example" : true - } - } - }, - "alert_schedule_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "alert_schedule_id" : { - "type" : "string", - "example" : "1" - }, - "details" : { - "$ref" : "#/components/schemas/alert_schedule_details" - } - } - } - }, - "alert_schedule_details" : { - "type" : "object", - "properties" : { - "event_id" : { - "type" : "string", - "example" : "12345" - }, - "target_category" : { - "type" : "string", - "example" : "subscriber" - }, - "message_id" : { - "type" : "string", - "example" : "1" - }, - "alert_datetime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T09:00:00" - } - } - }, - "alert_schedule_filter" : { - "type" : "object", - "properties" : { - "alert_schedule_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[1,2]" - }, - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "target_category" : { - "type" : "string", - "example" : "subscriber" - }, - "message_id" : { - "type" : "string", - "example" : "1" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T09:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T13:30:00" - } - } - }, - "alert_schedule_details_required" : { - "type" : "object", - "properties" : { - "alert_schedule_id" : { - "type" : "boolean", - "example" : true - }, - "entity_id" : { - "type" : "boolean", - "example" : true - }, - "message_id" : { - "type" : "boolean", - "example" : true - }, - "alert_datetime" : { - "type" : "boolean", - "example" : true - } - } - }, - "message_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "message_id" : { - "type" : "string", - "example" : "1" - }, - "details" : { - "$ref" : "#/components/schemas/message_details" - } - } - } - }, - "message_details" : { - "type" : "object", - "properties" : { - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "category" : { - "type" : "string", - "example" : "reminder" - }, - "message_body" : { - "type" : "string", - "example" : "you have doctor consultation today" - } - } - }, - "message_filter" : { - "type" : "object", - "properties" : { - "message_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[1,2]" - }, - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "category" : { - "type" : "string", - "example" : "reminder" - }, - "message_body" : { - "type" : "string", - "example" : "you have doctor consultation today" - } - } - }, - "message_details_required" : { - "type" : "object", - "properties" : { - "message_id" : { - "type" : "boolean", - "example" : true - }, - "entity_id" : { - "type" : "boolean", - "example" : true - }, - "category" : { - "type" : "boolean", - "example" : true - }, - "message_body" : { - "type" : "boolean", - "example" : true - } - } - }, - "log_list" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "log_id" : { - "type" : "string", - "example" : "1" - }, - "details" : { - "$ref" : "#/components/schemas/log_details" - } - } - } - }, - "log_details" : { - "type" : "object", - "properties" : { - "logger_role" : { - "type" : "string", - "example" : "resource" - }, - "logger_id" : { - "type" : "string", - "example" : "1" - }, - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "log_category" : { - "type" : "string", - "example" : "attendance" - }, - "datetime" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:00:00" - }, - "log_data" : { - "type" : "string", - "example" : "event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended" - } - } - }, - "log_filter" : { - "type" : "object", - "properties" : { - "log_id" : { - "type" : "array", - "items" : { - "type" : "string" - }, - "example" : "[1,2]" - }, - "entity_id" : { - "type" : "string", - "example" : "67890" - }, - "category" : { - "type" : "string", - "example" : "attendance" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-15T11:30:00" - } - } - }, - "log_details_required" : { - "type" : "object", - "properties" : { - "log_id" : { - "type" : "boolean", - "example" : true - }, - "logger_category" : { - "type" : "boolean", - "example" : true - }, - "logger_id" : { - "type" : "boolean", - "example" : true - }, - "entity_id" : { - "type" : "boolean", - "example" : true - }, - "log_category" : { - "type" : "boolean", - "example" : true - }, - "datetime" : { - "type" : "boolean", - "example" : true - }, - "log_data" : { - "type" : "boolean", - "example" : true - } - } - }, - "free_resource_list" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/free_resource_details" - } - }, - "free_resource_details" : { - "type" : "object", - "properties" : { - "resource_id" : { - "type" : "string", - "example" : "1" - }, - "resource_name" : { - "type" : "string", - "example" : "abc" - }, - "free_slots" : { - "type" : "array", - "items" : { - "type" : "string", - "example" : "{[2018-02-15T11:00:00to2018-02-15T11:09:00:00],[2018-02-22T11:00:00to2018-02-22T11:17:00:00]}" - } - } - } - }, - "free_resource_filter" : { - "type" : "object", - "properties" : { - "category" : { - "type" : "string", - "example" : "doctor" - }, - "Entity_id" : { - "type" : "string", - "example" : "67890" - }, - "from" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-14T09:00:00" - }, - "to" : { - "type" : "string", - "format" : "date-time", - "example" : "2018-02-18T13:30:00" - }, - "resource_id" : { - "type" : "string", - "example" : "1" - } - } - }, - "venue" : { - "type" : "object", - "properties" : { - "building" : { - "type" : "string", - "example" : "xyz" - }, - "street" : { - "type" : "string", - "example" : "7th main" - }, - "area" : { - "type" : "string", - "example" : "wilson garden" - }, - "city" : { - "type" : "string", - "example" : "bangalore" - }, - "state" : { - "type" : "string", - "example" : "karnataka" - }, - "country" : { - "type" : "string", - "example" : "india" - }, - "lat" : { - "type" : "string", - "example" : "0.001" - }, - "long" : { - "type" : "string", - "example" : "0.002" - } - } - }, - "event_new_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/event_details" - } - } - }, - "event_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/event_details" - } - } - }, - "event_get_details_qry" : { - "type" : "object", - "properties" : { - "event_filter" : { - "$ref" : "#/components/schemas/event_filter" - }, - "event_details_required" : { - "$ref" : "#/components/schemas/event_details_required" - } - } - }, - "entity_new_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/entity_details" - } - } - }, - "entity_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/entity_details" - } - } - }, - "entity_get_details_qry" : { - "type" : "object", - "properties" : { - "entity_filter" : { - "$ref" : "#/components/schemas/entity_filter" - }, - "entity_details_required" : { - "$ref" : "#/components/schemas/entity_details_required" - } - } - }, - "resource_new_qry" : { - "type" : "object", - "properties" : { - "resource_details" : { - "$ref" : "#/components/schemas/resource_details" - } - } - }, - "resource_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/resource_details" - } - } - }, - "resource_get_details_qry" : { - "type" : "object", - "properties" : { - "resource_filter" : { - "$ref" : "#/components/schemas/resource_filter" - }, - "resource_details_required" : { - "$ref" : "#/components/schemas/resource_details_required" - } - } - }, - "resource_get_availability_qry" : { - "type" : "object", - "properties" : { - "free_resource_filter" : { - "$ref" : "#/components/schemas/free_resource_filter" - } - } - }, - "subscriber_new_qry" : { - "type" : "object", - "properties" : { - "subscriber_details" : { - "$ref" : "#/components/schemas/subscriber_details" - } - } - }, - "subscriber_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/subscriber_details" - } - } - }, - "subscriber_get_details_qry" : { - "type" : "object", - "properties" : { - "subscriber_filter" : { - "$ref" : "#/components/schemas/subscriber_filter" - }, - "subscriber_details_required" : { - "$ref" : "#/components/schemas/subscriber_details_required" - } - } - }, - "message_new_qry" : { - "type" : "object", - "properties" : { - "message_details" : { - "$ref" : "#/components/schemas/message_details" - } - } - }, - "message_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/message_details" - } - } - }, - "message_get_details_qry" : { - "type" : "object", - "properties" : { - "message_filter" : { - "$ref" : "#/components/schemas/message_filter" - }, - "message_details_required" : { - "$ref" : "#/components/schemas/message_details_required" - } - } - }, - "affiliation_new_qry" : { - "type" : "object", - "properties" : { - "affiliation_details" : { - "$ref" : "#/components/schemas/affiliation_details" - } - } - }, - "affiliation_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/affiliation_details" - } - } - }, - "affiliation_get_details_qry" : { - "type" : "object", - "properties" : { - "affiliation_filter" : { - "$ref" : "#/components/schemas/affiliation_filter" - }, - "affiliation_details_required" : { - "$ref" : "#/components/schemas/affiliation_details_required" - } - } - }, - "alert_schedule_new_qry" : { - "type" : "object", - "properties" : { - "alert_schedule_details" : { - "$ref" : "#/components/schemas/alert_schedule_details" - } - } - }, - "alert_schedule_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/alert_schedule_details" - } - } - }, - "alert_schedule_get_details_qry" : { - "type" : "object", - "properties" : { - "alert_schedule_filter" : { - "$ref" : "#/components/schemas/alert_schedule_filter" - }, - "alert_schedule_details_required" : { - "$ref" : "#/components/schemas/alert_schedule_details_required" - } - } - }, - "log_new_qry" : { - "type" : "object", - "properties" : { - "log_details" : { - "$ref" : "#/components/schemas/log_details" - } - } - }, - "log_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/log_details" - } - } - }, - "log_get_details_qry" : { - "type" : "object", - "properties" : { - "log_filter" : { - "$ref" : "#/components/schemas/log_filter" - }, - "log_details_required" : { - "$ref" : "#/components/schemas/log_details_required" - } - } - }, - "appointment_new_qry" : { - "type" : "object", - "properties" : { - "appointment_details" : { - "$ref" : "#/components/schemas/appointment_details" - } - } - }, - "appointment_modify_qry" : { - "type" : "object", - "properties" : { - "details" : { - "$ref" : "#/components/schemas/appointment_details" - } - } - }, - "appointment_get_details_qry" : { - "type" : "object", - "properties" : { - "appointment_filter" : { - "$ref" : "#/components/schemas/appointment_filter" - }, - "appointment_details_required" : { - "$ref" : "#/components/schemas/appointment_details_required" - } - } - } - } - } -} From 75bc78b36c504d8628cb0b5849321b6a6d6494b4 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Fri, 5 May 2023 13:45:18 +0530 Subject: [PATCH 06/47] Delete test.txt --- api/test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 api/test.txt diff --git a/api/test.txt b/api/test.txt deleted file mode 100644 index 8b13789..0000000 --- a/api/test.txt +++ /dev/null @@ -1 +0,0 @@ - From 72060ec07ac338b476b3f86de57742770710b270 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 14:29:13 +0530 Subject: [PATCH 07/47] Update createaffiliationnew.feature --- test/features/createaffiliationnew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/createaffiliationnew.feature b/test/features/createaffiliationnew.feature index 84c99ee..5a1faee 100644 --- a/test/features/createaffiliationnew.feature +++ b/test/features/createaffiliationnew.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/affiliation/new/ Feature: Create a new affiliation of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new affiliation for Scheduler API Smoke Test +Scenario: Create a new affiliation for Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new affiliation When a POST request for an endpoint /affiliation/new/ is triggered to create new affiliation for scheduler block From afaed4a07b4598c7d17bdb9d02d8aeb43c7e1517 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 16:55:27 +0530 Subject: [PATCH 08/47] Update createalertschedulenew.feature --- test/features/createalertschedulenew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/createalertschedulenew.feature b/test/features/createalertschedulenew.feature index ef650a1..6c9729c 100644 --- a/test/features/createalertschedulenew.feature +++ b/test/features/createalertschedulenew.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/alert_schedule/new/ Feature: Create a new Alert Schedule for Management of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new Alert Schedule for Management of Scheduler API Smoke Test +Scenario: Create a new Alert Schedule for Management of Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new alert schedule When a POST request for an endpoint /alert_schedule/new/ is triggered to create new alert schedule for scheduler block From 7fe2b4ddbc4e84f30368d07a74d3e78e041e7f6e Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 16:56:08 +0530 Subject: [PATCH 09/47] Update createappointmentnew.feature --- test/features/createappointmentnew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/createappointmentnew.feature b/test/features/createappointmentnew.feature index 986e80a..25ebeec 100644 --- a/test/features/createappointmentnew.feature +++ b/test/features/createappointmentnew.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/appointment/new/ Feature: Create a new appointment of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new appointment of Scheduler API Smoke Test +Scenario: Create a new appointment of Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new appointment When a POST request for an endpoint /appointment/new/ is triggered to create new appointment for scheduler block From 0d12ebb6e5973ce31192d3e3794eba781d86f405 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 16:57:05 +0530 Subject: [PATCH 10/47] Update createlognew.feature --- test/features/createlognew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/createlognew.feature b/test/features/createlognew.feature index 220619d..be4297b 100644 --- a/test/features/createlognew.feature +++ b/test/features/createlognew.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/log/new/ Feature: Create a new Log of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new Log of Scheduler API Smoke Test +Scenario: Create a new Log of Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new log When a POST request for an endpoint /log/new/ is triggered to create new log for scheduler block From 0f7dc8c4841ab16719f559e3de737947bd2dbcf4 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 16:57:39 +0530 Subject: [PATCH 11/47] Update createmessagenew.feature --- test/features/createmessagenew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/createmessagenew.feature b/test/features/createmessagenew.feature index daee441..b4fc300 100644 --- a/test/features/createmessagenew.feature +++ b/test/features/createmessagenew.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/message/new/ Feature: Create a new message of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new message of Scheduler API Smoke Test +Scenario: Create a new message of Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new message When a POST request for an endpoint /message/new/ is triggered to create new message for scheduler block From 909276f5bea89a78c63d8e3a163d260c4d879136 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 16:58:14 +0530 Subject: [PATCH 12/47] Update createnewentity.feature --- test/features/createnewentity.feature | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/features/createnewentity.feature b/test/features/createnewentity.feature index f11ff27..8c6aeaa 100644 --- a/test/features/createnewentity.feature +++ b/test/features/createnewentity.feature @@ -1,9 +1,11 @@ + +@method=POST @endpoint=/entity/new/ Feature: Create a new entity of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new entity for Scheduler API Smoke Test +Scenario: Create a new entity for Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new entity When a POST request for an endpoint /entity/new/ is triggered to create new entity for scheduler block From 96156c8edc41203941f8b8db935c18cb285da7cc Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:00:02 +0530 Subject: [PATCH 13/47] Update createnewevent.feature --- test/features/createnewevent.feature | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/features/createnewevent.feature b/test/features/createnewevent.feature index bcb1fbd..20083c3 100644 --- a/test/features/createnewevent.feature +++ b/test/features/createnewevent.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/event/new Feature: Create a new event of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new event for Scheduler API Smoke Test +Scenario: Create a new event for Scheduler API Smoke Test Given the requestor is "healthngoadmin1" with role as "healthworker" to create a new event When a POST request for an endpoint /event/new is triggered to create new event for scheduler block @@ -21,7 +22,7 @@ And response code of POST request is "200" Examples: - | requestor_id | requestor_role | name | category | host_entity_id | From | To | street | building | area | lat | long | event_name | event_id | + | requestor_id | requestor_role | name | category | host_entity_id | From | To | street | building | area | lat | long | event_name | event_id | | healthngoadmin1 | healthworker |doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyx | wilsongarden | 0.1 | 0.2 |doctorconsultation | 4524458935 | @@ -37,6 +38,6 @@ Examples: | requestor_id | requestor_role | name | category | host_entity_id | From | To | street | building | area | lat | long | status_code | | healthngoadmin1 | healthworker | doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyz | manipal | 0.1 | 0.2 | 404 | | healthngoadmin1 | healthworker | doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyz | manipal | 0.1 | 0.2 | 403 | - | healthngoadmin1 | healthworker |doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyz | manipal | 0.1 | 0.2 |400 | + | healthngoadmin1 | healthworker | doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyz | manipal | 0.1 | 0.2 | 400 | From 4c11d822bdc5fb14e61e7d086b262e82c2131267 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:00:39 +0530 Subject: [PATCH 14/47] Update createresourcenew.feature --- test/features/createresourcenew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/createresourcenew.feature b/test/features/createresourcenew.feature index 63e4478..b4a4900 100644 --- a/test/features/createresourcenew.feature +++ b/test/features/createresourcenew.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/resource/new/ Feature: Create a new resource of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new resource of Scheduler API Smoke Test +Scenario: Create a new resource of Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new resource When a POST request for an endpoint /resource/new/ is triggered to create new resource for scheduler block From d54874e7ae34a96c37d0f55e5d6ef604c42d92ed Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:01:20 +0530 Subject: [PATCH 15/47] Update createsubscribernew.feature --- test/features/createsubscribernew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/createsubscribernew.feature b/test/features/createsubscribernew.feature index fd877f7..efded09 100644 --- a/test/features/createsubscribernew.feature +++ b/test/features/createsubscribernew.feature @@ -1,9 +1,10 @@ +@method=POST @endpoint=/subscriber/new/ Feature: Create a new Subscriber of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Create a new Subscriber of Scheduler API Smoke Test +Scenario: Create a new Subscriber of Scheduler API Smoke Test Given the requestor Id is "healthngo1" with role as "healthworker" to create a new subscriber When a POST request for an endpoint /subscriber/new/ is triggered to create new subscriber for scheduler block From 64004b9053a8d080be9f6c07aa2bccd4dbb6a607 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:02:05 +0530 Subject: [PATCH 16/47] Update deleteaffiliationnew.feature --- test/features/deleteaffiliationnew.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/test/features/deleteaffiliationnew.feature b/test/features/deleteaffiliationnew.feature index 68e1da0..769d0ee 100644 --- a/test/features/deleteaffiliationnew.feature +++ b/test/features/deleteaffiliationnew.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/affiliation Feature: Delete an Affiliation of Scheduler API Gherkin feature files for GovStack Scheduler services From a2d76d8bde9f1f2ad775da990fe0358683c39f28 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:02:46 +0530 Subject: [PATCH 17/47] Update deletealertschedulenew.feature --- test/features/deletealertschedulenew.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/features/deletealertschedulenew.feature b/test/features/deletealertschedulenew.feature index 18ef379..248f3f0 100644 --- a/test/features/deletealertschedulenew.feature +++ b/test/features/deletealertschedulenew.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/alert_schedule Feature: Delete an Alert Schedule for Management of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -23,7 +24,7 @@ Then response code of Delete request is "200" Examples: | requestor_id | requestor_role | alert_schedule_id | - | healthngoadmin1 | Organizer | 12345 | + | healthngoadmin1 | Organizer | 12345 | @unit @Negativeregression From ceed75312458bd2f3eb37bdd622d305f97f288d1 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:03:45 +0530 Subject: [PATCH 18/47] Update deleteappointmentnew.feature --- test/features/deleteappointmentnew.feature | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/features/deleteappointmentnew.feature b/test/features/deleteappointmentnew.feature index a775f02..a75b514 100644 --- a/test/features/deleteappointmentnew.feature +++ b/test/features/deleteappointmentnew.feature @@ -1,3 +1,5 @@ + +@method=DELETE @endpoint=/appointment Feature: Delete an appointment of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -23,7 +25,7 @@ Then response code of Delete request is "200" Examples: | requestor_id | requestor_role | appointment_id | - | healthngoadmin1 | Organizer | 12345 | + | healthngoadmin1 | Organizer | 12345 | @unit @Negativeregression From d26ce7ba516dc9cb5941e15d995a3b20fa2788ff Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:04:21 +0530 Subject: [PATCH 19/47] Update deleteentity.feature --- test/features/deleteentity.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/test/features/deleteentity.feature b/test/features/deleteentity.feature index e6b75c9..2d4fcce 100644 --- a/test/features/deleteentity.feature +++ b/test/features/deleteentity.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/entity Feature: Delete an Entity of Scheduler API Gherkin feature files for GovStack Scheduler services From 7e402e52e6c1c23d1a86c53b7db879027e1f5e34 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:04:48 +0530 Subject: [PATCH 20/47] Update deleteevent.feature --- test/features/deleteevent.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/test/features/deleteevent.feature b/test/features/deleteevent.feature index 197dd31..9344142 100644 --- a/test/features/deleteevent.feature +++ b/test/features/deleteevent.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/event Feature: Delete an Event of Scheduler API Gherkin feature files for GovStack Scheduler services From bcade74ee7e68140e4b0c4a7e8a224860dbb4154 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:05:31 +0530 Subject: [PATCH 21/47] Update deletelognew.feature --- test/features/deletelognew.feature | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/features/deletelognew.feature b/test/features/deletelognew.feature index d72f6c4..c95f7fa 100644 --- a/test/features/deletelognew.feature +++ b/test/features/deletelognew.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/log Feature: Delete a log details of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -22,8 +23,8 @@ When a Delete request for an endpoint /log is triggered to delete a log for sche Then response code of Delete request is "200" Examples: - | requestor_id | requestor_role | log_id | - | healthngoadmin1 | Organizer | 12345 | + | requestor_id | requestor_role | log_id | + | healthngoadmin1 | Organizer | 12345 | @unit @Negativeregression From dbb2ea607b3c42d6ed9a7337a80fca4502a4f9f0 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:06:16 +0530 Subject: [PATCH 22/47] Update deletemessagenew.feature --- test/features/deletemessagenew.feature | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/features/deletemessagenew.feature b/test/features/deletemessagenew.feature index 967b2c4..95fdd3a 100644 --- a/test/features/deletemessagenew.feature +++ b/test/features/deletemessagenew.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/message Feature: Delete a message of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -11,8 +12,8 @@ Then response code of Delete request is "200" for smoke testing Examples: - | requestor_id | requestor_role | message_id | - | healthngo1 | healthworker | 1 | + | requestor_id | requestor_role | message_id | + | healthngo1 | healthworker | 1 | @unit @happyregression Scenario Outline: Delete a message of Scheduler API Unit and Regression Happy Testing @@ -22,8 +23,8 @@ When a Delete request for an endpoint /message is triggered to delete a message Then response code of Delete request is "200" Examples: - | requestor_id | requestor_role | message_id | - | healthngoadmin1 | Organizer | 12345 | + | requestor_id | requestor_role | message_id | + | healthngoadmin1 | Organizer | 12345 | @unit @Negativeregression From fa0bff38e94cf8d586a3c9bb71767877cc360c8b Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:07:01 +0530 Subject: [PATCH 23/47] Update deleteresourcenew.feature --- test/features/deleteresourcenew.feature | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/features/deleteresourcenew.feature b/test/features/deleteresourcenew.feature index 860ce78..934e712 100644 --- a/test/features/deleteresourcenew.feature +++ b/test/features/deleteresourcenew.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/resource Feature: Delete a resource of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -11,8 +12,8 @@ Then response code of Delete request is "200" for smoke testing Examples: - | requestor_id | requestor_role | resource_id | - | healthngo1 | healthworker | 54321 | + | requestor_id | requestor_role | resource_id | + | healthngo1 | healthworker | 54321 | @unit @happyregression Scenario Outline: Delete a resource of Scheduler API Unit and Regression Happy Testing @@ -22,8 +23,8 @@ When a Delete request for an endpoint /resource is triggered to delete a resourc Then response code of Delete request is "200" Examples: - | requestor_id | requestor_role | resource_id | - | healthngoadmin1 | Organizer | 12345 | + | requestor_id | requestor_role | resource_id | + | healthngoadmin1 | Organizer | 12345 | @unit @Negativeregression From a28e5e47ad85a3541191aa2b6b494194eb8121af Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:07:49 +0530 Subject: [PATCH 24/47] Update deletesubscribernew.feature --- test/features/deletesubscribernew.feature | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/features/deletesubscribernew.feature b/test/features/deletesubscribernew.feature index 87f27b5..4b98c1e 100644 --- a/test/features/deletesubscribernew.feature +++ b/test/features/deletesubscribernew.feature @@ -1,3 +1,4 @@ +@method=DELETE @endpoint=/subscriber Feature: Delete a subscriber of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -11,8 +12,8 @@ Then response code of Delete request is "200" for smoke testing Examples: - | requestor_id | requestor_role | subscriber_id | - | healthngo1 | healthworker | 12345 | + | requestor_id | requestor_role | subscriber_id | + | healthngo1 | healthworker | 12345 | @unit @happyregression Scenario Outline: Delete a subscriber for Scheduler API Unit and Regression Happy Testing @@ -22,8 +23,8 @@ When a Delete request for an endpoint /subscriber is triggered to delete a subsc Then response code of Delete request is "200" Examples: - | requestor_id | requestor_role | subscriber_id | - | healthngoadmin1 | Organizer | 12345 | + | requestor_id | requestor_role | subscriber_id | + | healthngoadmin1 | Organizer | 12345 | @unit @Negativeregression From 9aa959912f242ba5c19f2c4dc0218db820b4274c Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:08:40 +0530 Subject: [PATCH 25/47] Update getaffiliationlistnew.feature --- test/features/getaffiliationlistnew.feature | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/features/getaffiliationlistnew.feature b/test/features/getaffiliationlistnew.feature index 1af9ed4..b691ac7 100644 --- a/test/features/getaffiliationlistnew.feature +++ b/test/features/getaffiliationlistnew.feature @@ -1,3 +1,4 @@ +@method=GET @endpoint=/affiliation/list_details/ Feature: Get Affiliation List Details of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -12,8 +13,8 @@ Then response code of GET request is "200" for smoke testing Examples: - | requestor_id | requestor_role | affiliation_id | - | healthngo1 | healthworker | 1 | + | requestor_id | requestor_role | affiliation_id | + | healthngo1 | healthworker | 1 | From 749a681721ccc885922b3673671a51ad112ea017 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:10:00 +0530 Subject: [PATCH 26/47] Update getalertschedulelistnew.feature --- test/features/getalertschedulelistnew.feature | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/test/features/getalertschedulelistnew.feature b/test/features/getalertschedulelistnew.feature index 4e43aeb..92fb4c0 100644 --- a/test/features/getalertschedulelistnew.feature +++ b/test/features/getalertschedulelistnew.feature @@ -1,22 +1,17 @@ +@method=GET @endpoint=/alert_schedule/list_details/ Feature: Get Alert List Details of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke Scenario Outline: Get Alert List Details of Scheduler API Smoke Test - Given the requestor Id is "" with role as "" for an alert_schedule_id "" for smoke testing When a GET request for an endpoint /alert_schedule/list_details/ is triggered to get details of an alert schedule list Then response code of GET request is "200" for smoke testing - - Examples: - | requestor_id | requestor_role | alert_schedule_id | - | healthngo1 | healthworker | 1 | - - - + | requestor_id | requestor_role | alert_schedule_id | + | healthngo1 | healthworker | 1 | @unit @happyregression @@ -42,9 +37,9 @@ Then response code of negative testing GET request for invalid data is " Date: Thu, 22 Jun 2023 17:11:05 +0530 Subject: [PATCH 27/47] Update getappointmentlistnew.feature --- test/features/getappointmentlistnew.feature | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/features/getappointmentlistnew.feature b/test/features/getappointmentlistnew.feature index ad9b7a9..594b6e3 100644 --- a/test/features/getappointmentlistnew.feature +++ b/test/features/getappointmentlistnew.feature @@ -1,5 +1,5 @@ +@method=GET @endpoint=/appointment/list_details/ Feature: Get Appointment List Details of Scheduler API - Gherkin feature files for GovStack Scheduler services @smoke @@ -9,15 +9,9 @@ Given the requestor Id is "" with role as "" for a When a GET request for an endpoint /appointment/list_details/ is triggered to get details of a appointment list Then response code of GET request is "200" for smoke testing - - Examples: - | requestor_id | requestor_role | appointment_id | - | healthngo1 | healthworker | 1 | - - - - + | requestor_id | requestor_role | appointment_id| + | healthngo1 | healthworker | 1 | @unit @happyregression Scenario Outline: Get Appointment List Details of Scheduler API Unit and Regression Happy Testing @@ -29,7 +23,7 @@ And response code of GET request is "200" Examples: | requestor_id | requestor_role | appointment_id | filter_appointment_id | required_event_type | required_event_id | required_participant_type | required_participant_id | required_appointment_id | required_From | required_To | appointment_id | participant_type | participant_id | event_type | event_id | From | To | - | healthngo1 | healthworker | 1 | 1 | true | true | true | true | true | true | true | 1 | subscriber | 12345 | doctor_consultation | 1 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | + | healthngo1 | healthworker | 1 | 1 | true | true | true | true | true | true | true | 1 | subscriber | 12345 | doctor_consultation | 1 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | @unit @Negativeregression From d1a8ccd48648ac87d08e004bfd1bab89a5b06c82 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:11:53 +0530 Subject: [PATCH 28/47] Update getentitylistnew.feature --- test/features/getentitylistnew.feature | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/features/getentitylistnew.feature b/test/features/getentitylistnew.feature index 000d0fe..dfbd39c 100644 --- a/test/features/getentitylistnew.feature +++ b/test/features/getentitylistnew.feature @@ -1,3 +1,4 @@ +@method=GET @endpoint=/entity/list_details/ Feature: Get Entity List Details of Scheduler API Gherkin feature files for GovStack Scheduler services @@ -12,11 +13,8 @@ Then response code of GET request is "200" for smoke testing Examples: - | requestor_id | requestor_role | entity_id | - | healthngo1 | healthworker | 4524453535 | - - - + | requestor_id | requestor_role | entity_id | + | healthngo1 | healthworker | 4524453535 | @unit @happyregression From 0f34c30f1c623821c49cb879e616cceea691fc23 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:12:48 +0530 Subject: [PATCH 29/47] Update geteventlistnew.feature --- test/features/geteventlistnew.feature | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/features/geteventlistnew.feature b/test/features/geteventlistnew.feature index 7818154..54516f3 100644 --- a/test/features/geteventlistnew.feature +++ b/test/features/geteventlistnew.feature @@ -1,7 +1,6 @@ +@method=GET @endpoint=/event/list_details/ Feature: Get Event List Details of Scheduler API - Gherkin feature files for GovStack Scheduler services - @smoke Scenario Outline: Get Event List Details for Scheduler API Smoke Test @@ -9,11 +8,9 @@ Given the requestor Id is "" with role as "" for a When a GET request for an endpoint /event/list_details/ is triggered to get details of an event list Then response code of GET request is "200" for smoke testing - - Examples: - | requestor_id | requestor_role | event_id | - | healthngo1 | healthworker | 4524453535 | + | requestor_id | requestor_role | event_id | + | healthngo1 | healthworker | 4524453535| From dd5d83661bd95414399e804647e1f007fad40cf7 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:13:10 +0530 Subject: [PATCH 30/47] Update geteventlistnew.feature --- test/features/geteventlistnew.feature | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/features/geteventlistnew.feature b/test/features/geteventlistnew.feature index 54516f3..de34ecc 100644 --- a/test/features/geteventlistnew.feature +++ b/test/features/geteventlistnew.feature @@ -12,10 +12,6 @@ Examples: | requestor_id | requestor_role | event_id | | healthngo1 | healthworker | 4524453535| - - - - @unit @happyregression Scenario Outline: Get Event List Details for Scheduler API Unit and Regression Happy Testing @@ -36,8 +32,6 @@ Given the invalid inputs for the requestor Id is "" with role as " When a GET request for an endpoint /event/list_details/ is triggered to get details of an event list Then response code of negative testing GET request for invalid data is "" - - Examples: | requestor_id | requestor_role | event_id | filter_event_id | required_category | required_host_entity_id | required_name | required_venue | status_code | | healthngo1 | healthworker | myresource | 4524453535 | false | yes | true | true | 400 | From 452817cc8ba1c9f81eced9b5b8d742798b8cf88c Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:13:59 +0530 Subject: [PATCH 31/47] Update getloglistnew.feature --- test/features/getloglistnew.feature | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/test/features/getloglistnew.feature b/test/features/getloglistnew.feature index 5be6ca7..520c687 100644 --- a/test/features/getloglistnew.feature +++ b/test/features/getloglistnew.feature @@ -1,22 +1,15 @@ +@method=GET @endpoint=/log/list_details/ Feature: Get Log List Details of Scheduler API - Gherkin feature files for GovStack Scheduler services - @smoke Scenario Outline: Get Log List Details of Scheduler API Smoke Test Given the requestor Id is "" with role as "" for an log_id "" for smoke testing When a GET request for an endpoint /log/list_details/ is triggered to get details of a log list Then response code of GET request is "200" for smoke testing - - - Examples: - | requestor_id | requestor_role | log_id | - | healthngo1 | healthworker | 1 | - - - + | requestor_id | requestor_role | log_id | + | healthngo1 | healthworker | 1 | @unit @happyregression From 73f3c41b3fbfbc754a0935ef65f1849c30f19560 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:14:45 +0530 Subject: [PATCH 32/47] Update getmessagelistnew.feature --- test/features/getmessagelistnew.feature | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/features/getmessagelistnew.feature b/test/features/getmessagelistnew.feature index 180fec8..46031be 100644 --- a/test/features/getmessagelistnew.feature +++ b/test/features/getmessagelistnew.feature @@ -1,7 +1,7 @@ +@method=GET @endpoint=/message/list_details/ Feature: Get Message List Details of Scheduler API Gherkin feature files for GovStack Scheduler services - @smoke Scenario Outline: Get Message List Details of Scheduler API Smoke Test @@ -9,14 +9,9 @@ Given the requestor Id is "" with role as "" for a When a GET request for an endpoint /message/list_details/ is triggered to get details of a messages list Then response code of GET request is "200" for smoke testing - - Examples: - | requestor_id | requestor_role | message_id | - | healthngo1 | healthworker | 1 | - - - + | requestor_id | requestor_role | message_id | + | healthngo1 | healthworker | 1 | @unit @happyregression From af5d32eff9f60cec1036af49543c9e2f874a236d Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:15:50 +0530 Subject: [PATCH 33/47] Update getresourceavailabalitydetailsnew.feature --- .../getresourceavailabalitydetailsnew.feature | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/test/features/getresourceavailabalitydetailsnew.feature b/test/features/getresourceavailabalitydetailsnew.feature index c1f23b8..d772e28 100644 --- a/test/features/getresourceavailabalitydetailsnew.feature +++ b/test/features/getresourceavailabalitydetailsnew.feature @@ -1,7 +1,6 @@ +@method=GET @endpoint=/resource/availabality/ Feature: Get Resource Availabality Details of Scheduler API - Gherkin feature files for GovStack Scheduler services - @smoke Scenario Outline: Get Resource Availabality Details of Scheduler API Smoke Test @@ -9,11 +8,9 @@ Given the requestor Id is "" with role as "" for a When a GET request for an endpoint /resource/availabality/ is triggered to get details of a resource availabality list Then response code of GET request is "200" for smoke testing - - Examples: - | requestor_id | requestor_role | resource_id | - | healthngo1 | healthworker | 1 | + | requestor_id| requestor_role | resource_id| + | healthngo1 | healthworker | 1 | @@ -42,10 +39,10 @@ Then response code of negative testing GET request for invalid data is " Date: Thu, 22 Jun 2023 17:16:21 +0530 Subject: [PATCH 34/47] Update getresourceavailabalitydetailsnew.feature --- test/features/getresourceavailabalitydetailsnew.feature | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/features/getresourceavailabalitydetailsnew.feature b/test/features/getresourceavailabalitydetailsnew.feature index d772e28..895b189 100644 --- a/test/features/getresourceavailabalitydetailsnew.feature +++ b/test/features/getresourceavailabalitydetailsnew.feature @@ -12,10 +12,6 @@ Examples: | requestor_id| requestor_role | resource_id| | healthngo1 | healthworker | 1 | - - - - @unit @happyregression Scenario Outline: Get Resource Availabality Details of Scheduler API Unit and Regression Happy Testing @@ -36,8 +32,6 @@ Given the invalid inputs for the requestor Id is "" with role as " When a GET request for an endpoint /resource/availabality/ is triggered to get details of a resource availabality list Then response code of negative testing GET request for invalid data is "" - - Examples: | requestor_id | requestor_role | resource_id | Entity_id | category | From | To | status_code | | healthngo1 | healthworker | myresource | 4524453535| lawyer | 2018-02-18T13:30:00 | 2018-02-14T09:00:00 | 400 | From 8ba7ae526dbac9ee61c8cdb8fb88f6491d10f2a4 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:17:19 +0530 Subject: [PATCH 35/47] Update getresourcelistnew.feature --- test/features/getresourcelistnew.feature | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/test/features/getresourcelistnew.feature b/test/features/getresourcelistnew.feature index 54f48c5..27add54 100644 --- a/test/features/getresourcelistnew.feature +++ b/test/features/getresourcelistnew.feature @@ -1,23 +1,15 @@ +@method=GET @endpoint=/resource/list_details/ Feature: Get Resource List Details of Scheduler API - Gherkin feature files for GovStack Scheduler services - @smoke Scenario Outline: Get Resource List Details for Scheduler API Smoke Test Given the requestor Id is "" with role as "" for an resource_id "" for smoke testing When a GET request for an endpoint /resource/list_details/ is triggered to get details of a resources list Then response code of GET request is "200" for smoke testing - - - Examples: - | requestor_id | requestor_role | resource_id | - | healthngo1 | healthworker | 54321 | - - - - + | requestor_id| requestor_role | resource_id| + | healthngo1 | healthworker | 54321 | @unit @happyregression Scenario Outline: Get Resource List Details for Scheduler API Unit and Regression Happy Testing @@ -29,7 +21,7 @@ And response code of GET request is "200" Examples: | requestor_id | requestor_role | resource_id | filter_resource_id | required_category | required_resource_id | required_name | required_email | name | category | resource_id | phone | email | - | healthngo1 | healthworker | 54321 |54321 | true | true | true | true |doctor_consultation | opd_physician_consultation | 54321 | 9980555504 | abc@gmail.com | + | healthngo1 | healthworker | 54321 |54321 | true | true | true | true |doctor_consultation | opd_physician_consultation | 54321 | 9980555504 | abc@gmail.com | @unit @Negativeregression @@ -38,8 +30,6 @@ Scenario Outline: Get Resource List Details for Scheduler API Unit and Regressio Given the invalid inputs for the requestor Id is "" with role as "" for an resource_id "" with details filter for "" and requesting for resource details for "" "" "" and "" When a GET request for an endpoint /resource/list_details/ is triggered to get details of a resources list Then response code of negative testing GET request for invalid data is "" - - Examples: | requestor_id | requestor_role | resource_id | filter_resource_id | required_category | required_resource_id | required_name | required_phone | required_email | status_code | From f573de32fd7486488c545e4334fa546a0ad740c0 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:18:10 +0530 Subject: [PATCH 36/47] Update getsubscriberlistnew.feature --- test/features/getsubscriberlistnew.feature | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/features/getsubscriberlistnew.feature b/test/features/getsubscriberlistnew.feature index d8ffd8d..730f702 100644 --- a/test/features/getsubscriberlistnew.feature +++ b/test/features/getsubscriberlistnew.feature @@ -1,7 +1,6 @@ +@method=GET @endpoint=/subscriber/list_details/ Feature: Get Subscriber List Details of Scheduler API - Gherkin feature files for GovStack Scheduler services - @smoke Scenario Outline: Get Subscriber List Details of Scheduler API Smoke Test @@ -9,13 +8,9 @@ Given the requestor Id is "" with role as "" for a When a GET request for an endpoint /subscriber/list_details/ is triggered to get details of a subscribers list Then response code of GET request is "200" for smoke testing - - Examples: - | requestor_id | requestor_role | subscriber_id | - | healthngo1 | healthworker | 12345 | - - + | requestor_id | requestor_role | subscriber_id | + | healthngo1 | healthworker | 12345 | @@ -29,7 +24,7 @@ And response code of GET request is "200" Examples: | requestor_id | requestor_role | subscriber_id | filter_subscriber_id | required_category | required_subscriber_id | required_name | required_email | required_phone | name | category | resource_id | phone | email | - | healthngo1 | healthworker | 12345 | 12345 | true | true | true | true | true |abc | patient | 12345 | 9980555504 | abc@gmail.com | + | healthngo1 | healthworker | 12345 | 12345 | true | true | true | true | true |abc | patient | 12345 | 9980555504 | abc@gmail.com | @unit @Negativeregression From 07bfe024b77fd49bf12ce5b6a1bc3f283e123c06 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:20:11 +0530 Subject: [PATCH 37/47] Update updateaffiliationnew.feature --- test/features/updateaffiliationnew.feature | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/features/updateaffiliationnew.feature b/test/features/updateaffiliationnew.feature index afb6894..3742d95 100644 --- a/test/features/updateaffiliationnew.feature +++ b/test/features/updateaffiliationnew.feature @@ -1,16 +1,14 @@ +@method=PUT @endpoint=/affiliation/modifications/ Feature: Update an affiliation details of Scheduler API Gherkin feature files for GovStack Scheduler services - @smoke -Scenario Outline: Update an affiliation details of Scheduler API Smoke Test +Scenario: Update an affiliation details of Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update an affiliation with its ID "1" When an Update request for an endpoint /affiliation/modifications/ is triggered to update existing affiliation details for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update an affiliation details of Scheduler API Unit and Regression Happy Testing From 0a48f641cbfc1fd74f6edf601e2b737df87a5132 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:21:04 +0530 Subject: [PATCH 38/47] Update updatealertschedulenew.feature --- test/features/updatealertschedulenew.feature | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/features/updatealertschedulenew.feature b/test/features/updatealertschedulenew.feature index 8d8b707..3d7380c 100644 --- a/test/features/updatealertschedulenew.feature +++ b/test/features/updatealertschedulenew.feature @@ -1,24 +1,22 @@ +@method=PUT @endpoint=/alert_schedule/modifications/ Feature: Update an Alert Schedule for Management of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Update an Alert Schedule for Management of Scheduler API Smoke Test +Scenario: Update an Alert Schedule for Management of Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update an alert schedule with its ID "2" When an Update request for an endpoint /alert_schedule/modifications/ is triggered to update existing alert schedule for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update an Alert Schedule for Management of Scheduler API Unit and Regression Happy Testing Given the requestor id is "" with role as "" for an alert schedule with Id "" to update an alert with its details like "" for "" with "" within a "" When an Update request for an endpoint /alert_schedule/modifications/ is triggered to update existing alert schedule for scheduler block Then response code of Update request is "200" -Examples: - + Examples: | requestor_id | requestor_role | alert_schedule_id | event_id | target_category | message_id | alert_datetime | | healthngo1 | healthworker | 2 | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | @@ -35,7 +33,7 @@ Examples: | requestor_id | requestor_role | alert_schedule_id | event_id | target_category | message_id | alert_datetime | status_code | | healthngo1 | healthworker | 2 | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | 400 | | healthngo1 | healthworker | 1 | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | 403 | - | healthngo1 | healthworker | 2 | 12345 | subscriber | 1 | 2018-02-15T09:00:00| 404 | + | healthngo1 | healthworker | 2 | 12345 | subscriber | 1 | 2018-02-15T09:00:00 | 404 | From d67c49e034c6a6c0dd95d326e2532da59d5f8db5 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:22:06 +0530 Subject: [PATCH 39/47] Update updateappointmentnew.feature --- test/features/updateappointmentnew.feature | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/features/updateappointmentnew.feature b/test/features/updateappointmentnew.feature index 8459c33..8c61781 100644 --- a/test/features/updateappointmentnew.feature +++ b/test/features/updateappointmentnew.feature @@ -1,16 +1,15 @@ +@method=PUT @endpoint=/appointment/modifications/ Feature: Update an appointment details of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Update an appointment details for Scheduler API Smoke Test +Scenario: Update an appointment details for Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update an appointment details with its ID "4524453535" When an Update request for an endpoint /appointment/modifications/ is triggered to update existing appointment details for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update an appointment details for Scheduler API Unit and Regression Happy Testing @@ -33,7 +32,7 @@ Examples: | requestor_id | requestor_role | appointment_id | entity_id | entity_type | participant_type | participant_id | participant_entity_id | From | To | deadline | status_code | | healthngo1 | healthworker | 3456 | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-03-15T11:30:00 | 2018-02-15T11:10:00 | 400 | | healthngo1 | healthworker | 1 | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:45:00 | 2018-02-15T11:30:00 | 2018-02-15T11:10:00 | 403 | - | healthngo1 | healthworker | 12345 |1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-07-15T11:30:00 | 2018-02-15T11:10:00 | 404 | + | healthngo1 | healthworker | 12345 | 1 | doctor_consultation | subscriber | 12345 | 67890 | 2018-02-15T11:00:00 | 2018-07-15T11:30:00 | 2018-02-15T11:10:00 | 404 | From 30776a46b6c95513ad777d85e922b83d4e3ef79b Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:23:16 +0530 Subject: [PATCH 40/47] Update updateentitynew.feature --- test/features/updateentitynew.feature | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/test/features/updateentitynew.feature b/test/features/updateentitynew.feature index 69cbe5c..61fbd8d 100644 --- a/test/features/updateentitynew.feature +++ b/test/features/updateentitynew.feature @@ -1,27 +1,23 @@ +@method=PUT @endpoint=/entity/modifications/ Feature: Update an entity of Scheduler API Gherkin feature files for GovStack Scheduler services - @smoke -Scenario Outline: Update an entity for Scheduler API Smoke Test - +Scenario: Update an entity for Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update an entity with its ID "4524453535" When an Update request for an endpoint /entity/modifications/ is triggered to update existing entity for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update an entity for Scheduler API Unit and Regression Happy Testing Given the requestor id is "" with role as "" for an entity with Id "" to update an entity with name "" for "" with following details like "" "" with "" When an Update request for an endpoint /entity/modifications/ is triggered to update existing entity for scheduler block Then response code of Update request is "200" -Examples: - + Examples: - | requestor_id | requestor_role | entity_id | name | category | phone | email | website | - | healthngo1 | healthworker | 67890 |practo | hospital | 9980555504 | abc@gmail.com | www.abc.com | + | requestor_id | requestor_role | entity_id | name | category | phone | email | website | + | healthngo1 | healthworker | 67890 | practo | hospital | 9980555504| abc@gmail.com | www.abc.com | @unit @Negativeregression From 03ac6bb197f53708265cc41ceffbd73f6f2c9075 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:24:19 +0530 Subject: [PATCH 41/47] Update updateevent.feature --- test/features/updateevent.feature | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/test/features/updateevent.feature b/test/features/updateevent.feature index ecdcbad..ea12e54 100644 --- a/test/features/updateevent.feature +++ b/test/features/updateevent.feature @@ -1,24 +1,22 @@ +@method=PUT @endpoint=/event/modifications/ Feature: Update an event of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Update an event for Scheduler API Smoke Test +Scenario: Update an event for Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update an event with its ID "4524453535" When an Update request for an endpoint /event/modifications/ is triggered to update existing event for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update an event for Scheduler API Unit and Regression Happy Testing Given the requestor id is "" with role as "" for an event with Id "" to update an event with name "" "" "" for a period "" till "" for a venue in "" "" "" with "" "" When an Update request for an endpoint /event/modifications/ is triggered to update existing event for scheduler block Then response code of Update request is "200" -Examples: - + Examples: | requestor_id | requestor_role | event_id | name | category | host_entity_id | From | To | street | building | area | lat | long | | healthngoadmin1 | healthworker | 4524458935 | doctor_consultation | opd_physician_consultation | 67890 | 2018-02-15T11:00:00 | 2018-02-15T11:30:00 | 7th | xyx | wilsongarden | 0.1 | 0.2 | @@ -33,9 +31,9 @@ Then response code of negative testing an Update request for invalid data is " Date: Thu, 22 Jun 2023 17:25:00 +0530 Subject: [PATCH 42/47] Update updatelognew.feature --- test/features/updatelognew.feature | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/features/updatelognew.feature b/test/features/updatelognew.feature index 8aa5e81..ba1e173 100644 --- a/test/features/updatelognew.feature +++ b/test/features/updatelognew.feature @@ -1,23 +1,20 @@ +@method=PUT @endpoint=/log/modifications/ Feature: Update a log details of Scheduler API Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Update a log details of Scheduler API Smoke Test - +Scenario: Update a log details of Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update a log with its ID "1" When an Update request for an endpoint /log/modifications/ is triggered to update existing log details for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update a log details of Scheduler API Unit and Regression Happy Testing Given the requestor id is "" with role as "" for a log with Id "" to update a log details for role "" with its Id "" "" for category "" from time period of "" with data as "" When an Update request for an endpoint /log/modifications/ is triggered to update existing log details for scheduler block Then response code of Update request is "200" - Examples: | requestor_id | requestor_role | log_id | logger_role | logger_id | entity_id | log_category | datetime | log_data | | healthngo1 | healthworker | 1 | resource | 1 | 67890 | attendence | 2018-02-15T11:00:00 | event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended | From 81b4f6af860d18d6c639d2e45f529dad3061accd Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:25:46 +0530 Subject: [PATCH 43/47] Update updatemessagenew.feature --- test/features/updatemessagenew.feature | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/features/updatemessagenew.feature b/test/features/updatemessagenew.feature index 0c2799a..472e5b2 100644 --- a/test/features/updatemessagenew.feature +++ b/test/features/updatemessagenew.feature @@ -1,23 +1,19 @@ +@method=PUT @endpoint=/message/modifications/ Feature: Update a message of Scheduler API - Gherkin feature files for GovStack Scheduler services - @smoke -Scenario Outline: Update a message of Scheduler API Smoke Test +Scenario: Update a message of Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update a message with its ID "1" When an Update request for an endpoint /message/modifications/ is triggered to update existing message details for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update a message of Scheduler API Unit and Regression Happy Testing Given the requestor id is "" with role as "" for a message with Id "" to update a message details like "" "" and "" When an Update request for an endpoint /message/modifications/ is triggered to update existing message details for scheduler block Then response code of Update request is "200" - Examples: | requestor_id | requestor_role | message_id | entity_id | category | message_body | | healthngo1 | healthworker | 1 | 67890 | reminder | you have a doctor consultatio today | From f9eeb0216edb268d85a35bbad64cb569ad75e867 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:26:38 +0530 Subject: [PATCH 44/47] Update updateresourcenew.feature --- test/features/updateresourcenew.feature | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/features/updateresourcenew.feature b/test/features/updateresourcenew.feature index 90e8557..e0881d1 100644 --- a/test/features/updateresourcenew.feature +++ b/test/features/updateresourcenew.feature @@ -1,5 +1,5 @@ +@method=PUT @endpoint=/resource/modifications/ Feature: Update a resource of Scheduler API - Gherkin feature files for GovStack Scheduler services @smoke @@ -9,8 +9,6 @@ Given the requestor id is "healthngo1" with role as "healthworker" to update a r When an Update request for an endpoint /resource/modifications/ is triggered to update existing resource for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update a resource for Scheduler API Unit and Regression Happy Testing From bc1eff91888e70118e41df09d9d0d7f8cb81797a Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:27:29 +0530 Subject: [PATCH 45/47] Update updatesubscribernew.feature --- test/features/updatesubscribernew.feature | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/features/updatesubscribernew.feature b/test/features/updatesubscribernew.feature index cad000b..0e17c25 100644 --- a/test/features/updatesubscribernew.feature +++ b/test/features/updatesubscribernew.feature @@ -1,23 +1,19 @@ +@method=PUT @endpoint=/subscriber/modifications/ Feature: Update a subscriber details of Scheduler API - Gherkin feature files for GovStack Scheduler services @smoke -Scenario Outline: Update a subscriber details of Scheduler API Smoke Test - +Scenario: Update a subscriber details of Scheduler API Smoke Test Given the requestor id is "healthngo1" with role as "healthworker" to update a subscriber details with its ID "12345" When an Update request for an endpoint /subscriber/modifications/ is triggered to update existing subscriber details for scheduler block Then response code of Update request is "200" for smoke testing - - @unit @happyregression Scenario Outline: Update a subscriber details of Scheduler API Unit and Regression Happy Testing Given the requestor id is "" with role as "" for a subscriber with Id "" to update a subscriber details name "" for "" with following details like "" "" with "" having "" and "" When an Update request for an endpoint /subscriber/modifications/ is triggered to update existing subscriber details for scheduler block Then response code of Update request is "200" - Examples: | requestor_id | requestor_role | subscriber_id | name | category | phone | email | alert_url | alert_preference | status_poll_url | | healthngo1 | healthworker | 12345 |practo | hospital | 9980555504 | abc@gmail.com | www.abc.com | phone | www.abc.com | @@ -35,7 +31,7 @@ Examples: | healthngo1 | healthworker | hello | practo | hospital | 9980555504 | sree@gmail.com | wwww.alert.com | phone | www.abc.com | 400 | | healthngo1 | healthworker | 3456 | practo | education | 9980555504 | sree@gmail.com | www.alert.com | email | www.abc.com | 403 | | healthngo1 | healthworker | 1234 | practo | agriculture | 9980555504 | sree@gmail.com | www.alert.com | message | www.abc.com | 404 | - | healthngo1 | healthworker | 4567 | practo | agriculture | 9980555504 | sree@gmail.com | http://alert.com | phone | www.abc.com | 404 | + | healthngo1 | healthworker | 4567 | practo | agriculture | 9980555504 | sree@gmail.com | http://alert.com | phone | www.abc.com | 404 | From a2863d789dcbf03c356f445c367a8097ac932b44 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Sat, 22 Jul 2023 16:16:16 +0530 Subject: [PATCH 46/47] Create config.yml --- .circleci/config.yml | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..5e14187 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,47 @@ +version: 2.1 + +jobs: + deployment-and-api-tests: + machine: + image: ubuntu-2004:202010-01 + steps: + - checkout + - run: + name: 'Test Scheduler Build Block API' + command: 'echo testing all examples in /examples against test suite in /test' + - run: + name: Deploy Mock APP for Scheduler BB API and PyTest Containers + command: cd examples/mock && docker-compose up --build -d + - run: + name: Check Status of Mock App and API Testing Containers + command: docker ps + - run: + name: Testing Scheduler BB API + command: 'echo testing using containers' + - run: + name: Check Status of Testing Containers are Deployed + command: docker ps + - run: + name: Run Pytest tests against Register BB Mock to generate test result in Junit XML Format for Test Summary + command: docker exec -i pytest pytest -k smoke -s --junit-xml=/tmp/test-results/pytest-results.xml || true + - run: + name: Run cucumber tests against Register BB Mock to generate test result in JSON Format + command: docker exec -i pytest pytest -k smoke -s --json-report --json-report-indent=4 --json-report-file=/tmp/test-results/smoke_testing_report.json || true + - run: + name: Copy test results to host machine + command: docker cp pytest:/tmp/test-results /tmp + - store_test_results: + path: /tmp/test-results + prefix: junit- + destination: /test-results/ + - store_artifacts: + path: /tmp/test-results + +workflows: + deployment-and-api-tests: + jobs: + - deployment-and-api-tests: + filters: + branches: + only: + - main From 4c9de220a4ba19df4f8f8f699ab72da7a46b6243 Mon Sep 17 00:00:00 2001 From: sreepathysois <54054574+sreepathysois@users.noreply.github.com> Date: Sat, 22 Jul 2023 16:17:29 +0530 Subject: [PATCH 47/47] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e14187..13b0b8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,4 +44,5 @@ workflows: filters: branches: only: - - main + - mock_example +