From 11b6f590dfd66038dcb24acdb552adc8d03a8fc9 Mon Sep 17 00:00:00 2001 From: "kunal.sontakke" Date: Wed, 18 Sep 2024 19:06:47 +0530 Subject: [PATCH] changes done in all files -test scripts -Rest client (added Auto_save) -changes in save_json_to_file --- API_Requests/Data/Response_Body/get_data.json | 13 -- API_Requests/Lib/File_Operations.py | 30 +++- API_Requests/Lib/Rest_Client.py | 49 +++++-- API_Requests/Tests/test_delete_request.py | 9 +- API_Requests/Tests/test_get_request.py | 12 +- .../Tests/test_no_data_found_request.py | 11 +- API_Requests/Tests/test_post_data_request.py | 8 +- API_Requests/Tests/test_post_request.py | 8 +- API_Requests/Tests/test_put_request.py | 7 +- .../Tests/test_register_unsuccessful.py | 14 +- Logs/log_20240905_123259.log | 19 --- Logs/log_20240905_141551.log | 19 --- Logs/log_20240905_141835.log | 19 --- Logs/log_20240905_141908.log | 19 --- Logs/log_20240905_141937.log | 19 --- Logs/log_20240905_141945.log | 19 --- Logs/log_20240905_144405.log | 131 ----------------- Logs/log_20240905_144418.log | 131 ----------------- Logs/log_20240905_151553.log | 138 ------------------ Logs/log_20240905_151754.log | 138 ------------------ Logs/log_20240905_152213.log | 138 ------------------ Logs/log_20240905_154322.log | 20 --- Logs/log_20240905_154424.log | 20 --- Logs/log_20240905_154651.log | 138 ------------------ ...01-eb48-4ada-8ece-5db552612b96-result.json | 1 - ...38bf-44d3-9140-1c6d59b0864f-attachment.txt | 20 --- ...2029-4844-be40-65134db21569-container.json | 1 - ...655a-4f3c-82d0-c9b8be96901a-attachment.txt | 20 --- ...c8e5-4ebc-81cc-fe308b904a2a-attachment.txt | 20 --- ...22-9e67-42bb-86a2-6edca016f6c1-result.json | 1 - ...53-0837-42e9-a604-49a24071ed8d-result.json | 1 - ...3fc7-47ae-971a-b9382e210bc2-attachment.txt | 20 --- ...531b-4b40-b81a-966ed61337e8-attachment.txt | 20 --- ...9939-408c-88d1-4ef3b5efd67a-container.json | 1 - ...31-c961-4912-a207-a46693e23256-result.json | 1 - ...84ea-47ee-92a8-2319708dc768-container.json | 1 - ...7d-ea84-4138-8e32-cee846e6b2bd-result.json | 1 - ...2d-8698-4e61-8cf8-58fb9ae49027-result.json | 1 - ...e152-4f37-aa95-bd41fcddb8e7-attachment.txt | 19 --- ...54a8-40da-95fa-078d835ee1ff-container.json | 1 - ...64d5-475c-8f3f-ede4ba856a9d-attachment.txt | 19 --- ...208e-4f4b-ba7d-050c82ef4231-container.json | 1 - ...c2-c3b5-41ad-91fc-b3945d45aed4-result.json | 1 - ...9a01-4d38-8812-e7af990fe508-container.json | 1 - ...6d84-4bf2-b676-2a8c1aaced9b-container.json | 1 - Requirements/requirements.txt | 2 +- conf/config.ini | 5 + conf/logger.py | 23 ++- 48 files changed, 119 insertions(+), 1192 deletions(-) delete mode 100644 API_Requests/Data/Response_Body/get_data.json delete mode 100644 Logs/log_20240905_123259.log delete mode 100644 Logs/log_20240905_141551.log delete mode 100644 Logs/log_20240905_141835.log delete mode 100644 Logs/log_20240905_141908.log delete mode 100644 Logs/log_20240905_141937.log delete mode 100644 Logs/log_20240905_141945.log delete mode 100644 Logs/log_20240905_144405.log delete mode 100644 Logs/log_20240905_144418.log delete mode 100644 Logs/log_20240905_151553.log delete mode 100644 Logs/log_20240905_151754.log delete mode 100644 Logs/log_20240905_152213.log delete mode 100644 Logs/log_20240905_154322.log delete mode 100644 Logs/log_20240905_154424.log delete mode 100644 Logs/log_20240905_154651.log delete mode 100644 Reports/Allure_Reports/17aeb801-eb48-4ada-8ece-5db552612b96-result.json delete mode 100644 Reports/Allure_Reports/23d9e55b-38bf-44d3-9140-1c6d59b0864f-attachment.txt delete mode 100644 Reports/Allure_Reports/29a305ae-2029-4844-be40-65134db21569-container.json delete mode 100644 Reports/Allure_Reports/32aedb8a-655a-4f3c-82d0-c9b8be96901a-attachment.txt delete mode 100644 Reports/Allure_Reports/36edb3d7-c8e5-4ebc-81cc-fe308b904a2a-attachment.txt delete mode 100644 Reports/Allure_Reports/52681722-9e67-42bb-86a2-6edca016f6c1-result.json delete mode 100644 Reports/Allure_Reports/5853ce53-0837-42e9-a604-49a24071ed8d-result.json delete mode 100644 Reports/Allure_Reports/7aec0816-3fc7-47ae-971a-b9382e210bc2-attachment.txt delete mode 100644 Reports/Allure_Reports/7f364411-531b-4b40-b81a-966ed61337e8-attachment.txt delete mode 100644 Reports/Allure_Reports/825afacb-9939-408c-88d1-4ef3b5efd67a-container.json delete mode 100644 Reports/Allure_Reports/96f69c31-c961-4912-a207-a46693e23256-result.json delete mode 100644 Reports/Allure_Reports/99933b7a-84ea-47ee-92a8-2319708dc768-container.json delete mode 100644 Reports/Allure_Reports/a4b3837d-ea84-4138-8e32-cee846e6b2bd-result.json delete mode 100644 Reports/Allure_Reports/aff6372d-8698-4e61-8cf8-58fb9ae49027-result.json delete mode 100644 Reports/Allure_Reports/b165887c-e152-4f37-aa95-bd41fcddb8e7-attachment.txt delete mode 100644 Reports/Allure_Reports/c1496cde-54a8-40da-95fa-078d835ee1ff-container.json delete mode 100644 Reports/Allure_Reports/c6fb5d42-64d5-475c-8f3f-ede4ba856a9d-attachment.txt delete mode 100644 Reports/Allure_Reports/e50cb7b3-208e-4f4b-ba7d-050c82ef4231-container.json delete mode 100644 Reports/Allure_Reports/e61c76c2-c3b5-41ad-91fc-b3945d45aed4-result.json delete mode 100644 Reports/Allure_Reports/eb86f39f-9a01-4d38-8812-e7af990fe508-container.json delete mode 100644 Reports/Allure_Reports/fe8d3973-6d84-4bf2-b676-2a8c1aaced9b-container.json diff --git a/API_Requests/Data/Response_Body/get_data.json b/API_Requests/Data/Response_Body/get_data.json deleted file mode 100644 index a32fe54..0000000 --- a/API_Requests/Data/Response_Body/get_data.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "data": { - "id": 2, - "email": "janet.weaver@reqres.in", - "first_name": "Janet", - "last_name": "Weaver", - "avatar": "https://reqres.in/img/faces/2-image.jpg" - }, - "support": { - "url": "https://reqres.in/#support-heading", - "text": "To keep ReqRes free, contributions towards server costs are appreciated!" - } -} \ No newline at end of file diff --git a/API_Requests/Lib/File_Operations.py b/API_Requests/Lib/File_Operations.py index 15907a8..d0e8854 100644 --- a/API_Requests/Lib/File_Operations.py +++ b/API_Requests/Lib/File_Operations.py @@ -1,18 +1,23 @@ +import datetime import json import os.path -from conf.conftest import logger +from conf.logger import logger -def save_json_to_file(response,file_path,response_dir='API_Requests/Data/Response_Body'): + +def save_json_to_file(response,response_dir='API_Requests/Data/Response_Body'): """ Prepare the response data and save it to a JSON file. :param response_dir: The response directory where all response file will be stored :param response: The response data to be saved, can be a dict, list, tuple, or string. - :param file_path: Path to the file where the JSON data will be saved. """ + # Create a folder based on the current date + current_date = datetime.datetime.now().strftime("%Y_%m_%d") + date_folder_path = os.path.join(response_dir, current_date) + def handle_tuple(data): return data[0] @@ -33,16 +38,27 @@ def handle_dict(data): } try: + # Create the directory if it doesn't exist + os.makedirs(date_folder_path, exist_ok=True) + + # Prepare the timestamped file path + timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + full_file_path = os.path.join(date_folder_path, f"response_{timestamp}.json") + + + # Normalize the path for logging + full_path_normalized = full_file_path.replace(os.sep,'/') + # Select the handler based on the type of response handler = handler_mapping.get(type(response)) if not handler: raise TypeError("Unsupported response type") json_data = handler(response) + # Save the JSON data to the specified file - full_path = os.path.join(response_dir, file_path) - with open(full_path,'w') as file: - json.dump(json_data, file, indent=4, separators=(',',': ')) - logger.info(f"JSON data successfully saved to {full_path}") + with open(full_file_path, 'w') as file: + json.dump(json_data, file, indent=4, separators=(',', ': ')) + logger.info(f"JSON data successfully saved to {full_path_normalized}") except (json.JSONDecodeError, TypeError) as e: logger.error(f"An error occurred while preparing JSON data:{e}") raise e diff --git a/API_Requests/Lib/Rest_Client.py b/API_Requests/Lib/Rest_Client.py index b319eb2..01d5578 100644 --- a/API_Requests/Lib/Rest_Client.py +++ b/API_Requests/Lib/Rest_Client.py @@ -2,6 +2,7 @@ import requests import json from conf.logger import logGen +from API_Requests.Lib.File_Operations import save_json_to_file logger = logGen() @@ -19,7 +20,8 @@ def __init__(self, base_url, headers=None): def get_request(self, end_point=None, data=None, headers=None, json_data_fmt=False, params=None, fmt='json', - retries=0, response_with_status_code=False,verify=True): + retries=0, response_with_status_code=False,auto_save=False): + """ This method is to send 'Get' request :param end_point(str): API endpoint/url @@ -30,6 +32,7 @@ def get_request(self, end_point=None, data=None, headers=None, json_data_fmt=Fal :param fmt: used for return response type :param retries: :param response_with_status_code (bool): True if status code is required else false + :param auto_save (bool) : saves response into json file if True else False :return: """ @@ -47,19 +50,29 @@ def get_request(self, end_point=None, data=None, headers=None, json_data_fmt=Fal logger.info(f"Initializing GET rest call from {request_url}") get_response = self.http_session.get(request_url, params=params, headers=headers, data=data, verify=True) - logger.info(f"GET Response : {self.parse_response(get_response)}") + response_data = self.parse_response(get_response) + + logger.info(f"GET Response : {response_data}") logger.info(f"GET Request Status Code : {get_response.status_code}") + if get_response.status_code in self.success_status_code: logger.info("GET request is Successful.....") + + if auto_save: + save_json_to_file(response_data) + if fmt == "raw": return get_response + if response_with_status_code: return self.parse_response(get_response), get_response.status_code - return self.parse_response(get_response) + + return response_data else: logger.error(f"GET Request failed....!!!") logger.error(f"Response Error Message: {self.parse_response(get_response)}") return self.parse_response(get_response), get_response.status_code + except Exception as exc: if retries > 0: logger.info(f"GET request failed, retrying : {str(retries)} more times...") @@ -74,7 +87,7 @@ def get_request(self, end_point=None, data=None, headers=None, json_data_fmt=Fal def post_request(self, end_point, data=None, headers=None, json_data_fmt=False, params=None, - fmt='json', retries=1, response_with_status_code=False): + fmt='json', retries=1, response_with_status_code=False,auto_save=False): """ This method is used to send 'POST' Request :param end_point: API end point/url @@ -85,6 +98,7 @@ def post_request(self, end_point, data=None, headers=None, json_data_fmt=False, :param fmt(str) : Used for response type json or row :param retries: Number of Retires :param response_with_status_code(bool): True if status code is required else false + :param auto_save (bool) : saves response into json file if True else False :return: response of the request """ @@ -96,14 +110,18 @@ def post_request(self, end_point, data=None, headers=None, json_data_fmt=False, try: logger.info(f"Initializing POST rest call from {request_url}") post_response = self.http_session.post(request_url, params=params, headers=headers, data=data, verify=True) - logger.info(f"POST Response : {self.parse_response(post_response)}") + response_data = self.parse_response(post_response) + + logger.info(f"POST Response : {response_data}") logger.info(f"POST Request Status Code : {post_response.status_code}") if post_response.status_code in self.success_status_code: - logger.info(f"POST Request Status Code : {post_response.status_code}") - if post_response.status_code in self.success_status_code: logger.info("POST request is successful...") + if auto_save: + save_json_to_file(response_data) + if fmt == 'raw': return post_response + if response_with_status_code: return self.parse_response(post_response), post_response.status_code return self.parse_response(post_response) @@ -125,7 +143,7 @@ def post_request(self, end_point, data=None, headers=None, json_data_fmt=False, def put_request(self, end_point, data=None, headers=None, json_data_fmt=False, params=None, - fmt="json", response_with_status_code=False): + fmt="json", response_with_status_code=False,auto_save=False): """ This method is to send put request :param end_point (str): API endpoint/url @@ -135,6 +153,7 @@ def put_request(self, end_point, data=None, headers=None, json_data_fmt=False, p :param params (dict): parameters for a request :param fmt(str): Used for response type json or raw :param response_with_status_code (bool): True if status code os required else False + :param auto_save (bool) : saves response into json file if True else False :return: response of the request """ @@ -149,10 +168,16 @@ def put_request(self, end_point, data=None, headers=None, json_data_fmt=False, p logger.info(f"Initializing PUT rest call from {request_url}") put_response = self.http_session.put(request_url, params=params, headers=headers, data=data,verify=True) + response_data = self.parse_response(put_response) + logger.info(f"PUT Response : {self.parse_response(put_response)}") logger.info(f"PUT request Status code : {put_response.status_code}") + if put_response.status_code in self.success_status_code: logger.info("PUT request is successful.....") + + if auto_save: + save_json_to_file(response_data) if fmt == "raw": return put_response if response_with_status_code: @@ -168,7 +193,7 @@ def put_request(self, end_point, data=None, headers=None, json_data_fmt=False, p def delete_request(self, end_point, data=None, headers=None, json_data_fmt=None, params=None, - fmt="json", response_with_status_code=False): + fmt="json", response_with_status_code=False,auto_save=False): """ This method is to send delete request :param end_point (str): API endpoint/URL @@ -178,6 +203,7 @@ def delete_request(self, end_point, data=None, headers=None, json_data_fmt=None, :param params: Used for response type json or raw :param fmt: :param response_with_status_coode (bool): True if Status code os required else False + :param auto_save (bool) : saves response into json file if True else False :return: Response of the request """ @@ -189,10 +215,15 @@ def delete_request(self, end_point, data=None, headers=None, json_data_fmt=None, try: logger.info(f"Initializing DELETE REST call from {request_url}") delete_response = self.http_session.delete(request_url, params=params, headers=headers, data=data,verify=True) + response_data = self.parse_response(delete_response) + logger.info(f"DELETE Response : {self.parse_response(delete_response)}") logger.info(f"DELETE request Status code : {delete_response.status_code}") + if delete_response.status_code in self.success_status_code: logger.info(f"DELETE request is successful....") + if auto_save: + save_json_to_file(response_data) if fmt == "raw": return delete_response if response_with_status_code: diff --git a/API_Requests/Tests/test_delete_request.py b/API_Requests/Tests/test_delete_request.py index f12dec2..d9311c4 100644 --- a/API_Requests/Tests/test_delete_request.py +++ b/API_Requests/Tests/test_delete_request.py @@ -1,9 +1,8 @@ from API_Requests.Lib.Rest_Client import RestClient from conf.config import get_config -from conf.logger import logGen +from conf.logger import logger from conf.conftest import setup_teardown -logging = logGen() class Test_004: @@ -11,14 +10,16 @@ def test_004(self,setup_teardown): """Test to resource is deleted from Backend """ self.base_url = get_config()['API']['base_url'] self.client = RestClient(self.base_url) + self.endpoint = get_config()['API']['delete_endpoint'] self.headers = { 'Content-Type':'application/json' } - logging.info("*********** executing test_004 ****************") + logger.info("*********** executing test_004 ****************") # send delete request - delete_request,status_code = self.client.delete_request(end_point="objects/6",headers=self.headers,json_data_fmt=True,response_with_status_code=True) + delete_request,status_code = self.client.delete_request(end_point="objects/6",headers=self.headers, + json_data_fmt=True,response_with_status_code=True,auto_save=True) # verify to get response assert delete_request is not None, "DELETE request returned None" diff --git a/API_Requests/Tests/test_get_request.py b/API_Requests/Tests/test_get_request.py index 241c959..54040cc 100644 --- a/API_Requests/Tests/test_get_request.py +++ b/API_Requests/Tests/test_get_request.py @@ -1,11 +1,7 @@ from API_Requests.Lib.Rest_Client import RestClient from conf.config import get_config -from conf.logger import logGen +from conf.logger import logger from conf.conftest import setup_teardown -from API_Requests.Lib.File_Operations import save_json_to_file - - -logger = logGen() class Test_001: @@ -15,6 +11,7 @@ def test_001(self,setup_teardown): self.base_url = get_config()['API']['base_url'] self.client = RestClient(self.base_url) + self.endpoint = get_config()['API']['get_endpoint'] self.headers = { 'Content-Type' : 'application/json' @@ -23,12 +20,11 @@ def test_001(self,setup_teardown): logger.info("*********** executing test_001 ****************") # send get request - get_request,status_code = self.client.get_request(end_point="users/2", headers=self.headers,response_with_status_code=True,json_data_fmt=True) + get_request,status_code = self.client.get_request(end_point= self.endpoint, headers=self.headers, + response_with_status_code=True,json_data_fmt=True,auto_save=True) # verify response is not None (json) assert get_request is not None, "GET request returned None" logger.info(f"type of json response : {type(self.client.parse_response(get_request))}") - # saving response into json file - save_json_to_file(get_request,'get_data.json') diff --git a/API_Requests/Tests/test_no_data_found_request.py b/API_Requests/Tests/test_no_data_found_request.py index e896909..cabcd9d 100644 --- a/API_Requests/Tests/test_no_data_found_request.py +++ b/API_Requests/Tests/test_no_data_found_request.py @@ -1,12 +1,10 @@ from API_Requests.Lib.Rest_Client import RestClient, logger from conf.config import get_config -from conf.logger import logGen +from conf.logger import logger from conf.conftest import setup_teardown from API_Requests.Lib.File_Operations import save_json_to_file -logging = logGen() - class Test_001: def test_001(self,setup_teardown): @@ -20,12 +18,13 @@ def test_001(self,setup_teardown): 'Content-Type' : 'application/json' } - logging.info("*********** executing test_001 ****************") + logger.info("*********** executing test_006 ****************") - get_request,status_code = self.client.get_request(end_point="unknown/23", headers=self.headers,response_with_status_code=True,json_data_fmt=True) + get_request,status_code = self.client.get_request(end_point="unknown/23", headers=self.headers, + response_with_status_code=True,json_data_fmt=True,auto_save=True) assert get_request is not None, "GET request returned None" logger.info(f"type of json response : {type(self.client.parse_response(get_request))}") assert status_code == 200 - save_json_to_file(get_request,'get_data.json') + save_json_to_file(get_request) diff --git a/API_Requests/Tests/test_post_data_request.py b/API_Requests/Tests/test_post_data_request.py index 9dc5508..c2c9bb4 100644 --- a/API_Requests/Tests/test_post_data_request.py +++ b/API_Requests/Tests/test_post_data_request.py @@ -1,11 +1,9 @@ from API_Requests.Lib.Rest_Client import RestClient from conf.config import get_config -from conf.logger import logGen +from conf.logger import logger from conf.conftest import setup_teardown from API_Requests.Lib.File_Operations import read_json_from_file -logger = logGen() - class Test_005: def test_005(self,setup_teardown): @@ -13,6 +11,7 @@ def test_005(self,setup_teardown): self.base_url = get_config()['API']['base_url'] self.client = RestClient(self.base_url) + self.endpoint = get_config()['API']['post_endpoint'] self.json = read_json_from_file('post_data.json') self.headers = { @@ -21,6 +20,7 @@ def test_005(self,setup_teardown): logger.info("*********** executing test_005 ****************") - post_request = self.client.post_request(end_point="users",data=self.json,headers=self.headers,json_data_fmt=True,response_with_status_code=True) + post_request = self.client.post_request(end_point=self.endpoint,data=self.json,headers=self.headers, + json_data_fmt=True,response_with_status_code=True,auto_save=True) assert post_request is not None, "POST request returned None" diff --git a/API_Requests/Tests/test_post_request.py b/API_Requests/Tests/test_post_request.py index 45816ba..7b87175 100644 --- a/API_Requests/Tests/test_post_request.py +++ b/API_Requests/Tests/test_post_request.py @@ -1,10 +1,8 @@ from API_Requests.Lib.Rest_Client import RestClient from conf.config import get_config -from conf.logger import logGen +from conf.logger import logger from conf.conftest import setup_teardown -logger = logGen() - class Test_002: def test_002(self,setup_teardown): @@ -12,6 +10,7 @@ def test_002(self,setup_teardown): self.base_url = get_config()['API']['base_url'] self.client = RestClient(self.base_url) + self.endpoint = get_config()['API']['post_endpoint'] self.json = { "name": "morpheus", "job": "leader" @@ -25,7 +24,8 @@ def test_002(self,setup_teardown): logger.info("*********** executing test_002 ****************") # send post request - post_request = self.client.post_request(end_point="users", data=self.json, json_data_fmt=True, response_with_status_code=True,headers=headers) + post_request = self.client.post_request(end_point=self.endpoint, data=self.json, + json_data_fmt=True, response_with_status_code=True,headers=headers,auto_save=True) # verify response assert post_request is not None, "POST request returned None" diff --git a/API_Requests/Tests/test_put_request.py b/API_Requests/Tests/test_put_request.py index 89a3fff..8b861bf 100644 --- a/API_Requests/Tests/test_put_request.py +++ b/API_Requests/Tests/test_put_request.py @@ -1,15 +1,15 @@ from API_Requests.Lib.Rest_Client import RestClient from conf.config import get_config -from conf.logger import logGen +from conf.logger import logger from conf.conftest import setup_teardown from API_Requests.Lib.File_Operations import read_json_from_file -logger = logGen() class Test_003: def test_003(self,setup_teardown): self.base_url = get_config()['API']['base_url'] self.client = RestClient(self.base_url) + self.endpoint = get_config()['API']['put_endpoint'] self.json = read_json_from_file('put_data.json') self.headers = { @@ -18,6 +18,7 @@ def test_003(self,setup_teardown): logger.info("*********** executing test_003 ****************") - put_request = self.client.put_request(end_point="users/2",data=self.json,headers=self.headers, json_data_fmt=True,response_with_status_code=True) + put_request = self.client.put_request(end_point=self.endpoint,data=self.json, + headers=self.headers, json_data_fmt=True,response_with_status_code=True,auto_save=True) assert put_request is not None, "PUT request returned None" diff --git a/API_Requests/Tests/test_register_unsuccessful.py b/API_Requests/Tests/test_register_unsuccessful.py index a126935..04054d5 100644 --- a/API_Requests/Tests/test_register_unsuccessful.py +++ b/API_Requests/Tests/test_register_unsuccessful.py @@ -1,12 +1,7 @@ -from jinja2.nodes import Assign - from API_Requests.Lib.Rest_Client import RestClient from conf.config import get_config -from conf.logger import logGen +from conf.logger import logger from conf.conftest import setup_teardown -from API_Requests.Lib.File_Operations import read_json_from_file - -logger = logGen() class Test_007: @@ -15,6 +10,7 @@ def test_007(self,setup_teardown): self.base_url = get_config()['API']['base_url'] self.client = RestClient(self.base_url) + self.endpoint = get_config()['API']['register_endpoint'] self.json = { "email": "sydney@fife" } @@ -25,7 +21,9 @@ def test_007(self,setup_teardown): logger.info("*********** executing test_007 ****************") - post_request,status_code = self.client.post_request(end_point="register",data=self.json,headers=self.headers,json_data_fmt=True,response_with_status_code=True) + post_request,status_code = self.client.post_request(end_point=self.endpoint,data=self.json,headers=self.headers, + json_data_fmt=True,response_with_status_code=True,auto_save=True) assert post_request is not None, "POST request returned None" - assert status_code == 201 \ No newline at end of file + assert status_code == 201 + diff --git a/Logs/log_20240905_123259.log b/Logs/log_20240905_123259.log deleted file mode 100644 index fc3d1f5..0000000 --- a/Logs/log_20240905_123259.log +++ /dev/null @@ -1,19 +0,0 @@ -2024-09-05 12:32:59,251 INFO ===================Setup Initialised======================== -2024-09-05 12:32:59,251 INFO creating driver instance created -2024-09-05 12:32:59,267 INFO Base url is : https://reqres.in/api/ -2024-09-05 12:32:59,267 INFO ===================Setup Completed========================== -2024-09-05 12:32:59,267 INFO Base url is : https://reqres.in/api/ -2024-09-05 12:32:59,267 INFO *********** executing test_001 **************** -2024-09-05 12:32:59,267 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 12:32:59,267 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 12:32:59,394 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 12:32:59,394 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 12:32:59,394 INFO GET Request Status Code : 200 -2024-09-05 12:32:59,394 INFO GET request is Successful..... -2024-09-05 12:32:59,394 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 12:32:59,394 INFO type of json response : -2024-09-05 12:32:59,394 INFO JSON data successfully saved to get_data.json -2024-09-05 12:32:59,394 INFO ===================Teardown Initialised===================== -2024-09-05 12:32:59,394 INFO Clean-up started -2024-09-05 12:32:59,394 INFO clean completed -2024-09-05 12:32:59,394 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_141551.log b/Logs/log_20240905_141551.log deleted file mode 100644 index fa072bf..0000000 --- a/Logs/log_20240905_141551.log +++ /dev/null @@ -1,19 +0,0 @@ -2024-09-05 14:15:51,763 INFO ===================Setup Initialised======================== -2024-09-05 14:15:51,763 INFO creating driver instance created -2024-09-05 14:15:51,763 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:15:51,763 INFO ===================Setup Completed========================== -2024-09-05 14:15:51,763 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:15:51,763 INFO *********** executing test_001 **************** -2024-09-05 14:15:51,763 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 14:15:51,763 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 14:15:51,921 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 14:15:51,921 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 14:15:51,921 INFO GET Request Status Code : 200 -2024-09-05 14:15:51,921 INFO GET request is Successful..... -2024-09-05 14:15:51,921 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 14:15:51,921 INFO type of json response : -2024-09-05 14:15:51,921 INFO JSON data successfully saved to API_Requests/Data/Response_Body\get_data.json -2024-09-05 14:15:51,921 INFO ===================Teardown Initialised===================== -2024-09-05 14:15:51,921 INFO Clean-up started -2024-09-05 14:15:51,921 INFO clean completed -2024-09-05 14:15:51,921 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_141835.log b/Logs/log_20240905_141835.log deleted file mode 100644 index 5246dcf..0000000 --- a/Logs/log_20240905_141835.log +++ /dev/null @@ -1,19 +0,0 @@ -2024-09-05 14:18:35,943 INFO ===================Setup Initialised======================== -2024-09-05 14:18:35,943 INFO creating driver instance created -2024-09-05 14:18:35,943 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:18:35,943 INFO ===================Setup Completed========================== -2024-09-05 14:18:35,954 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:18:35,954 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 14:18:35,954 INFO *********** executing test_005 **************** -2024-09-05 14:18:35,954 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:18:35,971 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:18:36,421 INFO Response JSON : {"name":"morpheus","job":"leader","id":"402","createdAt":"2024-09-05T08:47:03.680Z"} -2024-09-05 14:18:36,421 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '402', 'createdAt': '2024-09-05T08:47:03.680Z'} -2024-09-05 14:18:36,421 INFO POST Request Status Code : 201 -2024-09-05 14:18:36,421 INFO POST Request Status Code : 201 -2024-09-05 14:18:36,421 INFO POST request is successful... -2024-09-05 14:18:36,421 INFO Response JSON : {"name":"morpheus","job":"leader","id":"402","createdAt":"2024-09-05T08:47:03.680Z"} -2024-09-05 14:18:36,426 INFO ===================Teardown Initialised===================== -2024-09-05 14:18:36,426 INFO Clean-up started -2024-09-05 14:18:36,426 INFO clean completed -2024-09-05 14:18:36,426 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_141908.log b/Logs/log_20240905_141908.log deleted file mode 100644 index e134f03..0000000 --- a/Logs/log_20240905_141908.log +++ /dev/null @@ -1,19 +0,0 @@ -2024-09-05 14:19:08,636 INFO ===================Setup Initialised======================== -2024-09-05 14:19:08,636 INFO creating driver instance created -2024-09-05 14:19:08,636 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:19:08,645 INFO ===================Setup Completed========================== -2024-09-05 14:19:08,645 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:19:08,645 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 14:19:08,645 INFO *********** executing test_005 **************** -2024-09-05 14:19:08,645 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:19:08,663 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:19:09,091 INFO Response JSON : {"name":"morpheus","job":"leader","id":"230","createdAt":"2024-09-05T08:47:36.372Z"} -2024-09-05 14:19:09,091 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '230', 'createdAt': '2024-09-05T08:47:36.372Z'} -2024-09-05 14:19:09,091 INFO POST Request Status Code : 201 -2024-09-05 14:19:09,091 INFO POST Request Status Code : 201 -2024-09-05 14:19:09,091 INFO POST request is successful... -2024-09-05 14:19:09,091 INFO Response JSON : {"name":"morpheus","job":"leader","id":"230","createdAt":"2024-09-05T08:47:36.372Z"} -2024-09-05 14:19:09,091 INFO ===================Teardown Initialised===================== -2024-09-05 14:19:09,091 INFO Clean-up started -2024-09-05 14:19:09,091 INFO clean completed -2024-09-05 14:19:09,091 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_141937.log b/Logs/log_20240905_141937.log deleted file mode 100644 index 498a8d1..0000000 --- a/Logs/log_20240905_141937.log +++ /dev/null @@ -1,19 +0,0 @@ -2024-09-05 14:19:37,369 INFO ===================Setup Initialised======================== -2024-09-05 14:19:37,369 INFO creating driver instance created -2024-09-05 14:19:37,369 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:19:37,369 INFO ===================Setup Completed========================== -2024-09-05 14:19:37,369 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:19:37,378 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 14:19:37,378 INFO *********** executing test_005 **************** -2024-09-05 14:19:37,378 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:19:37,378 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:19:37,854 INFO Response JSON : {"name":"morpheus","job":"leader","id":"1","createdAt":"2024-09-05T08:48:05.086Z"} -2024-09-05 14:19:37,854 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '1', 'createdAt': '2024-09-05T08:48:05.086Z'} -2024-09-05 14:19:37,854 INFO POST Request Status Code : 201 -2024-09-05 14:19:37,854 INFO POST Request Status Code : 201 -2024-09-05 14:19:37,854 INFO POST request is successful... -2024-09-05 14:19:37,854 INFO Response JSON : {"name":"morpheus","job":"leader","id":"1","createdAt":"2024-09-05T08:48:05.086Z"} -2024-09-05 14:19:37,854 INFO ===================Teardown Initialised===================== -2024-09-05 14:19:37,854 INFO Clean-up started -2024-09-05 14:19:37,854 INFO clean completed -2024-09-05 14:19:37,854 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_141945.log b/Logs/log_20240905_141945.log deleted file mode 100644 index cae81eb..0000000 --- a/Logs/log_20240905_141945.log +++ /dev/null @@ -1,19 +0,0 @@ -2024-09-05 14:19:45,962 INFO ===================Setup Initialised======================== -2024-09-05 14:19:45,962 INFO creating driver instance created -2024-09-05 14:19:45,962 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:19:45,962 INFO ===================Setup Completed========================== -2024-09-05 14:19:45,962 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:19:45,962 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 14:19:45,962 INFO *********** executing test_005 **************** -2024-09-05 14:19:45,962 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:19:45,983 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:19:46,357 INFO Response JSON : {"name":"morpheus","job":"leader","id":"444","createdAt":"2024-09-05T08:48:13.662Z"} -2024-09-05 14:19:46,357 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '444', 'createdAt': '2024-09-05T08:48:13.662Z'} -2024-09-05 14:19:46,357 INFO POST Request Status Code : 201 -2024-09-05 14:19:46,357 INFO POST Request Status Code : 201 -2024-09-05 14:19:46,357 INFO POST request is successful... -2024-09-05 14:19:46,357 INFO Response JSON : {"name":"morpheus","job":"leader","id":"444","createdAt":"2024-09-05T08:48:13.662Z"} -2024-09-05 14:19:46,357 INFO ===================Teardown Initialised===================== -2024-09-05 14:19:46,357 INFO Clean-up started -2024-09-05 14:19:46,357 INFO clean completed -2024-09-05 14:19:46,357 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_144405.log b/Logs/log_20240905_144405.log deleted file mode 100644 index 7c4e272..0000000 --- a/Logs/log_20240905_144405.log +++ /dev/null @@ -1,131 +0,0 @@ -2024-09-05 14:44:05,780 INFO ===================Setup Initialised======================== -2024-09-05 14:44:05,780 INFO creating driver instance created -2024-09-05 14:44:05,780 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:05,780 INFO ===================Setup Completed========================== -2024-09-05 14:44:05,780 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:05,788 INFO *********** executing test_004 **************** -2024-09-05 14:44:05,788 INFO Request url is : https://reqres.in/api/objects/6 -2024-09-05 14:44:05,788 INFO Initializing DELETE REST call from https://reqres.in/api/objects/6 -2024-09-05 14:44:06,302 ERROR Unknown content type or empty response. -2024-09-05 14:44:06,302 INFO DELETE Response : None -2024-09-05 14:44:06,302 INFO DELETE request Status code : 400 -2024-09-05 14:44:06,302 ERROR PUT request Failed...!!! -2024-09-05 14:44:06,302 ERROR Unknown content type or empty response. -2024-09-05 14:44:06,302 ERROR Response Error Message: None -2024-09-05 14:44:06,302 ERROR Unknown content type or empty response. -2024-09-05 14:44:06,302 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:06,302 INFO Clean-up started -2024-09-05 14:44:06,302 INFO clean completed -2024-09-05 14:44:06,302 INFO ===================Teardown Completed======================= -2024-09-05 14:44:06,302 INFO ===================Setup Initialised======================== -2024-09-05 14:44:06,302 INFO creating driver instance created -2024-09-05 14:44:06,311 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:06,311 INFO ===================Setup Completed========================== -2024-09-05 14:44:06,311 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:06,311 INFO *********** executing test_001 **************** -2024-09-05 14:44:06,311 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 14:44:06,311 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 14:44:06,397 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 14:44:06,397 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 14:44:06,397 INFO GET Request Status Code : 200 -2024-09-05 14:44:06,397 INFO GET request is Successful..... -2024-09-05 14:44:06,397 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 14:44:06,397 INFO type of json response : -2024-09-05 14:44:06,397 INFO JSON data successfully saved toAPI_Requests/Data/Request_Body\get_data.json -2024-09-05 14:44:06,397 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:06,407 INFO Clean-up started -2024-09-05 14:44:06,407 INFO clean completed -2024-09-05 14:44:06,407 INFO ===================Teardown Completed======================= -2024-09-05 14:44:06,407 INFO ===================Setup Initialised======================== -2024-09-05 14:44:06,407 INFO creating driver instance created -2024-09-05 14:44:06,407 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:06,407 INFO ===================Setup Completed========================== -2024-09-05 14:44:06,407 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:06,407 INFO *********** executing test_001 **************** -2024-09-05 14:44:06,407 INFO Request url is : https://reqres.in/api/unknown/23 -2024-09-05 14:44:06,407 INFO Initializing GET rest call from https://reqres.in/api/unknown/23 -2024-09-05 14:44:06,904 ERROR Unknown content type or empty response. -2024-09-05 14:44:06,919 INFO GET Response : None -2024-09-05 14:44:06,919 INFO GET Request Status Code : 400 -2024-09-05 14:44:06,919 ERROR GET Request failed....!!! -2024-09-05 14:44:06,919 ERROR Unknown content type or empty response. -2024-09-05 14:44:06,919 ERROR Response Error Message: None -2024-09-05 14:44:06,919 ERROR Unknown content type or empty response. -2024-09-05 14:44:07,030 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:07,030 INFO Clean-up started -2024-09-05 14:44:07,030 INFO clean completed -2024-09-05 14:44:07,030 INFO ===================Teardown Completed======================= -2024-09-05 14:44:07,030 INFO ===================Setup Initialised======================== -2024-09-05 14:44:07,030 INFO creating driver instance created -2024-09-05 14:44:07,030 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:07,030 INFO ===================Setup Completed========================== -2024-09-05 14:44:07,030 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:07,045 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 14:44:07,045 INFO *********** executing test_005 **************** -2024-09-05 14:44:07,045 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:44:07,045 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:44:07,620 INFO Response JSON : {"name":"morpheus","job":"leader","id":"887","createdAt":"2024-09-05T09:12:34.853Z"} -2024-09-05 14:44:07,635 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '887', 'createdAt': '2024-09-05T09:12:34.853Z'} -2024-09-05 14:44:07,635 INFO POST Request Status Code : 201 -2024-09-05 14:44:07,635 INFO POST Request Status Code : 201 -2024-09-05 14:44:07,635 INFO POST request is successful... -2024-09-05 14:44:07,635 INFO Response JSON : {"name":"morpheus","job":"leader","id":"887","createdAt":"2024-09-05T09:12:34.853Z"} -2024-09-05 14:44:07,635 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:07,635 INFO Clean-up started -2024-09-05 14:44:07,635 INFO clean completed -2024-09-05 14:44:07,635 INFO ===================Teardown Completed======================= -2024-09-05 14:44:07,635 INFO ===================Setup Initialised======================== -2024-09-05 14:44:07,635 INFO creating driver instance created -2024-09-05 14:44:07,635 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:07,635 INFO ===================Setup Completed========================== -2024-09-05 14:44:07,635 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:07,651 INFO *********** executing test_002 **************** -2024-09-05 14:44:07,651 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:44:07,651 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:44:08,147 INFO Response JSON : {"name":"morpheus","job":"leader","id":"571","createdAt":"2024-09-05T09:12:35.376Z"} -2024-09-05 14:44:08,147 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '571', 'createdAt': '2024-09-05T09:12:35.376Z'} -2024-09-05 14:44:08,147 INFO POST Request Status Code : 201 -2024-09-05 14:44:08,147 INFO POST Request Status Code : 201 -2024-09-05 14:44:08,147 INFO POST request is successful... -2024-09-05 14:44:08,147 INFO Response JSON : {"name":"morpheus","job":"leader","id":"571","createdAt":"2024-09-05T09:12:35.376Z"} -2024-09-05 14:44:08,147 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:08,154 INFO Clean-up started -2024-09-05 14:44:08,154 INFO clean completed -2024-09-05 14:44:08,154 INFO ===================Teardown Completed======================= -2024-09-05 14:44:08,154 INFO ===================Setup Initialised======================== -2024-09-05 14:44:08,154 INFO creating driver instance created -2024-09-05 14:44:08,161 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:08,161 INFO ===================Setup Completed========================== -2024-09-05 14:44:08,167 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:08,167 INFO JSON data successfully read from API_Requests/Data/Request_Body\put_data.json -2024-09-05 14:44:08,167 INFO *********** executing test_003 **************** -2024-09-05 14:44:08,167 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 14:44:08,167 INFO Initializing PUT rest call from https://reqres.in/api/users/2 -2024-09-05 14:44:08,664 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:12:35.871Z"} -2024-09-05 14:44:08,664 INFO PUT Response : {'name': 'morpheus', 'job': 'zion resident', 'updatedAt': '2024-09-05T09:12:35.871Z'} -2024-09-05 14:44:08,664 INFO PUT request Status code : 200 -2024-09-05 14:44:08,664 INFO PUT request is successful..... -2024-09-05 14:44:08,664 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:12:35.871Z"} -2024-09-05 14:44:08,664 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:08,664 INFO Clean-up started -2024-09-05 14:44:08,664 INFO clean completed -2024-09-05 14:44:08,664 INFO ===================Teardown Completed======================= -2024-09-05 14:44:08,664 INFO ===================Setup Initialised======================== -2024-09-05 14:44:08,664 INFO creating driver instance created -2024-09-05 14:44:08,679 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:08,679 INFO ===================Setup Completed========================== -2024-09-05 14:44:08,681 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:08,684 INFO *********** executing test_007 **************** -2024-09-05 14:44:08,684 INFO Request url is : https://reqres.in/api/register -2024-09-05 14:44:08,684 INFO Initializing POST rest call from https://reqres.in/api/register -2024-09-05 14:44:09,157 INFO Response JSON : {"error":"Missing password"} -2024-09-05 14:44:09,157 INFO POST Response : {'error': 'Missing password'} -2024-09-05 14:44:09,157 INFO POST Request Status Code : 400 -2024-09-05 14:44:09,157 ERROR POST Request Failed -2024-09-05 14:44:09,157 INFO Response JSON : {"error":"Missing password"} -2024-09-05 14:44:09,157 ERROR Response Error message: {'error': 'Missing password'} -2024-09-05 14:44:09,157 INFO Response JSON : {"error":"Missing password"} -2024-09-05 14:44:09,184 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:09,184 INFO Clean-up started -2024-09-05 14:44:09,184 INFO clean completed -2024-09-05 14:44:09,188 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_144418.log b/Logs/log_20240905_144418.log deleted file mode 100644 index 72a4b36..0000000 --- a/Logs/log_20240905_144418.log +++ /dev/null @@ -1,131 +0,0 @@ -2024-09-05 14:44:18,580 INFO ===================Setup Initialised======================== -2024-09-05 14:44:18,580 INFO creating driver instance created -2024-09-05 14:44:18,580 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:18,580 INFO ===================Setup Completed========================== -2024-09-05 14:44:18,580 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:18,580 INFO *********** executing test_004 **************** -2024-09-05 14:44:18,580 INFO Request url is : https://reqres.in/api/objects/6 -2024-09-05 14:44:18,580 INFO Initializing DELETE REST call from https://reqres.in/api/objects/6 -2024-09-05 14:44:19,102 ERROR Unknown content type or empty response. -2024-09-05 14:44:19,103 INFO DELETE Response : None -2024-09-05 14:44:19,103 INFO DELETE request Status code : 400 -2024-09-05 14:44:19,103 ERROR PUT request Failed...!!! -2024-09-05 14:44:19,103 ERROR Unknown content type or empty response. -2024-09-05 14:44:19,103 ERROR Response Error Message: None -2024-09-05 14:44:19,103 ERROR Unknown content type or empty response. -2024-09-05 14:44:19,103 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:19,103 INFO Clean-up started -2024-09-05 14:44:19,103 INFO clean completed -2024-09-05 14:44:19,103 INFO ===================Teardown Completed======================= -2024-09-05 14:44:19,103 INFO ===================Setup Initialised======================== -2024-09-05 14:44:19,103 INFO creating driver instance created -2024-09-05 14:44:19,103 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:19,103 INFO ===================Setup Completed========================== -2024-09-05 14:44:19,103 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:19,103 INFO *********** executing test_001 **************** -2024-09-05 14:44:19,103 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 14:44:19,119 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 14:44:19,202 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 14:44:19,213 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 14:44:19,213 INFO GET Request Status Code : 200 -2024-09-05 14:44:19,213 INFO GET request is Successful..... -2024-09-05 14:44:19,213 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 14:44:19,213 INFO type of json response : -2024-09-05 14:44:19,213 INFO JSON data successfully saved toAPI_Requests/Data/Request_Body\get_data.json -2024-09-05 14:44:19,213 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:19,213 INFO Clean-up started -2024-09-05 14:44:19,213 INFO clean completed -2024-09-05 14:44:19,213 INFO ===================Teardown Completed======================= -2024-09-05 14:44:19,213 INFO ===================Setup Initialised======================== -2024-09-05 14:44:19,213 INFO creating driver instance created -2024-09-05 14:44:19,213 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:19,213 INFO ===================Setup Completed========================== -2024-09-05 14:44:19,229 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:19,229 INFO *********** executing test_001 **************** -2024-09-05 14:44:19,229 INFO Request url is : https://reqres.in/api/unknown/23 -2024-09-05 14:44:19,229 INFO Initializing GET rest call from https://reqres.in/api/unknown/23 -2024-09-05 14:44:19,740 ERROR Unknown content type or empty response. -2024-09-05 14:44:19,740 INFO GET Response : None -2024-09-05 14:44:19,740 INFO GET Request Status Code : 400 -2024-09-05 14:44:19,755 ERROR GET Request failed....!!! -2024-09-05 14:44:19,755 ERROR Unknown content type or empty response. -2024-09-05 14:44:19,757 ERROR Response Error Message: None -2024-09-05 14:44:19,758 ERROR Unknown content type or empty response. -2024-09-05 14:44:19,851 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:19,866 INFO Clean-up started -2024-09-05 14:44:19,867 INFO clean completed -2024-09-05 14:44:19,867 INFO ===================Teardown Completed======================= -2024-09-05 14:44:19,867 INFO ===================Setup Initialised======================== -2024-09-05 14:44:19,867 INFO creating driver instance created -2024-09-05 14:44:19,867 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:19,867 INFO ===================Setup Completed========================== -2024-09-05 14:44:19,867 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:19,873 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 14:44:19,873 INFO *********** executing test_005 **************** -2024-09-05 14:44:19,873 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:44:19,873 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:44:20,431 INFO Response JSON : {"name":"morpheus","job":"leader","id":"289","createdAt":"2024-09-05T09:12:47.616Z"} -2024-09-05 14:44:20,431 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '289', 'createdAt': '2024-09-05T09:12:47.616Z'} -2024-09-05 14:44:20,431 INFO POST Request Status Code : 201 -2024-09-05 14:44:20,431 INFO POST Request Status Code : 201 -2024-09-05 14:44:20,431 INFO POST request is successful... -2024-09-05 14:44:20,431 INFO Response JSON : {"name":"morpheus","job":"leader","id":"289","createdAt":"2024-09-05T09:12:47.616Z"} -2024-09-05 14:44:20,431 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:20,431 INFO Clean-up started -2024-09-05 14:44:20,437 INFO clean completed -2024-09-05 14:44:20,437 INFO ===================Teardown Completed======================= -2024-09-05 14:44:20,437 INFO ===================Setup Initialised======================== -2024-09-05 14:44:20,437 INFO creating driver instance created -2024-09-05 14:44:20,437 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:20,437 INFO ===================Setup Completed========================== -2024-09-05 14:44:20,437 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:20,437 INFO *********** executing test_002 **************** -2024-09-05 14:44:20,437 INFO Request url is : https://reqres.in/api/users -2024-09-05 14:44:20,437 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 14:44:20,943 INFO Response JSON : {"name":"morpheus","job":"leader","id":"719","createdAt":"2024-09-05T09:12:48.118Z"} -2024-09-05 14:44:20,943 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '719', 'createdAt': '2024-09-05T09:12:48.118Z'} -2024-09-05 14:44:20,943 INFO POST Request Status Code : 201 -2024-09-05 14:44:20,943 INFO POST Request Status Code : 201 -2024-09-05 14:44:20,943 INFO POST request is successful... -2024-09-05 14:44:20,943 INFO Response JSON : {"name":"morpheus","job":"leader","id":"719","createdAt":"2024-09-05T09:12:48.118Z"} -2024-09-05 14:44:20,943 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:20,943 INFO Clean-up started -2024-09-05 14:44:20,943 INFO clean completed -2024-09-05 14:44:20,943 INFO ===================Teardown Completed======================= -2024-09-05 14:44:20,943 INFO ===================Setup Initialised======================== -2024-09-05 14:44:20,943 INFO creating driver instance created -2024-09-05 14:44:20,943 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:20,943 INFO ===================Setup Completed========================== -2024-09-05 14:44:20,943 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:20,954 INFO JSON data successfully read from API_Requests/Data/Request_Body\put_data.json -2024-09-05 14:44:20,954 INFO *********** executing test_003 **************** -2024-09-05 14:44:20,954 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 14:44:20,954 INFO Initializing PUT rest call from https://reqres.in/api/users/2 -2024-09-05 14:44:21,341 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:12:48.603Z"} -2024-09-05 14:44:21,341 INFO PUT Response : {'name': 'morpheus', 'job': 'zion resident', 'updatedAt': '2024-09-05T09:12:48.603Z'} -2024-09-05 14:44:21,341 INFO PUT request Status code : 200 -2024-09-05 14:44:21,341 INFO PUT request is successful..... -2024-09-05 14:44:21,341 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:12:48.603Z"} -2024-09-05 14:44:21,357 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:21,358 INFO Clean-up started -2024-09-05 14:44:21,358 INFO clean completed -2024-09-05 14:44:21,358 INFO ===================Teardown Completed======================= -2024-09-05 14:44:21,358 INFO ===================Setup Initialised======================== -2024-09-05 14:44:21,358 INFO creating driver instance created -2024-09-05 14:44:21,363 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:21,363 INFO ===================Setup Completed========================== -2024-09-05 14:44:21,363 INFO Base url is : https://reqres.in/api/ -2024-09-05 14:44:21,363 INFO *********** executing test_007 **************** -2024-09-05 14:44:21,363 INFO Request url is : https://reqres.in/api/register -2024-09-05 14:44:21,363 INFO Initializing POST rest call from https://reqres.in/api/register -2024-09-05 14:44:21,868 INFO Response JSON : {"error":"Missing password"} -2024-09-05 14:44:21,868 INFO POST Response : {'error': 'Missing password'} -2024-09-05 14:44:21,868 INFO POST Request Status Code : 400 -2024-09-05 14:44:21,868 ERROR POST Request Failed -2024-09-05 14:44:21,868 INFO Response JSON : {"error":"Missing password"} -2024-09-05 14:44:21,868 ERROR Response Error message: {'error': 'Missing password'} -2024-09-05 14:44:21,868 INFO Response JSON : {"error":"Missing password"} -2024-09-05 14:44:21,868 INFO ===================Teardown Initialised===================== -2024-09-05 14:44:21,868 INFO Clean-up started -2024-09-05 14:44:21,868 INFO clean completed -2024-09-05 14:44:21,868 INFO ===================Teardown Completed======================= diff --git a/Logs/log_20240905_151553.log b/Logs/log_20240905_151553.log deleted file mode 100644 index 439a303..0000000 --- a/Logs/log_20240905_151553.log +++ /dev/null @@ -1,138 +0,0 @@ -2024-09-05 15:15:53,140 INFO Starting test setup process... -2024-09-05 15:15:53,140 INFO Generating authentication token... -2024-09-05 15:15:53,140 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:53,140 INFO Authentication token generated successfully. -2024-09-05 15:15:53,140 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:15:53,156 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:53,156 INFO *********** executing test_004 **************** -2024-09-05 15:15:53,156 INFO Request url is : https://reqres.in/api/objects/6 -2024-09-05 15:15:53,156 INFO Initializing DELETE REST call from https://reqres.in/api/objects/6 -2024-09-05 15:15:53,572 ERROR Unknown content type or empty response. -2024-09-05 15:15:53,572 INFO DELETE Response : None -2024-09-05 15:15:53,572 INFO DELETE request Status code : 400 -2024-09-05 15:15:53,572 ERROR PUT request Failed...!!! -2024-09-05 15:15:53,572 ERROR Unknown content type or empty response. -2024-09-05 15:15:53,572 ERROR Response Error Message: None -2024-09-05 15:15:53,572 ERROR Unknown content type or empty response. -2024-09-05 15:15:53,586 INFO Starting test cleanup process... -2024-09-05 15:15:53,586 INFO Cleaning up authentication token... -2024-09-05 15:15:53,586 INFO Authentication token cleaned up successfully. -2024-09-05 15:15:53,586 INFO Test cleanup completed. Resources released. -2024-09-05 15:15:53,586 INFO Starting test setup process... -2024-09-05 15:15:53,586 INFO Generating authentication token... -2024-09-05 15:15:53,586 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:53,586 INFO Authentication token generated successfully. -2024-09-05 15:15:53,586 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:15:53,586 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:53,586 INFO *********** executing test_001 **************** -2024-09-05 15:15:53,586 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:15:53,586 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 15:15:53,666 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:15:53,666 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 15:15:53,666 INFO GET Request Status Code : 200 -2024-09-05 15:15:53,666 INFO GET request is Successful..... -2024-09-05 15:15:53,666 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:15:53,666 INFO type of json response : -2024-09-05 15:15:53,666 INFO JSON data successfully saved to API_Requests/Data/Request_Body\get_data.json -2024-09-05 15:15:53,681 INFO Starting test cleanup process... -2024-09-05 15:15:53,682 INFO Cleaning up authentication token... -2024-09-05 15:15:53,682 INFO Authentication token cleaned up successfully. -2024-09-05 15:15:53,682 INFO Test cleanup completed. Resources released. -2024-09-05 15:15:53,682 INFO Starting test setup process... -2024-09-05 15:15:53,682 INFO Generating authentication token... -2024-09-05 15:15:53,686 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:53,686 INFO Authentication token generated successfully. -2024-09-05 15:15:53,686 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:15:53,686 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:53,686 INFO *********** executing test_001 **************** -2024-09-05 15:15:53,686 INFO Request url is : https://reqres.in/api/unknown/23 -2024-09-05 15:15:53,686 INFO Initializing GET rest call from https://reqres.in/api/unknown/23 -2024-09-05 15:15:54,143 ERROR Unknown content type or empty response. -2024-09-05 15:15:54,143 INFO GET Response : None -2024-09-05 15:15:54,143 INFO GET Request Status Code : 400 -2024-09-05 15:15:54,143 ERROR GET Request failed....!!! -2024-09-05 15:15:54,159 ERROR Unknown content type or empty response. -2024-09-05 15:15:54,159 ERROR Response Error Message: None -2024-09-05 15:15:54,159 ERROR Unknown content type or empty response. -2024-09-05 15:15:54,270 INFO Starting test cleanup process... -2024-09-05 15:15:54,270 INFO Cleaning up authentication token... -2024-09-05 15:15:54,270 INFO Authentication token cleaned up successfully. -2024-09-05 15:15:54,270 INFO Test cleanup completed. Resources released. -2024-09-05 15:15:54,270 INFO Starting test setup process... -2024-09-05 15:15:54,270 INFO Generating authentication token... -2024-09-05 15:15:54,270 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:54,270 INFO Authentication token generated successfully. -2024-09-05 15:15:54,270 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:15:54,288 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:54,288 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 15:15:54,290 INFO *********** executing test_005 **************** -2024-09-05 15:15:54,290 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:15:54,290 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:15:54,759 INFO Response JSON : {"name":"morpheus","job":"leader","id":"929","createdAt":"2024-09-05T09:44:21.984Z"} -2024-09-05 15:15:54,774 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '929', 'createdAt': '2024-09-05T09:44:21.984Z'} -2024-09-05 15:15:54,774 INFO POST Request Status Code : 201 -2024-09-05 15:15:54,774 INFO POST Request Status Code : 201 -2024-09-05 15:15:54,774 INFO POST request is successful... -2024-09-05 15:15:54,774 INFO Response JSON : {"name":"morpheus","job":"leader","id":"929","createdAt":"2024-09-05T09:44:21.984Z"} -2024-09-05 15:15:54,774 INFO Starting test cleanup process... -2024-09-05 15:15:54,774 INFO Cleaning up authentication token... -2024-09-05 15:15:54,774 INFO Authentication token cleaned up successfully. -2024-09-05 15:15:54,774 INFO Test cleanup completed. Resources released. -2024-09-05 15:15:54,774 INFO Starting test setup process... -2024-09-05 15:15:54,774 INFO Generating authentication token... -2024-09-05 15:15:54,774 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:54,774 INFO Authentication token generated successfully. -2024-09-05 15:15:54,774 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:15:54,774 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:54,774 INFO *********** executing test_002 **************** -2024-09-05 15:15:54,774 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:15:54,789 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:15:55,189 INFO Response JSON : {"name":"morpheus","job":"leader","id":"736","createdAt":"2024-09-05T09:44:22.468Z"} -2024-09-05 15:15:55,189 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '736', 'createdAt': '2024-09-05T09:44:22.468Z'} -2024-09-05 15:15:55,189 INFO POST Request Status Code : 201 -2024-09-05 15:15:55,189 INFO POST Request Status Code : 201 -2024-09-05 15:15:55,189 INFO POST request is successful... -2024-09-05 15:15:55,189 INFO Response JSON : {"name":"morpheus","job":"leader","id":"736","createdAt":"2024-09-05T09:44:22.468Z"} -2024-09-05 15:15:55,189 INFO Starting test cleanup process... -2024-09-05 15:15:55,189 INFO Cleaning up authentication token... -2024-09-05 15:15:55,189 INFO Authentication token cleaned up successfully. -2024-09-05 15:15:55,189 INFO Test cleanup completed. Resources released. -2024-09-05 15:15:55,203 INFO Starting test setup process... -2024-09-05 15:15:55,203 INFO Generating authentication token... -2024-09-05 15:15:55,204 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:55,204 INFO Authentication token generated successfully. -2024-09-05 15:15:55,204 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:15:55,204 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:55,204 INFO JSON data successfully read from API_Requests/Data/Request_Body\put_data.json -2024-09-05 15:15:55,204 INFO *********** executing test_003 **************** -2024-09-05 15:15:55,204 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:15:55,204 INFO Initializing PUT rest call from https://reqres.in/api/users/2 -2024-09-05 15:15:55,692 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:44:22.838Z"} -2024-09-05 15:15:55,692 INFO PUT Response : {'name': 'morpheus', 'job': 'zion resident', 'updatedAt': '2024-09-05T09:44:22.838Z'} -2024-09-05 15:15:55,692 INFO PUT request Status code : 200 -2024-09-05 15:15:55,692 INFO PUT request is successful..... -2024-09-05 15:15:55,692 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:44:22.838Z"} -2024-09-05 15:15:55,692 INFO Starting test cleanup process... -2024-09-05 15:15:55,692 INFO Cleaning up authentication token... -2024-09-05 15:15:55,692 INFO Authentication token cleaned up successfully. -2024-09-05 15:15:55,692 INFO Test cleanup completed. Resources released. -2024-09-05 15:15:55,692 INFO Starting test setup process... -2024-09-05 15:15:55,692 INFO Generating authentication token... -2024-09-05 15:15:55,692 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:55,708 INFO Authentication token generated successfully. -2024-09-05 15:15:55,708 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:15:55,708 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:15:55,708 INFO *********** executing test_007 **************** -2024-09-05 15:15:55,708 INFO Request url is : https://reqres.in/api/register -2024-09-05 15:15:55,708 INFO Initializing POST rest call from https://reqres.in/api/register -2024-09-05 15:15:56,201 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:15:56,201 INFO POST Response : {'error': 'Missing password'} -2024-09-05 15:15:56,201 INFO POST Request Status Code : 400 -2024-09-05 15:15:56,201 ERROR POST Request Failed -2024-09-05 15:15:56,201 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:15:56,201 ERROR Response Error message: {'error': 'Missing password'} -2024-09-05 15:15:56,201 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:15:56,219 INFO Starting test cleanup process... -2024-09-05 15:15:56,232 INFO Cleaning up authentication token... -2024-09-05 15:15:56,237 INFO Authentication token cleaned up successfully. -2024-09-05 15:15:56,237 INFO Test cleanup completed. Resources released. diff --git a/Logs/log_20240905_151754.log b/Logs/log_20240905_151754.log deleted file mode 100644 index 1cdcb0b..0000000 --- a/Logs/log_20240905_151754.log +++ /dev/null @@ -1,138 +0,0 @@ -2024-09-05 15:17:54,783 INFO Starting test setup process... -2024-09-05 15:17:54,783 INFO Generating authentication token... -2024-09-05 15:17:54,783 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:54,783 INFO Authentication token generated successfully. -2024-09-05 15:17:54,783 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:17:54,789 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:54,789 INFO *********** executing test_004 **************** -2024-09-05 15:17:54,789 INFO Request url is : https://reqres.in/api/objects/6 -2024-09-05 15:17:54,789 INFO Initializing DELETE REST call from https://reqres.in/api/objects/6 -2024-09-05 15:17:55,291 ERROR Unknown content type or empty response. -2024-09-05 15:17:55,291 INFO DELETE Response : None -2024-09-05 15:17:55,291 INFO DELETE request Status code : 400 -2024-09-05 15:17:55,291 ERROR PUT request Failed...!!! -2024-09-05 15:17:55,291 ERROR Unknown content type or empty response. -2024-09-05 15:17:55,291 ERROR Response Error Message: None -2024-09-05 15:17:55,291 ERROR Unknown content type or empty response. -2024-09-05 15:17:55,291 INFO Starting test cleanup process... -2024-09-05 15:17:55,291 INFO Cleaning up authentication token... -2024-09-05 15:17:55,291 INFO Authentication token cleaned up successfully. -2024-09-05 15:17:55,291 INFO Test cleanup completed. Resources released. -2024-09-05 15:17:55,307 INFO Starting test setup process... -2024-09-05 15:17:55,307 INFO Generating authentication token... -2024-09-05 15:17:55,307 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:55,307 INFO Authentication token generated successfully. -2024-09-05 15:17:55,307 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:17:55,323 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:55,323 INFO *********** executing test_001 **************** -2024-09-05 15:17:55,323 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:17:55,323 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 15:17:55,387 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:17:55,387 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 15:17:55,387 INFO GET Request Status Code : 200 -2024-09-05 15:17:55,387 INFO GET request is Successful..... -2024-09-05 15:17:55,402 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:17:55,402 INFO type of json response : -2024-09-05 15:17:55,402 INFO JSON data successfully saved to API_Requests/Data/Request_Body\get_data.json -2024-09-05 15:17:55,402 INFO Starting test cleanup process... -2024-09-05 15:17:55,402 INFO Cleaning up authentication token... -2024-09-05 15:17:55,402 INFO Authentication token cleaned up successfully. -2024-09-05 15:17:55,402 INFO Test cleanup completed. Resources released. -2024-09-05 15:17:55,418 INFO Starting test setup process... -2024-09-05 15:17:55,418 INFO Generating authentication token... -2024-09-05 15:17:55,418 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:55,418 INFO Authentication token generated successfully. -2024-09-05 15:17:55,418 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:17:55,418 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:55,418 INFO *********** executing test_001 **************** -2024-09-05 15:17:55,418 INFO Request url is : https://reqres.in/api/unknown/23 -2024-09-05 15:17:55,418 INFO Initializing GET rest call from https://reqres.in/api/unknown/23 -2024-09-05 15:17:55,921 ERROR Unknown content type or empty response. -2024-09-05 15:17:55,921 INFO GET Response : None -2024-09-05 15:17:55,921 INFO GET Request Status Code : 400 -2024-09-05 15:17:55,921 ERROR GET Request failed....!!! -2024-09-05 15:17:55,921 ERROR Unknown content type or empty response. -2024-09-05 15:17:55,921 ERROR Response Error Message: None -2024-09-05 15:17:55,921 ERROR Unknown content type or empty response. -2024-09-05 15:17:56,031 INFO Starting test cleanup process... -2024-09-05 15:17:56,031 INFO Cleaning up authentication token... -2024-09-05 15:17:56,031 INFO Authentication token cleaned up successfully. -2024-09-05 15:17:56,031 INFO Test cleanup completed. Resources released. -2024-09-05 15:17:56,048 INFO Starting test setup process... -2024-09-05 15:17:56,048 INFO Generating authentication token... -2024-09-05 15:17:56,048 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:56,048 INFO Authentication token generated successfully. -2024-09-05 15:17:56,048 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:17:56,048 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:56,048 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 15:17:56,048 INFO *********** executing test_005 **************** -2024-09-05 15:17:56,048 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:17:56,048 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:17:56,533 INFO Response JSON : {"name":"morpheus","job":"leader","id":"344","createdAt":"2024-09-05T09:46:23.717Z"} -2024-09-05 15:17:56,533 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '344', 'createdAt': '2024-09-05T09:46:23.717Z'} -2024-09-05 15:17:56,533 INFO POST Request Status Code : 201 -2024-09-05 15:17:56,533 INFO POST Request Status Code : 201 -2024-09-05 15:17:56,533 INFO POST request is successful... -2024-09-05 15:17:56,533 INFO Response JSON : {"name":"morpheus","job":"leader","id":"344","createdAt":"2024-09-05T09:46:23.717Z"} -2024-09-05 15:17:56,533 INFO Starting test cleanup process... -2024-09-05 15:17:56,533 INFO Cleaning up authentication token... -2024-09-05 15:17:56,533 INFO Authentication token cleaned up successfully. -2024-09-05 15:17:56,533 INFO Test cleanup completed. Resources released. -2024-09-05 15:17:56,549 INFO Starting test setup process... -2024-09-05 15:17:56,549 INFO Generating authentication token... -2024-09-05 15:17:56,558 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:56,559 INFO Authentication token generated successfully. -2024-09-05 15:17:56,559 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:17:56,562 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:56,563 INFO *********** executing test_002 **************** -2024-09-05 15:17:56,563 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:17:56,563 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:17:57,036 INFO Response JSON : {"name":"morpheus","job":"leader","id":"349","createdAt":"2024-09-05T09:46:24.205Z"} -2024-09-05 15:17:57,036 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '349', 'createdAt': '2024-09-05T09:46:24.205Z'} -2024-09-05 15:17:57,036 INFO POST Request Status Code : 201 -2024-09-05 15:17:57,036 INFO POST Request Status Code : 201 -2024-09-05 15:17:57,036 INFO POST request is successful... -2024-09-05 15:17:57,036 INFO Response JSON : {"name":"morpheus","job":"leader","id":"349","createdAt":"2024-09-05T09:46:24.205Z"} -2024-09-05 15:17:57,036 INFO Starting test cleanup process... -2024-09-05 15:17:57,036 INFO Cleaning up authentication token... -2024-09-05 15:17:57,036 INFO Authentication token cleaned up successfully. -2024-09-05 15:17:57,036 INFO Test cleanup completed. Resources released. -2024-09-05 15:17:57,052 INFO Starting test setup process... -2024-09-05 15:17:57,052 INFO Generating authentication token... -2024-09-05 15:17:57,052 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:57,052 INFO Authentication token generated successfully. -2024-09-05 15:17:57,052 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:17:57,052 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:57,052 INFO JSON data successfully read from API_Requests/Data/Request_Body\put_data.json -2024-09-05 15:17:57,052 INFO *********** executing test_003 **************** -2024-09-05 15:17:57,052 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:17:57,052 INFO Initializing PUT rest call from https://reqres.in/api/users/2 -2024-09-05 15:17:57,545 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:46:24.698Z"} -2024-09-05 15:17:57,545 INFO PUT Response : {'name': 'morpheus', 'job': 'zion resident', 'updatedAt': '2024-09-05T09:46:24.698Z'} -2024-09-05 15:17:57,545 INFO PUT request Status code : 200 -2024-09-05 15:17:57,545 INFO PUT request is successful..... -2024-09-05 15:17:57,545 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:46:24.698Z"} -2024-09-05 15:17:57,545 INFO Starting test cleanup process... -2024-09-05 15:17:57,545 INFO Cleaning up authentication token... -2024-09-05 15:17:57,545 INFO Authentication token cleaned up successfully. -2024-09-05 15:17:57,545 INFO Test cleanup completed. Resources released. -2024-09-05 15:17:57,566 INFO Starting test setup process... -2024-09-05 15:17:57,566 INFO Generating authentication token... -2024-09-05 15:17:57,566 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:57,566 INFO Authentication token generated successfully. -2024-09-05 15:17:57,566 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:17:57,566 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:17:57,566 INFO *********** executing test_007 **************** -2024-09-05 15:17:57,566 INFO Request url is : https://reqres.in/api/register -2024-09-05 15:17:57,566 INFO Initializing POST rest call from https://reqres.in/api/register -2024-09-05 15:17:58,053 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:17:58,053 INFO POST Response : {'error': 'Missing password'} -2024-09-05 15:17:58,053 INFO POST Request Status Code : 400 -2024-09-05 15:17:58,053 ERROR POST Request Failed -2024-09-05 15:17:58,053 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:17:58,053 ERROR Response Error message: {'error': 'Missing password'} -2024-09-05 15:17:58,053 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:17:58,069 INFO Starting test cleanup process... -2024-09-05 15:17:58,069 INFO Cleaning up authentication token... -2024-09-05 15:17:58,069 INFO Authentication token cleaned up successfully. -2024-09-05 15:17:58,069 INFO Test cleanup completed. Resources released. diff --git a/Logs/log_20240905_152213.log b/Logs/log_20240905_152213.log deleted file mode 100644 index 51d72e6..0000000 --- a/Logs/log_20240905_152213.log +++ /dev/null @@ -1,138 +0,0 @@ -2024-09-05 15:22:13,294 INFO Starting test setup process... -2024-09-05 15:22:13,294 INFO Generating authentication token... -2024-09-05 15:22:13,294 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:13,294 INFO Authentication token generated successfully. -2024-09-05 15:22:13,294 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:22:13,307 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:13,307 INFO *********** executing test_004 **************** -2024-09-05 15:22:13,307 INFO Request url is : https://reqres.in/api/objects/6 -2024-09-05 15:22:13,307 INFO Initializing DELETE REST call from https://reqres.in/api/objects/6 -2024-09-05 15:22:13,869 ERROR Unknown content type or empty response. -2024-09-05 15:22:13,872 INFO DELETE Response : None -2024-09-05 15:22:13,872 INFO DELETE request Status code : 400 -2024-09-05 15:22:13,872 ERROR PUT request Failed...!!! -2024-09-05 15:22:13,872 ERROR Unknown content type or empty response. -2024-09-05 15:22:13,872 ERROR Response Error Message: None -2024-09-05 15:22:13,872 ERROR Unknown content type or empty response. -2024-09-05 15:22:13,872 INFO Starting test cleanup process... -2024-09-05 15:22:13,872 INFO Cleaning up authentication token... -2024-09-05 15:22:13,878 INFO Authentication token cleaned up successfully. -2024-09-05 15:22:13,878 INFO Test cleanup completed. Resources released. -2024-09-05 15:22:13,887 INFO Starting test setup process... -2024-09-05 15:22:13,887 INFO Generating authentication token... -2024-09-05 15:22:13,887 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:13,887 INFO Authentication token generated successfully. -2024-09-05 15:22:13,887 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:22:13,894 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:13,894 INFO *********** executing test_001 **************** -2024-09-05 15:22:13,894 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:22:13,894 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 15:22:14,005 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:22:14,005 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 15:22:14,005 INFO GET Request Status Code : 200 -2024-09-05 15:22:14,005 INFO GET request is Successful..... -2024-09-05 15:22:14,005 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:22:14,005 INFO type of json response : -2024-09-05 15:22:14,020 INFO JSON data successfully saved to API_Requests/Data/Request_Body\get_data.json -2024-09-05 15:22:14,022 INFO Starting test cleanup process... -2024-09-05 15:22:14,023 INFO Cleaning up authentication token... -2024-09-05 15:22:14,023 INFO Authentication token cleaned up successfully. -2024-09-05 15:22:14,023 INFO Test cleanup completed. Resources released. -2024-09-05 15:22:14,031 INFO Starting test setup process... -2024-09-05 15:22:14,031 INFO Generating authentication token... -2024-09-05 15:22:14,031 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:14,031 INFO Authentication token generated successfully. -2024-09-05 15:22:14,031 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:22:14,036 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:14,036 INFO *********** executing test_001 **************** -2024-09-05 15:22:14,036 INFO Request url is : https://reqres.in/api/unknown/23 -2024-09-05 15:22:14,036 INFO Initializing GET rest call from https://reqres.in/api/unknown/23 -2024-09-05 15:22:14,574 ERROR Unknown content type or empty response. -2024-09-05 15:22:14,574 INFO GET Response : None -2024-09-05 15:22:14,574 INFO GET Request Status Code : 400 -2024-09-05 15:22:14,574 ERROR GET Request failed....!!! -2024-09-05 15:22:14,574 ERROR Unknown content type or empty response. -2024-09-05 15:22:14,574 ERROR Response Error Message: None -2024-09-05 15:22:14,574 ERROR Unknown content type or empty response. -2024-09-05 15:22:14,685 INFO Starting test cleanup process... -2024-09-05 15:22:14,685 INFO Cleaning up authentication token... -2024-09-05 15:22:14,685 INFO Authentication token cleaned up successfully. -2024-09-05 15:22:14,685 INFO Test cleanup completed. Resources released. -2024-09-05 15:22:14,696 INFO Starting test setup process... -2024-09-05 15:22:14,696 INFO Generating authentication token... -2024-09-05 15:22:14,696 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:14,696 INFO Authentication token generated successfully. -2024-09-05 15:22:14,696 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:22:14,700 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:14,701 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 15:22:14,701 INFO *********** executing test_005 **************** -2024-09-05 15:22:14,701 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:22:14,701 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:22:15,191 INFO Response JSON : {"name":"morpheus","job":"leader","id":"732","createdAt":"2024-09-05T09:50:42.384Z"} -2024-09-05 15:22:15,191 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '732', 'createdAt': '2024-09-05T09:50:42.384Z'} -2024-09-05 15:22:15,191 INFO POST Request Status Code : 201 -2024-09-05 15:22:15,191 INFO POST Request Status Code : 201 -2024-09-05 15:22:15,191 INFO POST request is successful... -2024-09-05 15:22:15,191 INFO Response JSON : {"name":"morpheus","job":"leader","id":"732","createdAt":"2024-09-05T09:50:42.384Z"} -2024-09-05 15:22:15,191 INFO Starting test cleanup process... -2024-09-05 15:22:15,191 INFO Cleaning up authentication token... -2024-09-05 15:22:15,191 INFO Authentication token cleaned up successfully. -2024-09-05 15:22:15,191 INFO Test cleanup completed. Resources released. -2024-09-05 15:22:15,206 INFO Starting test setup process... -2024-09-05 15:22:15,209 INFO Generating authentication token... -2024-09-05 15:22:15,209 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:15,209 INFO Authentication token generated successfully. -2024-09-05 15:22:15,209 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:22:15,209 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:15,209 INFO *********** executing test_002 **************** -2024-09-05 15:22:15,209 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:22:15,209 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:22:15,696 INFO Response JSON : {"name":"morpheus","job":"leader","id":"712","createdAt":"2024-09-05T09:50:42.921Z"} -2024-09-05 15:22:15,696 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '712', 'createdAt': '2024-09-05T09:50:42.921Z'} -2024-09-05 15:22:15,696 INFO POST Request Status Code : 201 -2024-09-05 15:22:15,696 INFO POST Request Status Code : 201 -2024-09-05 15:22:15,696 INFO POST request is successful... -2024-09-05 15:22:15,696 INFO Response JSON : {"name":"morpheus","job":"leader","id":"712","createdAt":"2024-09-05T09:50:42.921Z"} -2024-09-05 15:22:15,711 INFO Starting test cleanup process... -2024-09-05 15:22:15,711 INFO Cleaning up authentication token... -2024-09-05 15:22:15,711 INFO Authentication token cleaned up successfully. -2024-09-05 15:22:15,711 INFO Test cleanup completed. Resources released. -2024-09-05 15:22:15,739 INFO Starting test setup process... -2024-09-05 15:22:15,739 INFO Generating authentication token... -2024-09-05 15:22:15,743 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:15,743 INFO Authentication token generated successfully. -2024-09-05 15:22:15,743 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:22:15,743 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:15,743 INFO JSON data successfully read from API_Requests/Data/Request_Body\put_data.json -2024-09-05 15:22:15,743 INFO *********** executing test_003 **************** -2024-09-05 15:22:15,743 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:22:15,743 INFO Initializing PUT rest call from https://reqres.in/api/users/2 -2024-09-05 15:22:16,221 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:50:43.422Z"} -2024-09-05 15:22:16,221 INFO PUT Response : {'name': 'morpheus', 'job': 'zion resident', 'updatedAt': '2024-09-05T09:50:43.422Z'} -2024-09-05 15:22:16,221 INFO PUT request Status code : 200 -2024-09-05 15:22:16,221 INFO PUT request is successful..... -2024-09-05 15:22:16,221 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T09:50:43.422Z"} -2024-09-05 15:22:16,221 INFO Starting test cleanup process... -2024-09-05 15:22:16,221 INFO Cleaning up authentication token... -2024-09-05 15:22:16,221 INFO Authentication token cleaned up successfully. -2024-09-05 15:22:16,221 INFO Test cleanup completed. Resources released. -2024-09-05 15:22:16,239 INFO Starting test setup process... -2024-09-05 15:22:16,239 INFO Generating authentication token... -2024-09-05 15:22:16,239 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:16,239 INFO Authentication token generated successfully. -2024-09-05 15:22:16,239 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:22:16,239 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:22:16,239 INFO *********** executing test_007 **************** -2024-09-05 15:22:16,239 INFO Request url is : https://reqres.in/api/register -2024-09-05 15:22:16,239 INFO Initializing POST rest call from https://reqres.in/api/register -2024-09-05 15:22:16,730 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:22:16,730 INFO POST Response : {'error': 'Missing password'} -2024-09-05 15:22:16,730 INFO POST Request Status Code : 400 -2024-09-05 15:22:16,730 ERROR POST Request Failed -2024-09-05 15:22:16,730 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:22:16,730 ERROR Response Error message: {'error': 'Missing password'} -2024-09-05 15:22:16,730 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:22:16,744 INFO Starting test cleanup process... -2024-09-05 15:22:16,744 INFO Cleaning up authentication token... -2024-09-05 15:22:16,744 INFO Authentication token cleaned up successfully. -2024-09-05 15:22:16,744 INFO Test cleanup completed. Resources released. diff --git a/Logs/log_20240905_154322.log b/Logs/log_20240905_154322.log deleted file mode 100644 index 6693014..0000000 --- a/Logs/log_20240905_154322.log +++ /dev/null @@ -1,20 +0,0 @@ -2024-09-05 15:43:22,339 INFO Starting test setup process... -2024-09-05 15:43:22,339 INFO Generating authentication token... -2024-09-05 15:43:22,342 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:43:22,342 INFO Authentication token generated successfully. -2024-09-05 15:43:22,342 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:43:22,345 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:43:22,345 INFO *********** executing test_001 **************** -2024-09-05 15:43:22,345 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:43:22,345 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 15:43:22,486 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:43:22,486 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 15:43:22,486 INFO GET Request Status Code : 200 -2024-09-05 15:43:22,486 INFO GET request is Successful..... -2024-09-05 15:43:22,486 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:43:22,486 INFO type of json response : -2024-09-05 15:43:22,488 INFO JSON data successfully saved to API_Requests/Data/Response_Body\get_data.json -2024-09-05 15:43:22,489 INFO Starting test cleanup process... -2024-09-05 15:43:22,489 INFO Cleaning up authentication token... -2024-09-05 15:43:22,489 INFO Authentication token cleaned up successfully. -2024-09-05 15:43:22,489 INFO Test cleanup completed. Resources released. diff --git a/Logs/log_20240905_154424.log b/Logs/log_20240905_154424.log deleted file mode 100644 index 081d37c..0000000 --- a/Logs/log_20240905_154424.log +++ /dev/null @@ -1,20 +0,0 @@ -2024-09-05 15:44:24,622 INFO Starting test setup process... -2024-09-05 15:44:24,623 INFO Generating authentication token... -2024-09-05 15:44:24,626 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:44:24,626 INFO Authentication token generated successfully. -2024-09-05 15:44:24,626 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:44:24,629 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:44:24,630 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 15:44:24,630 INFO *********** executing test_005 **************** -2024-09-05 15:44:24,643 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:44:24,643 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:44:25,139 INFO Response JSON : {"name":"morpheus","job":"leader","id":"945","createdAt":"2024-09-05T10:12:52.325Z"} -2024-09-05 15:44:25,139 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '945', 'createdAt': '2024-09-05T10:12:52.325Z'} -2024-09-05 15:44:25,139 INFO POST Request Status Code : 201 -2024-09-05 15:44:25,140 INFO POST Request Status Code : 201 -2024-09-05 15:44:25,140 INFO POST request is successful... -2024-09-05 15:44:25,140 INFO Response JSON : {"name":"morpheus","job":"leader","id":"945","createdAt":"2024-09-05T10:12:52.325Z"} -2024-09-05 15:44:25,142 INFO Starting test cleanup process... -2024-09-05 15:44:25,142 INFO Cleaning up authentication token... -2024-09-05 15:44:25,142 INFO Authentication token cleaned up successfully. -2024-09-05 15:44:25,142 INFO Test cleanup completed. Resources released. diff --git a/Logs/log_20240905_154651.log b/Logs/log_20240905_154651.log deleted file mode 100644 index 1f2d19e..0000000 --- a/Logs/log_20240905_154651.log +++ /dev/null @@ -1,138 +0,0 @@ -2024-09-05 15:46:51,549 INFO Starting test setup process... -2024-09-05 15:46:51,550 INFO Generating authentication token... -2024-09-05 15:46:51,553 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:51,554 INFO Authentication token generated successfully. -2024-09-05 15:46:51,554 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:46:51,558 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:51,559 INFO *********** executing test_004 **************** -2024-09-05 15:46:51,560 INFO Request url is : https://reqres.in/api/objects/6 -2024-09-05 15:46:51,561 INFO Initializing DELETE REST call from https://reqres.in/api/objects/6 -2024-09-05 15:46:52,066 ERROR Unknown content type or empty response. -2024-09-05 15:46:52,066 INFO DELETE Response : None -2024-09-05 15:46:52,067 INFO DELETE request Status code : 400 -2024-09-05 15:46:52,067 ERROR PUT request Failed...!!! -2024-09-05 15:46:52,067 ERROR Unknown content type or empty response. -2024-09-05 15:46:52,067 ERROR Response Error Message: None -2024-09-05 15:46:52,068 ERROR Unknown content type or empty response. -2024-09-05 15:46:52,069 INFO Starting test cleanup process... -2024-09-05 15:46:52,069 INFO Cleaning up authentication token... -2024-09-05 15:46:52,069 INFO Authentication token cleaned up successfully. -2024-09-05 15:46:52,069 INFO Test cleanup completed. Resources released. -2024-09-05 15:46:52,085 INFO Starting test setup process... -2024-09-05 15:46:52,085 INFO Generating authentication token... -2024-09-05 15:46:52,088 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:52,089 INFO Authentication token generated successfully. -2024-09-05 15:46:52,089 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:46:52,093 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:52,093 INFO *********** executing test_001 **************** -2024-09-05 15:46:52,093 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:46:52,094 INFO Initializing GET rest call from https://reqres.in/api/users/2 -2024-09-05 15:46:52,188 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:46:52,188 INFO GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -2024-09-05 15:46:52,188 INFO GET Request Status Code : 200 -2024-09-05 15:46:52,189 INFO GET request is Successful..... -2024-09-05 15:46:52,189 INFO Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -2024-09-05 15:46:52,189 INFO type of json response : -2024-09-05 15:46:52,191 INFO JSON data successfully saved to API_Requests/Data/Response_Body\get_data.json -2024-09-05 15:46:52,193 INFO Starting test cleanup process... -2024-09-05 15:46:52,193 INFO Cleaning up authentication token... -2024-09-05 15:46:52,193 INFO Authentication token cleaned up successfully. -2024-09-05 15:46:52,194 INFO Test cleanup completed. Resources released. -2024-09-05 15:46:52,202 INFO Starting test setup process... -2024-09-05 15:46:52,203 INFO Generating authentication token... -2024-09-05 15:46:52,204 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:52,205 INFO Authentication token generated successfully. -2024-09-05 15:46:52,205 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:46:52,206 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:52,207 INFO *********** executing test_001 **************** -2024-09-05 15:46:52,207 INFO Request url is : https://reqres.in/api/unknown/23 -2024-09-05 15:46:52,207 INFO Initializing GET rest call from https://reqres.in/api/unknown/23 -2024-09-05 15:46:52,654 ERROR Unknown content type or empty response. -2024-09-05 15:46:52,655 INFO GET Response : None -2024-09-05 15:46:52,655 INFO GET Request Status Code : 400 -2024-09-05 15:46:52,655 ERROR GET Request failed....!!! -2024-09-05 15:46:52,655 ERROR Unknown content type or empty response. -2024-09-05 15:46:52,655 ERROR Response Error Message: None -2024-09-05 15:46:52,656 ERROR Unknown content type or empty response. -2024-09-05 15:46:52,778 INFO Starting test cleanup process... -2024-09-05 15:46:52,778 INFO Cleaning up authentication token... -2024-09-05 15:46:52,778 INFO Authentication token cleaned up successfully. -2024-09-05 15:46:52,778 INFO Test cleanup completed. Resources released. -2024-09-05 15:46:52,787 INFO Starting test setup process... -2024-09-05 15:46:52,787 INFO Generating authentication token... -2024-09-05 15:46:52,789 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:52,789 INFO Authentication token generated successfully. -2024-09-05 15:46:52,789 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:46:52,792 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:52,794 INFO JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -2024-09-05 15:46:52,794 INFO *********** executing test_005 **************** -2024-09-05 15:46:52,794 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:46:52,794 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:46:53,175 INFO Response JSON : {"name":"morpheus","job":"leader","id":"305","createdAt":"2024-09-05T10:15:20.414Z"} -2024-09-05 15:46:53,175 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '305', 'createdAt': '2024-09-05T10:15:20.414Z'} -2024-09-05 15:46:53,176 INFO POST Request Status Code : 201 -2024-09-05 15:46:53,176 INFO POST Request Status Code : 201 -2024-09-05 15:46:53,177 INFO POST request is successful... -2024-09-05 15:46:53,178 INFO Response JSON : {"name":"morpheus","job":"leader","id":"305","createdAt":"2024-09-05T10:15:20.414Z"} -2024-09-05 15:46:53,179 INFO Starting test cleanup process... -2024-09-05 15:46:53,179 INFO Cleaning up authentication token... -2024-09-05 15:46:53,179 INFO Authentication token cleaned up successfully. -2024-09-05 15:46:53,181 INFO Test cleanup completed. Resources released. -2024-09-05 15:46:53,191 INFO Starting test setup process... -2024-09-05 15:46:53,192 INFO Generating authentication token... -2024-09-05 15:46:53,194 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:53,194 INFO Authentication token generated successfully. -2024-09-05 15:46:53,195 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:46:53,197 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:53,197 INFO *********** executing test_002 **************** -2024-09-05 15:46:53,197 INFO Request url is : https://reqres.in/api/users -2024-09-05 15:46:53,197 INFO Initializing POST rest call from https://reqres.in/api/users -2024-09-05 15:46:53,579 INFO Response JSON : {"name":"morpheus","job":"leader","id":"807","createdAt":"2024-09-05T10:15:20.815Z"} -2024-09-05 15:46:53,579 INFO POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '807', 'createdAt': '2024-09-05T10:15:20.815Z'} -2024-09-05 15:46:53,580 INFO POST Request Status Code : 201 -2024-09-05 15:46:53,580 INFO POST Request Status Code : 201 -2024-09-05 15:46:53,581 INFO POST request is successful... -2024-09-05 15:46:53,581 INFO Response JSON : {"name":"morpheus","job":"leader","id":"807","createdAt":"2024-09-05T10:15:20.815Z"} -2024-09-05 15:46:53,582 INFO Starting test cleanup process... -2024-09-05 15:46:53,582 INFO Cleaning up authentication token... -2024-09-05 15:46:53,583 INFO Authentication token cleaned up successfully. -2024-09-05 15:46:53,583 INFO Test cleanup completed. Resources released. -2024-09-05 15:46:53,592 INFO Starting test setup process... -2024-09-05 15:46:53,592 INFO Generating authentication token... -2024-09-05 15:46:53,596 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:53,596 INFO Authentication token generated successfully. -2024-09-05 15:46:53,597 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:46:53,599 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:53,602 INFO JSON data successfully read from API_Requests/Data/Request_Body\put_data.json -2024-09-05 15:46:53,602 INFO *********** executing test_003 **************** -2024-09-05 15:46:53,603 INFO Request url is : https://reqres.in/api/users/2 -2024-09-05 15:46:53,603 INFO Initializing PUT rest call from https://reqres.in/api/users/2 -2024-09-05 15:46:53,988 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T10:15:21.230Z"} -2024-09-05 15:46:53,988 INFO PUT Response : {'name': 'morpheus', 'job': 'zion resident', 'updatedAt': '2024-09-05T10:15:21.230Z'} -2024-09-05 15:46:53,989 INFO PUT request Status code : 200 -2024-09-05 15:46:53,989 INFO PUT request is successful..... -2024-09-05 15:46:53,990 INFO Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T10:15:21.230Z"} -2024-09-05 15:46:53,992 INFO Starting test cleanup process... -2024-09-05 15:46:53,993 INFO Cleaning up authentication token... -2024-09-05 15:46:53,993 INFO Authentication token cleaned up successfully. -2024-09-05 15:46:53,994 INFO Test cleanup completed. Resources released. -2024-09-05 15:46:54,005 INFO Starting test setup process... -2024-09-05 15:46:54,005 INFO Generating authentication token... -2024-09-05 15:46:54,007 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:54,007 INFO Authentication token generated successfully. -2024-09-05 15:46:54,007 INFO Test setup completed. Ready to execute tests. -2024-09-05 15:46:54,009 INFO Base url is : https://reqres.in/api/ -2024-09-05 15:46:54,009 INFO *********** executing test_007 **************** -2024-09-05 15:46:54,009 INFO Request url is : https://reqres.in/api/register -2024-09-05 15:46:54,009 INFO Initializing POST rest call from https://reqres.in/api/register -2024-09-05 15:46:54,400 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:46:54,400 INFO POST Response : {'error': 'Missing password'} -2024-09-05 15:46:54,400 INFO POST Request Status Code : 400 -2024-09-05 15:46:54,401 ERROR POST Request Failed -2024-09-05 15:46:54,401 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:46:54,401 ERROR Response Error message: {'error': 'Missing password'} -2024-09-05 15:46:54,402 INFO Response JSON : {"error":"Missing password"} -2024-09-05 15:46:54,410 INFO Starting test cleanup process... -2024-09-05 15:46:54,410 INFO Cleaning up authentication token... -2024-09-05 15:46:54,411 INFO Authentication token cleaned up successfully. -2024-09-05 15:46:54,411 INFO Test cleanup completed. Resources released. diff --git a/Reports/Allure_Reports/17aeb801-eb48-4ada-8ece-5db552612b96-result.json b/Reports/Allure_Reports/17aeb801-eb48-4ada-8ece-5db552612b96-result.json deleted file mode 100644 index 6490d16..0000000 --- a/Reports/Allure_Reports/17aeb801-eb48-4ada-8ece-5db552612b96-result.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "test_004", "status": "passed", "description": "Test to resource is deleted from Backend ", "attachments": [{"name": "log", "source": "36edb3d7-c8e5-4ebc-81cc-fe308b904a2a-attachment.txt", "type": "text/plain"}], "start": 1725531411556, "stop": 1725531412068, "uuid": "4acb0e07-6510-438e-b229-c454f0a58116", "historyId": "e71bba15a74711cba86cb7e372fc729a", "testCaseId": "e71bba15a74711cba86cb7e372fc729a", "fullName": "API_Requests.Tests.test_delete_request.Test_004#test_004", "labels": [{"name": "parentSuite", "value": "API_Requests.Tests"}, {"name": "suite", "value": "test_delete_request"}, {"name": "subSuite", "value": "Test_004"}, {"name": "host", "value": "NIT2LPT-24-269"}, {"name": "thread", "value": "15292-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "API_Requests.Tests.test_delete_request"}]} \ No newline at end of file diff --git a/Reports/Allure_Reports/23d9e55b-38bf-44d3-9140-1c6d59b0864f-attachment.txt b/Reports/Allure_Reports/23d9e55b-38bf-44d3-9140-1c6d59b0864f-attachment.txt deleted file mode 100644 index 9264a3f..0000000 --- a/Reports/Allure_Reports/23d9e55b-38bf-44d3-9140-1c6d59b0864f-attachment.txt +++ /dev/null @@ -1,20 +0,0 @@ -INFO  conf.logger:conftest.py:27 Starting test setup process... -INFO  conf.logger:conftest.py:29 Generating authentication token... -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:conftest.py:31 Authentication token generated successfully. -INFO  conf.logger:conftest.py:32 Test setup completed. Ready to execute tests. -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:test_register_unsuccessful.py:26 *********** executing test_007 **************** -INFO  conf.logger:Rest_Client.py:92 Request url is : https://reqres.in/api/register -INFO  conf.logger:Rest_Client.py:97 Initializing POST rest call from https://reqres.in/api/register -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"error":"Missing password"} -INFO  conf.logger:Rest_Client.py:99 POST Response : {'error': 'Missing password'} -INFO  conf.logger:Rest_Client.py:100 POST Request Status Code : 400 -ERROR  conf.logger:Rest_Client.py:112 POST Request Failed -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"error":"Missing password"} -ERROR  conf.logger:Rest_Client.py:113 Response Error message: {'error': 'Missing password'} -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"error":"Missing password"} -INFO  conf.logger:conftest.py:34 Starting test cleanup process... -INFO  conf.logger:conftest.py:36 Cleaning up authentication token... -INFO  conf.logger:conftest.py:37 Authentication token cleaned up successfully. -INFO  conf.logger:conftest.py:38 Test cleanup completed. Resources released. \ No newline at end of file diff --git a/Reports/Allure_Reports/29a305ae-2029-4844-be40-65134db21569-container.json b/Reports/Allure_Reports/29a305ae-2029-4844-be40-65134db21569-container.json deleted file mode 100644 index c935f31..0000000 --- a/Reports/Allure_Reports/29a305ae-2029-4844-be40-65134db21569-container.json +++ /dev/null @@ -1 +0,0 @@ -{"uuid": "473263a6-5c97-47f9-8616-c75faa62db15", "children": ["9704c27b-6b66-43f2-8091-1b39f2d17a8f"], "befores": [{"name": "setup_teardown", "status": "passed", "start": 1725531413191, "stop": 1725531413195}], "afters": [{"name": "setup_teardown::0", "status": "passed", "start": 1725531413583, "stop": 1725531413584}], "start": 1725531413191, "stop": 1725531413584} \ No newline at end of file diff --git a/Reports/Allure_Reports/32aedb8a-655a-4f3c-82d0-c9b8be96901a-attachment.txt b/Reports/Allure_Reports/32aedb8a-655a-4f3c-82d0-c9b8be96901a-attachment.txt deleted file mode 100644 index c7d8faa..0000000 --- a/Reports/Allure_Reports/32aedb8a-655a-4f3c-82d0-c9b8be96901a-attachment.txt +++ /dev/null @@ -1,20 +0,0 @@ -INFO  conf.logger:conftest.py:27 Starting test setup process... -INFO  conf.logger:conftest.py:29 Generating authentication token... -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:conftest.py:31 Authentication token generated successfully. -INFO  conf.logger:conftest.py:32 Test setup completed. Ready to execute tests. -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:test_no_data_found_request.py:23 *********** executing test_001 **************** -INFO  conf.logger:Rest_Client.py:42 Request url is : https://reqres.in/api/unknown/23 -INFO  conf.logger:Rest_Client.py:47 Initializing GET rest call from https://reqres.in/api/unknown/23 -ERROR  conf.logger:Rest_Client.py:240 Unknown content type or empty response. -INFO  conf.logger:Rest_Client.py:50 GET Response : None -INFO  conf.logger:Rest_Client.py:51 GET Request Status Code : 400 -ERROR  conf.logger:Rest_Client.py:60 GET Request failed....!!! -ERROR  conf.logger:Rest_Client.py:240 Unknown content type or empty response. -ERROR  conf.logger:Rest_Client.py:61 Response Error Message: None -ERROR  conf.logger:Rest_Client.py:240 Unknown content type or empty response. -INFO  conf.logger:conftest.py:34 Starting test cleanup process... -INFO  conf.logger:conftest.py:36 Cleaning up authentication token... -INFO  conf.logger:conftest.py:37 Authentication token cleaned up successfully. -INFO  conf.logger:conftest.py:38 Test cleanup completed. Resources released. \ No newline at end of file diff --git a/Reports/Allure_Reports/36edb3d7-c8e5-4ebc-81cc-fe308b904a2a-attachment.txt b/Reports/Allure_Reports/36edb3d7-c8e5-4ebc-81cc-fe308b904a2a-attachment.txt deleted file mode 100644 index 8a93dd3..0000000 --- a/Reports/Allure_Reports/36edb3d7-c8e5-4ebc-81cc-fe308b904a2a-attachment.txt +++ /dev/null @@ -1,20 +0,0 @@ -INFO  conf.logger:conftest.py:27 Starting test setup process... -INFO  conf.logger:conftest.py:29 Generating authentication token... -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:conftest.py:31 Authentication token generated successfully. -INFO  conf.logger:conftest.py:32 Test setup completed. Ready to execute tests. -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:test_delete_request.py:18 *********** executing test_004 **************** -INFO  conf.logger:Rest_Client.py:186 Request url is : https://reqres.in/api/objects/6 -INFO  conf.logger:Rest_Client.py:190 Initializing DELETE REST call from https://reqres.in/api/objects/6 -ERROR  conf.logger:Rest_Client.py:240 Unknown content type or empty response. -INFO  conf.logger:Rest_Client.py:192 DELETE Response : None -INFO  conf.logger:Rest_Client.py:193 DELETE request Status code : 400 -ERROR  conf.logger:Rest_Client.py:202 PUT request Failed...!!! -ERROR  conf.logger:Rest_Client.py:240 Unknown content type or empty response. -ERROR  conf.logger:Rest_Client.py:203 Response Error Message: None -ERROR  conf.logger:Rest_Client.py:240 Unknown content type or empty response. -INFO  conf.logger:conftest.py:34 Starting test cleanup process... -INFO  conf.logger:conftest.py:36 Cleaning up authentication token... -INFO  conf.logger:conftest.py:37 Authentication token cleaned up successfully. -INFO  conf.logger:conftest.py:38 Test cleanup completed. Resources released. \ No newline at end of file diff --git a/Reports/Allure_Reports/52681722-9e67-42bb-86a2-6edca016f6c1-result.json b/Reports/Allure_Reports/52681722-9e67-42bb-86a2-6edca016f6c1-result.json deleted file mode 100644 index 6ffe5b8..0000000 --- a/Reports/Allure_Reports/52681722-9e67-42bb-86a2-6edca016f6c1-result.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "test_007", "status": "failed", "statusDetails": {"message": "AssertionError: assert 400 == 201", "trace": "self = , setup_teardown = None\n\n def test_007(self,setup_teardown):\n \"\"\"\" Test to check POST Request to register successfully \"\"\"\n \n self.base_url = get_config()['API']['base_url']\n self.client = RestClient(self.base_url)\n self.json = {\n \"email\": \"sydney@fife\"\n }\n \n self.headers = {\n 'Content-Type': 'application/json'\n }\n \n logger.info(\"*********** executing test_007 ****************\")\n \n post_request,status_code = self.client.post_request(end_point=\"register\",data=self.json,headers=self.headers,json_data_fmt=True,response_with_status_code=True)\n \n assert post_request is not None, \"POST request returned None\"\n> assert status_code == 201\nE assert 400 == 201\n\nAPI_Requests\\Tests\\test_register_unsuccessful.py:31: AssertionError"}, "description": "\" Test to check POST Request to register successfully ", "attachments": [{"name": "log", "source": "23d9e55b-38bf-44d3-9140-1c6d59b0864f-attachment.txt", "type": "text/plain"}], "start": 1725531414009, "stop": 1725531414403, "uuid": "fb299356-b11d-434a-920d-f2e51b401eb3", "historyId": "9e8b938e99f38f72b31ca7e0fe06f4c0", "testCaseId": "9e8b938e99f38f72b31ca7e0fe06f4c0", "fullName": "API_Requests.Tests.test_register_unsuccessful.Test_007#test_007", "labels": [{"name": "parentSuite", "value": "API_Requests.Tests"}, {"name": "suite", "value": "test_register_unsuccessful"}, {"name": "subSuite", "value": "Test_007"}, {"name": "host", "value": "NIT2LPT-24-269"}, {"name": "thread", "value": "15292-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "API_Requests.Tests.test_register_unsuccessful"}]} \ No newline at end of file diff --git a/Reports/Allure_Reports/5853ce53-0837-42e9-a604-49a24071ed8d-result.json b/Reports/Allure_Reports/5853ce53-0837-42e9-a604-49a24071ed8d-result.json deleted file mode 100644 index 81fb308..0000000 --- a/Reports/Allure_Reports/5853ce53-0837-42e9-a604-49a24071ed8d-result.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "test_001", "status": "failed", "statusDetails": {"message": "AssertionError: GET request returned None\nassert None is not None", "trace": "self = , setup_teardown = None\n\n def test_001(self,setup_teardown):\n \n \"\"\"\" Test to check GET Request is successful with response and successful status code\"\"\"\n \n self.base_url = get_config()['API']['base_url']\n self.client = RestClient(self.base_url)\n \n self.headers = {\n 'Content-Type' : 'application/json'\n }\n \n logging.info(\"*********** executing test_001 ****************\")\n \n get_request,status_code = self.client.get_request(end_point=\"unknown/23\", headers=self.headers,response_with_status_code=True,json_data_fmt=True)\n \n> assert get_request is not None, \"GET request returned None\"\nE AssertionError: GET request returned None\nE assert None is not None\n\nAPI_Requests\\Tests\\test_no_data_found_request.py:27: AssertionError"}, "description": "\" Test to check GET Request is successful with response and successful status code", "attachments": [{"name": "log", "source": "32aedb8a-655a-4f3c-82d0-c9b8be96901a-attachment.txt", "type": "text/plain"}], "start": 1725531412206, "stop": 1725531412656, "uuid": "63b7fdb4-da3c-4c08-87dd-5bd0d38766cb", "historyId": "d7acae85205a2935734d14c95149a29a", "testCaseId": "d7acae85205a2935734d14c95149a29a", "fullName": "API_Requests.Tests.test_no_data_found_request.Test_001#test_001", "labels": [{"name": "parentSuite", "value": "API_Requests.Tests"}, {"name": "suite", "value": "test_no_data_found_request"}, {"name": "subSuite", "value": "Test_001"}, {"name": "host", "value": "NIT2LPT-24-269"}, {"name": "thread", "value": "15292-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "API_Requests.Tests.test_no_data_found_request"}]} \ No newline at end of file diff --git a/Reports/Allure_Reports/7aec0816-3fc7-47ae-971a-b9382e210bc2-attachment.txt b/Reports/Allure_Reports/7aec0816-3fc7-47ae-971a-b9382e210bc2-attachment.txt deleted file mode 100644 index 5baad1f..0000000 --- a/Reports/Allure_Reports/7aec0816-3fc7-47ae-971a-b9382e210bc2-attachment.txt +++ /dev/null @@ -1,20 +0,0 @@ -INFO  conf.logger:conftest.py:27 Starting test setup process... -INFO  conf.logger:conftest.py:29 Generating authentication token... -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:conftest.py:31 Authentication token generated successfully. -INFO  conf.logger:conftest.py:32 Test setup completed. Ready to execute tests. -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:test_get_request.py:23 *********** executing test_001 **************** -INFO  conf.logger:Rest_Client.py:42 Request url is : https://reqres.in/api/users/2 -INFO  conf.logger:Rest_Client.py:47 Initializing GET rest call from https://reqres.in/api/users/2 -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -INFO  conf.logger:Rest_Client.py:50 GET Response : {'data': {'id': 2, 'email': 'janet.weaver@reqres.in', 'first_name': 'Janet', 'last_name': 'Weaver', 'avatar': 'https://reqres.in/img/faces/2-image.jpg'}, 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}} -INFO  conf.logger:Rest_Client.py:51 GET Request Status Code : 200 -INFO  conf.logger:Rest_Client.py:53 GET request is Successful..... -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"data":{"id":2,"email":"janet.weaver@reqres.in","first_name":"Janet","last_name":"Weaver","avatar":"https://reqres.in/img/faces/2-image.jpg"},"support":{"url":"https://reqres.in/#support-heading","text":"To keep ReqRes free, contributions towards server costs are appreciated!"}} -INFO  conf.logger:test_get_request.py:31 type of json response : -INFO  conf.logger:File_Operations.py:45 JSON data successfully saved to API_Requests/Data/Response_Body\get_data.json -INFO  conf.logger:conftest.py:34 Starting test cleanup process... -INFO  conf.logger:conftest.py:36 Cleaning up authentication token... -INFO  conf.logger:conftest.py:37 Authentication token cleaned up successfully. -INFO  conf.logger:conftest.py:38 Test cleanup completed. Resources released. \ No newline at end of file diff --git a/Reports/Allure_Reports/7f364411-531b-4b40-b81a-966ed61337e8-attachment.txt b/Reports/Allure_Reports/7f364411-531b-4b40-b81a-966ed61337e8-attachment.txt deleted file mode 100644 index 6f1c5ee..0000000 --- a/Reports/Allure_Reports/7f364411-531b-4b40-b81a-966ed61337e8-attachment.txt +++ /dev/null @@ -1,20 +0,0 @@ -INFO  conf.logger:conftest.py:27 Starting test setup process... -INFO  conf.logger:conftest.py:29 Generating authentication token... -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:conftest.py:31 Authentication token generated successfully. -INFO  conf.logger:conftest.py:32 Test setup completed. Ready to execute tests. -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:File_Operations.py:64 JSON data successfully read from API_Requests/Data/Request_Body\post_data.json -INFO  conf.logger:test_post_data_request.py:22 *********** executing test_005 **************** -INFO  conf.logger:Rest_Client.py:92 Request url is : https://reqres.in/api/users -INFO  conf.logger:Rest_Client.py:97 Initializing POST rest call from https://reqres.in/api/users -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"name":"morpheus","job":"leader","id":"305","createdAt":"2024-09-05T10:15:20.414Z"} -INFO  conf.logger:Rest_Client.py:99 POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '305', 'createdAt': '2024-09-05T10:15:20.414Z'} -INFO  conf.logger:Rest_Client.py:100 POST Request Status Code : 201 -INFO  conf.logger:Rest_Client.py:102 POST Request Status Code : 201 -INFO  conf.logger:Rest_Client.py:104 POST request is successful... -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"name":"morpheus","job":"leader","id":"305","createdAt":"2024-09-05T10:15:20.414Z"} -INFO  conf.logger:conftest.py:34 Starting test cleanup process... -INFO  conf.logger:conftest.py:36 Cleaning up authentication token... -INFO  conf.logger:conftest.py:37 Authentication token cleaned up successfully. -INFO  conf.logger:conftest.py:38 Test cleanup completed. Resources released. \ No newline at end of file diff --git a/Reports/Allure_Reports/825afacb-9939-408c-88d1-4ef3b5efd67a-container.json b/Reports/Allure_Reports/825afacb-9939-408c-88d1-4ef3b5efd67a-container.json deleted file mode 100644 index 18fa16b..0000000 --- a/Reports/Allure_Reports/825afacb-9939-408c-88d1-4ef3b5efd67a-container.json +++ /dev/null @@ -1 +0,0 @@ -{"uuid": "be4ae1a1-d2c9-4dd5-b190-23b8c658280a", "children": ["10be088d-5a96-4b14-92fd-bb6ec641bebd"], "befores": [{"name": "setup_teardown", "status": "passed", "start": 1725531413591, "stop": 1725531413598}], "afters": [{"name": "setup_teardown::0", "status": "passed", "start": 1725531413992, "stop": 1725531413994}], "start": 1725531413591, "stop": 1725531413994} \ No newline at end of file diff --git a/Reports/Allure_Reports/96f69c31-c961-4912-a207-a46693e23256-result.json b/Reports/Allure_Reports/96f69c31-c961-4912-a207-a46693e23256-result.json deleted file mode 100644 index 7d56d90..0000000 --- a/Reports/Allure_Reports/96f69c31-c961-4912-a207-a46693e23256-result.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "test_001", "status": "passed", "description": "\" Test to check GET Request is successful with response and successful status code", "attachments": [{"name": "log", "source": "7aec0816-3fc7-47ae-971a-b9382e210bc2-attachment.txt", "type": "text/plain"}], "start": 1725531412091, "stop": 1725531412193, "uuid": "ce9366f1-e08c-4196-bf74-e528698bb00c", "historyId": "c49f6ccde30bba5f761972896245fa5d", "testCaseId": "c49f6ccde30bba5f761972896245fa5d", "fullName": "API_Requests.Tests.test_get_request.Test_001#test_001", "labels": [{"name": "parentSuite", "value": "API_Requests.Tests"}, {"name": "suite", "value": "test_get_request"}, {"name": "subSuite", "value": "Test_001"}, {"name": "host", "value": "NIT2LPT-24-269"}, {"name": "thread", "value": "15292-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "API_Requests.Tests.test_get_request"}]} \ No newline at end of file diff --git a/Reports/Allure_Reports/99933b7a-84ea-47ee-92a8-2319708dc768-container.json b/Reports/Allure_Reports/99933b7a-84ea-47ee-92a8-2319708dc768-container.json deleted file mode 100644 index e3b7efe..0000000 --- a/Reports/Allure_Reports/99933b7a-84ea-47ee-92a8-2319708dc768-container.json +++ /dev/null @@ -1 +0,0 @@ -{"uuid": "30908757-f535-4110-9342-c78735708255", "children": ["f15613be-d981-4b54-a1a2-b4a3f0a0a34d"], "befores": [{"name": "setup_teardown", "status": "passed", "start": 1725531412787, "stop": 1725531412789}], "afters": [{"name": "setup_teardown::0", "status": "passed", "start": 1725531413180, "stop": 1725531413181}], "start": 1725531412787, "stop": 1725531413181} \ No newline at end of file diff --git a/Reports/Allure_Reports/a4b3837d-ea84-4138-8e32-cee846e6b2bd-result.json b/Reports/Allure_Reports/a4b3837d-ea84-4138-8e32-cee846e6b2bd-result.json deleted file mode 100644 index dc9f8e3..0000000 --- a/Reports/Allure_Reports/a4b3837d-ea84-4138-8e32-cee846e6b2bd-result.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "test_002", "status": "passed", "description": "\" Test to check POST Request is successful to add new resource into server", "attachments": [{"name": "log", "source": "c6fb5d42-64d5-475c-8f3f-ede4ba856a9d-attachment.txt", "type": "text/plain"}], "start": 1725531413195, "stop": 1725531413583, "uuid": "9704c27b-6b66-43f2-8091-1b39f2d17a8f", "historyId": "999315d5795dc310f54aeea4256b3c9d", "testCaseId": "999315d5795dc310f54aeea4256b3c9d", "fullName": "API_Requests.Tests.test_post_request.Test_002#test_002", "labels": [{"name": "parentSuite", "value": "API_Requests.Tests"}, {"name": "suite", "value": "test_post_request"}, {"name": "subSuite", "value": "Test_002"}, {"name": "host", "value": "NIT2LPT-24-269"}, {"name": "thread", "value": "15292-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "API_Requests.Tests.test_post_request"}]} \ No newline at end of file diff --git a/Reports/Allure_Reports/aff6372d-8698-4e61-8cf8-58fb9ae49027-result.json b/Reports/Allure_Reports/aff6372d-8698-4e61-8cf8-58fb9ae49027-result.json deleted file mode 100644 index f8b6275..0000000 --- a/Reports/Allure_Reports/aff6372d-8698-4e61-8cf8-58fb9ae49027-result.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "test_003", "status": "passed", "attachments": [{"name": "log", "source": "b165887c-e152-4f37-aa95-bd41fcddb8e7-attachment.txt", "type": "text/plain"}], "start": 1725531413598, "stop": 1725531413992, "uuid": "10be088d-5a96-4b14-92fd-bb6ec641bebd", "historyId": "f58e8e4672b2f85a67ec3dd4aec1e97e", "testCaseId": "f58e8e4672b2f85a67ec3dd4aec1e97e", "fullName": "API_Requests.Tests.test_put_request.Test_003#test_003", "labels": [{"name": "parentSuite", "value": "API_Requests.Tests"}, {"name": "suite", "value": "test_put_request"}, {"name": "subSuite", "value": "Test_003"}, {"name": "host", "value": "NIT2LPT-24-269"}, {"name": "thread", "value": "15292-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "API_Requests.Tests.test_put_request"}]} \ No newline at end of file diff --git a/Reports/Allure_Reports/b165887c-e152-4f37-aa95-bd41fcddb8e7-attachment.txt b/Reports/Allure_Reports/b165887c-e152-4f37-aa95-bd41fcddb8e7-attachment.txt deleted file mode 100644 index 02e3b1c..0000000 --- a/Reports/Allure_Reports/b165887c-e152-4f37-aa95-bd41fcddb8e7-attachment.txt +++ /dev/null @@ -1,19 +0,0 @@ -INFO  conf.logger:conftest.py:27 Starting test setup process... -INFO  conf.logger:conftest.py:29 Generating authentication token... -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:conftest.py:31 Authentication token generated successfully. -INFO  conf.logger:conftest.py:32 Test setup completed. Ready to execute tests. -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:File_Operations.py:64 JSON data successfully read from API_Requests/Data/Request_Body\put_data.json -INFO  conf.logger:test_put_request.py:19 *********** executing test_003 **************** -INFO  conf.logger:Rest_Client.py:144 Request url is : https://reqres.in/api/users/2 -INFO  conf.logger:Rest_Client.py:149 Initializing PUT rest call from https://reqres.in/api/users/2 -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T10:15:21.230Z"} -INFO  conf.logger:Rest_Client.py:152 PUT Response : {'name': 'morpheus', 'job': 'zion resident', 'updatedAt': '2024-09-05T10:15:21.230Z'} -INFO  conf.logger:Rest_Client.py:153 PUT request Status code : 200 -INFO  conf.logger:Rest_Client.py:155 PUT request is successful..... -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"name":"morpheus","job":"zion resident","updatedAt":"2024-09-05T10:15:21.230Z"} -INFO  conf.logger:conftest.py:34 Starting test cleanup process... -INFO  conf.logger:conftest.py:36 Cleaning up authentication token... -INFO  conf.logger:conftest.py:37 Authentication token cleaned up successfully. -INFO  conf.logger:conftest.py:38 Test cleanup completed. Resources released. \ No newline at end of file diff --git a/Reports/Allure_Reports/c1496cde-54a8-40da-95fa-078d835ee1ff-container.json b/Reports/Allure_Reports/c1496cde-54a8-40da-95fa-078d835ee1ff-container.json deleted file mode 100644 index 6ec36bd..0000000 --- a/Reports/Allure_Reports/c1496cde-54a8-40da-95fa-078d835ee1ff-container.json +++ /dev/null @@ -1 +0,0 @@ -{"uuid": "10a9b466-662d-4138-b760-b0facac489cd", "children": ["fb299356-b11d-434a-920d-f2e51b401eb3"], "befores": [{"name": "setup_teardown", "status": "passed", "start": 1725531414004, "stop": 1725531414008}], "afters": [{"name": "setup_teardown::0", "status": "passed", "start": 1725531414411, "stop": 1725531414411}], "start": 1725531414004, "stop": 1725531414411} \ No newline at end of file diff --git a/Reports/Allure_Reports/c6fb5d42-64d5-475c-8f3f-ede4ba856a9d-attachment.txt b/Reports/Allure_Reports/c6fb5d42-64d5-475c-8f3f-ede4ba856a9d-attachment.txt deleted file mode 100644 index 927daf7..0000000 --- a/Reports/Allure_Reports/c6fb5d42-64d5-475c-8f3f-ede4ba856a9d-attachment.txt +++ /dev/null @@ -1,19 +0,0 @@ -INFO  conf.logger:conftest.py:27 Starting test setup process... -INFO  conf.logger:conftest.py:29 Generating authentication token... -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:conftest.py:31 Authentication token generated successfully. -INFO  conf.logger:conftest.py:32 Test setup completed. Ready to execute tests. -INFO  conf.logger:Rest_Client.py:17 Base url is : https://reqres.in/api/ -INFO  conf.logger:test_post_request.py:25 *********** executing test_002 **************** -INFO  conf.logger:Rest_Client.py:92 Request url is : https://reqres.in/api/users -INFO  conf.logger:Rest_Client.py:97 Initializing POST rest call from https://reqres.in/api/users -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"name":"morpheus","job":"leader","id":"807","createdAt":"2024-09-05T10:15:20.815Z"} -INFO  conf.logger:Rest_Client.py:99 POST Response : {'name': 'morpheus', 'job': 'leader', 'id': '807', 'createdAt': '2024-09-05T10:15:20.815Z'} -INFO  conf.logger:Rest_Client.py:100 POST Request Status Code : 201 -INFO  conf.logger:Rest_Client.py:102 POST Request Status Code : 201 -INFO  conf.logger:Rest_Client.py:104 POST request is successful... -INFO  conf.logger:Rest_Client.py:223 Response JSON : {"name":"morpheus","job":"leader","id":"807","createdAt":"2024-09-05T10:15:20.815Z"} -INFO  conf.logger:conftest.py:34 Starting test cleanup process... -INFO  conf.logger:conftest.py:36 Cleaning up authentication token... -INFO  conf.logger:conftest.py:37 Authentication token cleaned up successfully. -INFO  conf.logger:conftest.py:38 Test cleanup completed. Resources released. \ No newline at end of file diff --git a/Reports/Allure_Reports/e50cb7b3-208e-4f4b-ba7d-050c82ef4231-container.json b/Reports/Allure_Reports/e50cb7b3-208e-4f4b-ba7d-050c82ef4231-container.json deleted file mode 100644 index 63418a9..0000000 --- a/Reports/Allure_Reports/e50cb7b3-208e-4f4b-ba7d-050c82ef4231-container.json +++ /dev/null @@ -1 +0,0 @@ -{"uuid": "57ed48b3-c4af-4882-8e3e-fa5a9599e5f1", "children": ["63b7fdb4-da3c-4c08-87dd-5bd0d38766cb"], "befores": [{"name": "setup_teardown", "status": "passed", "start": 1725531412202, "stop": 1725531412205}], "afters": [{"name": "setup_teardown::0", "status": "passed", "start": 1725531412779, "stop": 1725531412780}], "start": 1725531412202, "stop": 1725531412780} \ No newline at end of file diff --git a/Reports/Allure_Reports/e61c76c2-c3b5-41ad-91fc-b3945d45aed4-result.json b/Reports/Allure_Reports/e61c76c2-c3b5-41ad-91fc-b3945d45aed4-result.json deleted file mode 100644 index 69da695..0000000 --- a/Reports/Allure_Reports/e61c76c2-c3b5-41ad-91fc-b3945d45aed4-result.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "test_005", "status": "passed", "description": "\" Test to check POST Request is successful to add new resource into server", "attachments": [{"name": "log", "source": "7f364411-531b-4b40-b81a-966ed61337e8-attachment.txt", "type": "text/plain"}], "start": 1725531412789, "stop": 1725531413179, "uuid": "f15613be-d981-4b54-a1a2-b4a3f0a0a34d", "historyId": "5da66ed5337946512b8cde1b66de5fa3", "testCaseId": "5da66ed5337946512b8cde1b66de5fa3", "fullName": "API_Requests.Tests.test_post_data_request.Test_005#test_005", "labels": [{"name": "parentSuite", "value": "API_Requests.Tests"}, {"name": "suite", "value": "test_post_data_request"}, {"name": "subSuite", "value": "Test_005"}, {"name": "host", "value": "NIT2LPT-24-269"}, {"name": "thread", "value": "15292-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "API_Requests.Tests.test_post_data_request"}]} \ No newline at end of file diff --git a/Reports/Allure_Reports/eb86f39f-9a01-4d38-8812-e7af990fe508-container.json b/Reports/Allure_Reports/eb86f39f-9a01-4d38-8812-e7af990fe508-container.json deleted file mode 100644 index e5a3308..0000000 --- a/Reports/Allure_Reports/eb86f39f-9a01-4d38-8812-e7af990fe508-container.json +++ /dev/null @@ -1 +0,0 @@ -{"uuid": "0c2025ca-8f72-43db-a212-04467ea238c1", "children": ["ce9366f1-e08c-4196-bf74-e528698bb00c"], "befores": [{"name": "setup_teardown", "status": "passed", "start": 1725531412085, "stop": 1725531412089}], "afters": [{"name": "setup_teardown::0", "status": "passed", "start": 1725531412194, "stop": 1725531412195}], "start": 1725531412085, "stop": 1725531412195} \ No newline at end of file diff --git a/Reports/Allure_Reports/fe8d3973-6d84-4bf2-b676-2a8c1aaced9b-container.json b/Reports/Allure_Reports/fe8d3973-6d84-4bf2-b676-2a8c1aaced9b-container.json deleted file mode 100644 index 29dc289..0000000 --- a/Reports/Allure_Reports/fe8d3973-6d84-4bf2-b676-2a8c1aaced9b-container.json +++ /dev/null @@ -1 +0,0 @@ -{"uuid": "4473cb33-bd84-464e-aae1-dcf467780305", "children": ["4acb0e07-6510-438e-b229-c454f0a58116"], "befores": [{"name": "setup_teardown", "status": "passed", "start": 1725531411549, "stop": 1725531411555}], "afters": [{"name": "setup_teardown::0", "status": "passed", "start": 1725531412069, "stop": 1725531412069}], "start": 1725531411549, "stop": 1725531412069} \ No newline at end of file diff --git a/Requirements/requirements.txt b/Requirements/requirements.txt index 490a570..5bddc51 100644 --- a/Requirements/requirements.txt +++ b/Requirements/requirements.txt @@ -6,7 +6,7 @@ attrs == 24.2.0 certifi == 2024.7.4 charset-normalizer == 3.3.2 colorama == 0.4.6 -flake8 == 7.1.1 +flake8 == 7.1.1 idna == 3.7 iniconfig == 2.0.0 logging == 0.4.9.6 diff --git a/conf/config.ini b/conf/config.ini index a860e08..606dd39 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -1,5 +1,10 @@ [API] base_url = https://reqres.in/api/ +get_endpoint = users/2 +post_endpoint = users +put_endpoint = users/2 +delete_endpoint = objects/6 +register_endpoint = register [API1] base_url = https://api.restful-api.dev/ diff --git a/conf/logger.py b/conf/logger.py index bb12d39..0001bdf 100644 --- a/conf/logger.py +++ b/conf/logger.py @@ -1,11 +1,22 @@ +import datetime import logging import os -import time + def logGen(): - logging.basicConfig(filename=f"API_Requests/Logs/log_{time.strftime('%Y%m%d_%H%M%S')}.log",format="%(asctime)s %(levelname)s %(message)s", - datefmt="%m %d %Y %H %M %S", filemode="w") + current_date = datetime.datetime.now().strftime("%Y_%m_%d") + timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + + # Create a folder for the current date inside the Logs directory + log_directory ="Logs" + date_folder_path = os.path.join(log_directory, current_date) + os.makedirs(date_folder_path, exist_ok=True) + + # Define the log file path with timestamp + log_file_path = os.path.join(date_folder_path,f"log_{timestamp}.log") + + log_directory = "Logs" if not os.path.exists(log_directory): @@ -15,8 +26,10 @@ def logGen(): logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) - file_handler = logging.FileHandler(f"Logs/log_{time.strftime('%Y%m%d_%H%M%S')}.log", mode="w") + file_handler = logging.FileHandler(log_file_path, mode="w") file_handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s")) logger.addHandler(file_handler) - return logger \ No newline at end of file + return logger + +logger = logGen() \ No newline at end of file