Skip to content

feat: add project files w testing reports+ ci/cd integration #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
INFO  WDM:logger.py:11 ====== WebDriver manager ======
INFO  WDM:logger.py:11 Get LATEST chromedriver version for google-chrome
INFO  WDM:logger.py:11 Get LATEST chromedriver version for google-chrome
INFO  WDM:logger.py:11 There is no [win64] chromedriver "133.0.6943.141" for browser google-chrome "133.0.6943" in cache
INFO  WDM:logger.py:11 Get LATEST chromedriver version for google-chrome
INFO  WDM:logger.py:11 WebDriver version 133.0.6943.141 selected
INFO  WDM:logger.py:11 Modern chrome version https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.141/win32/chromedriver-win32.zip
INFO  WDM:logger.py:11 About to download new driver from https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.141/win32/chromedriver-win32.zip
INFO  WDM:logger.py:11 Driver downloading response is 200
INFO  WDM:logger.py:11 Get LATEST chromedriver version for google-chrome
INFO  WDM:logger.py:11 Driver has been saved in cache [C:\Users\Veydant Katyal\.wdm\drivers\chromedriver\win64\133.0.6943.141]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INFO  WDM:logger.py:11 ====== WebDriver manager ======
INFO  WDM:logger.py:11 Get LATEST chromedriver version for google-chrome
INFO  WDM:logger.py:11 Get LATEST chromedriver version for google-chrome
INFO  WDM:logger.py:11 Driver [C:\Users\Veydant Katyal\.wdm\drivers\chromedriver\win64\133.0.6943.141\chromedriver-win32/chromedriver.exe] found in cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name": "test_valid_login", "status": "broken", "statusDetails": {"message": "selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {\"method\":\"link text\",\"selector\":\"My Account\"}\n (Session info: chrome=133.0.6943.142); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception\nStacktrace:\n\tGetHandleVerifier [0x011C0B43+25139]\n\t(No symbol) [0x011513F4]\n\t(No symbol) [0x010304E3]\n\t(No symbol) [0x010783D7]\n\t(No symbol) [0x0107872B]\n\t(No symbol) [0x010C1002]\n\t(No symbol) [0x0109D014]\n\t(No symbol) [0x010BE778]\n\t(No symbol) [0x0109CDC6]\n\t(No symbol) [0x0106BDE9]\n\t(No symbol) [0x0106D124]\n\tGetHandleVerifier [0x014C4373+3185251]\n\tGetHandleVerifier [0x014E291A+3309578]\n\tGetHandleVerifier [0x014DCF42+3286578]\n\tGetHandleVerifier [0x01257AE0+643536]\n\t(No symbol) [0x0115A20D]\n\t(No symbol) [0x011570B8]\n\t(No symbol) [0x01157257]\n\t(No symbol) [0x01149E00]\n\tBaseThreadInitThunk [0x76C55D49+25]\n\tRtlInitializeExceptionChain [0x7703CDEB+107]\n\tRtlGetAppContainerNamedObjectPath [0x7703CD71+561]", "trace": "setup = <selenium.webdriver.chrome.webdriver.WebDriver (session=\"be143b06238169515c56f62b9f4b485a\")>\n\n def test_valid_login(setup):\n \"\"\"Test case to verify login functionality.\"\"\"\n driver = setup\n> driver.find_element(By.LINK_TEXT, \"My Account\").click()\n\ntest_regression.py:16: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n..\\..\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:888: in find_element\n return self.execute(Command.FIND_ELEMENT, {\"using\": by, \"value\": value})[\"value\"]\n..\\..\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:429: in execute\n self.error_handler.check_response(response)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000001FD28537070>\nresponse = {'status': 404, 'value': '{\"value\":{\"error\":\"no such element\",\"message\":\"no such element: Unable to locate element: {\\...9+25]\\\\n\\\\tRtlInitializeExceptionChain [0x7703CDEB+107]\\\\n\\\\tRtlGetAppContainerNamedObjectPath [0x7703CD71+561]\\\\n\"}}'}\n\n def check_response(self, response: Dict[str, Any]) -> None:\n \"\"\"Checks that a JSON response from the WebDriver does not have an\n error.\n \n :Args:\n - response - The JSON response from the WebDriver server as a dictionary\n object.\n \n :Raises: If the response contains an error message.\n \"\"\"\n status = response.get(\"status\", None)\n if not status or status == ErrorCode.SUCCESS:\n return\n value = None\n message = response.get(\"message\", \"\")\n screen: str = response.get(\"screen\", \"\")\n stacktrace = None\n if isinstance(status, int):\n value_json = response.get(\"value\", None)\n if value_json and isinstance(value_json, str):\n import json\n \n try:\n value = json.loads(value_json)\n if len(value) == 1:\n value = value[\"value\"]\n status = value.get(\"error\", None)\n if not status:\n status = value.get(\"status\", ErrorCode.UNKNOWN_ERROR)\n message = value.get(\"value\") or value.get(\"message\")\n if not isinstance(message, str):\n value = message\n message = message.get(\"message\")\n else:\n message = value.get(\"message\", None)\n except ValueError:\n pass\n \n exception_class: Type[WebDriverException]\n e = ErrorCode()\n error_codes = [item for item in dir(e) if not item.startswith(\"__\")]\n for error_code in error_codes:\n error_info = getattr(ErrorCode, error_code)\n if isinstance(error_info, list) and status in error_info:\n exception_class = getattr(ExceptionMapping, error_code, WebDriverException)\n break\n else:\n exception_class = WebDriverException\n \n if not value:\n value = response[\"value\"]\n if isinstance(value, str):\n raise exception_class(value)\n if message == \"\" and \"message\" in value:\n message = value[\"message\"]\n \n screen = None # type: ignore[assignment]\n if \"screen\" in value:\n screen = value[\"screen\"]\n \n stacktrace = None\n st_value = value.get(\"stackTrace\") or value.get(\"stacktrace\")\n if st_value:\n if isinstance(st_value, str):\n stacktrace = st_value.split(\"\\n\")\n else:\n stacktrace = []\n try:\n for frame in st_value:\n line = frame.get(\"lineNumber\", \"\")\n file = frame.get(\"fileName\", \"<anonymous>\")\n if line:\n file = f\"{file}:{line}\"\n meth = frame.get(\"methodName\", \"<anonymous>\")\n if \"className\" in frame:\n meth = f\"{frame['className']}.{meth}\"\n msg = \" at %s (%s)\"\n msg = msg % (meth, file)\n stacktrace.append(msg)\n except TypeError:\n pass\n if exception_class == UnexpectedAlertPresentException:\n alert_text = None\n if \"data\" in value:\n alert_text = value[\"data\"].get(\"text\")\n elif \"alert\" in value:\n alert_text = value[\"alert\"].get(\"text\")\n raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here\n> raise exception_class(message, screen, stacktrace)\nE selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {\"method\":\"link text\",\"selector\":\"My Account\"}\nE (Session info: chrome=133.0.6943.142); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception\nE Stacktrace:\nE \tGetHandleVerifier [0x011C0B43+25139]\nE \t(No symbol) [0x011513F4]\nE \t(No symbol) [0x010304E3]\nE \t(No symbol) [0x010783D7]\nE \t(No symbol) [0x0107872B]\nE \t(No symbol) [0x010C1002]\nE \t(No symbol) [0x0109D014]\nE \t(No symbol) [0x010BE778]\nE \t(No symbol) [0x0109CDC6]\nE \t(No symbol) [0x0106BDE9]\nE \t(No symbol) [0x0106D124]\nE \tGetHandleVerifier [0x014C4373+3185251]\nE \tGetHandleVerifier [0x014E291A+3309578]\nE \tGetHandleVerifier [0x014DCF42+3286578]\nE \tGetHandleVerifier [0x01257AE0+643536]\nE \t(No symbol) [0x0115A20D]\nE \t(No symbol) [0x011570B8]\nE \t(No symbol) [0x01157257]\nE \t(No symbol) [0x01149E00]\nE \tBaseThreadInitThunk [0x76C55D49+25]\nE \tRtlInitializeExceptionChain [0x7703CDEB+107]\nE \tRtlGetAppContainerNamedObjectPath [0x7703CD71+561]\n\n..\\..\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\selenium\\webdriver\\remote\\errorhandler.py:232: NoSuchElementException"}, "description": "Test case to verify login functionality.", "attachments": [{"name": "log", "source": "155aa7f6-b5d6-41e3-a437-5b8111ed4832-attachment.txt", "type": "text/plain"}], "start": 1741109466857, "stop": 1741109466877, "uuid": "b3f93390-a7c4-4b93-9c98-ff53b56f481b", "historyId": "dcd98da370e45558edd3b3ca72c516d8", "testCaseId": "dcd98da370e45558edd3b3ca72c516d8", "fullName": "test_regression#test_valid_login", "labels": [{"name": "suite", "value": "test_regression"}, {"name": "host", "value": "LAPTOP-H5U7AO80"}, {"name": "thread", "value": "37232-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_regression"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "0451028d-9289-4550-94a9-53a8de158167", "children": ["b3f93390-a7c4-4b93-9c98-ff53b56f481b"], "befores": [{"name": "setup", "status": "passed", "start": 1741109446123, "stop": 1741109466856}], "afters": [{"name": "setup::0", "status": "passed", "start": 1741109467175, "stop": 1741109469311}], "start": 1741109446123, "stop": 1741109469311}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name": "test_search_functionality", "status": "broken", "statusDetails": {"message": "selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\"[name=\"search\"]\"}\n (Session info: chrome=133.0.6943.142); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception\nStacktrace:\n\tGetHandleVerifier [0x011C0B43+25139]\n\t(No symbol) [0x011513F4]\n\t(No symbol) [0x010304E3]\n\t(No symbol) [0x010783D7]\n\t(No symbol) [0x0107872B]\n\t(No symbol) [0x010C1002]\n\t(No symbol) [0x0109D014]\n\t(No symbol) [0x010BE778]\n\t(No symbol) [0x0109CDC6]\n\t(No symbol) [0x0106BDE9]\n\t(No symbol) [0x0106D124]\n\tGetHandleVerifier [0x014C4373+3185251]\n\tGetHandleVerifier [0x014E291A+3309578]\n\tGetHandleVerifier [0x014DCF42+3286578]\n\tGetHandleVerifier [0x01257AE0+643536]\n\t(No symbol) [0x0115A20D]\n\t(No symbol) [0x011570B8]\n\t(No symbol) [0x01157257]\n\t(No symbol) [0x01149E00]\n\tBaseThreadInitThunk [0x76C55D49+25]\n\tRtlInitializeExceptionChain [0x7703CDEB+107]\n\tRtlGetAppContainerNamedObjectPath [0x7703CD71+561]", "trace": "setup = <selenium.webdriver.chrome.webdriver.WebDriver (session=\"fdbfb3aef019194f1fac3629c72bd108\")>\n\n def test_search_functionality(setup):\n \"\"\"Test case to verify search functionality.\"\"\"\n driver = setup\n> search_box = driver.find_element(By.NAME, \"search\")\n\ntest_regression.py:28: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n..\\..\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:888: in find_element\n return self.execute(Command.FIND_ELEMENT, {\"using\": by, \"value\": value})[\"value\"]\n..\\..\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:429: in execute\n self.error_handler.check_response(response)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000001FD28E4F730>\nresponse = {'status': 404, 'value': '{\"value\":{\"error\":\"no such element\",\"message\":\"no such element: Unable to locate element: {\\...9+25]\\\\n\\\\tRtlInitializeExceptionChain [0x7703CDEB+107]\\\\n\\\\tRtlGetAppContainerNamedObjectPath [0x7703CD71+561]\\\\n\"}}'}\n\n def check_response(self, response: Dict[str, Any]) -> None:\n \"\"\"Checks that a JSON response from the WebDriver does not have an\n error.\n \n :Args:\n - response - The JSON response from the WebDriver server as a dictionary\n object.\n \n :Raises: If the response contains an error message.\n \"\"\"\n status = response.get(\"status\", None)\n if not status or status == ErrorCode.SUCCESS:\n return\n value = None\n message = response.get(\"message\", \"\")\n screen: str = response.get(\"screen\", \"\")\n stacktrace = None\n if isinstance(status, int):\n value_json = response.get(\"value\", None)\n if value_json and isinstance(value_json, str):\n import json\n \n try:\n value = json.loads(value_json)\n if len(value) == 1:\n value = value[\"value\"]\n status = value.get(\"error\", None)\n if not status:\n status = value.get(\"status\", ErrorCode.UNKNOWN_ERROR)\n message = value.get(\"value\") or value.get(\"message\")\n if not isinstance(message, str):\n value = message\n message = message.get(\"message\")\n else:\n message = value.get(\"message\", None)\n except ValueError:\n pass\n \n exception_class: Type[WebDriverException]\n e = ErrorCode()\n error_codes = [item for item in dir(e) if not item.startswith(\"__\")]\n for error_code in error_codes:\n error_info = getattr(ErrorCode, error_code)\n if isinstance(error_info, list) and status in error_info:\n exception_class = getattr(ExceptionMapping, error_code, WebDriverException)\n break\n else:\n exception_class = WebDriverException\n \n if not value:\n value = response[\"value\"]\n if isinstance(value, str):\n raise exception_class(value)\n if message == \"\" and \"message\" in value:\n message = value[\"message\"]\n \n screen = None # type: ignore[assignment]\n if \"screen\" in value:\n screen = value[\"screen\"]\n \n stacktrace = None\n st_value = value.get(\"stackTrace\") or value.get(\"stacktrace\")\n if st_value:\n if isinstance(st_value, str):\n stacktrace = st_value.split(\"\\n\")\n else:\n stacktrace = []\n try:\n for frame in st_value:\n line = frame.get(\"lineNumber\", \"\")\n file = frame.get(\"fileName\", \"<anonymous>\")\n if line:\n file = f\"{file}:{line}\"\n meth = frame.get(\"methodName\", \"<anonymous>\")\n if \"className\" in frame:\n meth = f\"{frame['className']}.{meth}\"\n msg = \" at %s (%s)\"\n msg = msg % (meth, file)\n stacktrace.append(msg)\n except TypeError:\n pass\n if exception_class == UnexpectedAlertPresentException:\n alert_text = None\n if \"data\" in value:\n alert_text = value[\"data\"].get(\"text\")\n elif \"alert\" in value:\n alert_text = value[\"alert\"].get(\"text\")\n raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here\n> raise exception_class(message, screen, stacktrace)\nE selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\"[name=\"search\"]\"}\nE (Session info: chrome=133.0.6943.142); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception\nE Stacktrace:\nE \tGetHandleVerifier [0x011C0B43+25139]\nE \t(No symbol) [0x011513F4]\nE \t(No symbol) [0x010304E3]\nE \t(No symbol) [0x010783D7]\nE \t(No symbol) [0x0107872B]\nE \t(No symbol) [0x010C1002]\nE \t(No symbol) [0x0109D014]\nE \t(No symbol) [0x010BE778]\nE \t(No symbol) [0x0109CDC6]\nE \t(No symbol) [0x0106BDE9]\nE \t(No symbol) [0x0106D124]\nE \tGetHandleVerifier [0x014C4373+3185251]\nE \tGetHandleVerifier [0x014E291A+3309578]\nE \tGetHandleVerifier [0x014DCF42+3286578]\nE \tGetHandleVerifier [0x01257AE0+643536]\nE \t(No symbol) [0x0115A20D]\nE \t(No symbol) [0x011570B8]\nE \t(No symbol) [0x01157257]\nE \t(No symbol) [0x01149E00]\nE \tBaseThreadInitThunk [0x76C55D49+25]\nE \tRtlInitializeExceptionChain [0x7703CDEB+107]\nE \tRtlGetAppContainerNamedObjectPath [0x7703CD71+561]\n\n..\\..\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\selenium\\webdriver\\remote\\errorhandler.py:232: NoSuchElementException"}, "description": "Test case to verify search functionality.", "attachments": [{"name": "log", "source": "30f6b6a9-3572-4ca2-9768-31997648f69a-attachment.txt", "type": "text/plain"}], "start": 1741109472563, "stop": 1741109472590, "uuid": "95643f62-2cd8-4391-a7f5-284f29d16e2a", "historyId": "69df921b0341110a67197181d975b5b5", "testCaseId": "69df921b0341110a67197181d975b5b5", "fullName": "test_regression#test_search_functionality", "labels": [{"name": "suite", "value": "test_regression"}, {"name": "host", "value": "LAPTOP-H5U7AO80"}, {"name": "thread", "value": "37232-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "test_regression"}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "2369c9e8-bc12-46b1-8f6d-f8e574ca9239", "children": ["95643f62-2cd8-4391-a7f5-284f29d16e2a"], "befores": [{"name": "setup", "status": "passed", "start": 1741109469319, "stop": 1741109472563}], "afters": [{"name": "setup::0", "status": "passed", "start": 1741109472635, "stop": 1741109474794}], "start": 1741109469319, "stop": 1741109474794}
4 changes: 4 additions & 0 deletions regression-testing/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
addopts = --capture=no --html=reports/test_report.html --alluredir=allure-results
log_cli = true
log_cli_level = INFO
Loading