From 491fe88e69d0b148dcf0353c0ce438767adde906 Mon Sep 17 00:00:00 2001
From: Karim Elkomy <36358820+karimelkomy@users.noreply.github.com>
Date: Tue, 26 Nov 2019 11:12:39 +0200
Subject: [PATCH 1/8] Delete keymap.xml
---
_mac/keymap.xml | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 _mac/keymap.xml
diff --git a/_mac/keymap.xml b/_mac/keymap.xml
deleted file mode 100644
index 4ada508..0000000
--- a/_mac/keymap.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
From 030b9c89017584e3faf6ed0e92e60a9aac5a1b9f Mon Sep 17 00:00:00 2001
From: Karim Elkomy <36358820+karimelkomy@users.noreply.github.com>
Date: Tue, 26 Nov 2019 11:12:48 +0200
Subject: [PATCH 2/8] Delete laf.xml
---
_mac/laf.xml | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 _mac/laf.xml
diff --git a/_mac/laf.xml b/_mac/laf.xml
deleted file mode 100644
index dbf49b4..0000000
--- a/_mac/laf.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
From 1b2503034c97001f33ee0d4000a0cbf26afb321e Mon Sep 17 00:00:00 2001
From: Karim Elkomy <36358820+karimelkomy@users.noreply.github.com>
Date: Tue, 26 Nov 2019 11:13:00 +0200
Subject: [PATCH 3/8] Delete Default.xml
---
codestyles/Default.xml | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 codestyles/Default.xml
diff --git a/codestyles/Default.xml b/codestyles/Default.xml
deleted file mode 100644
index e94f32a..0000000
--- a/codestyles/Default.xml
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
From 6df4b3fa86eb721c82b8bdec61dabd3527ec6840 Mon Sep 17 00:00:00 2001
From: Karim Elkomy <36358820+karimelkomy@users.noreply.github.com>
Date: Tue, 26 Nov 2019 11:13:19 +0200
Subject: [PATCH 4/8] Delete debugger.xml
---
debugger.xml | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 debugger.xml
diff --git a/debugger.xml b/debugger.xml
deleted file mode 100644
index 16f98b3..0000000
--- a/debugger.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
From 6222e9c81168cf7909376ee50d1358396b060ecc Mon Sep 17 00:00:00 2001
From: Karim Elkomy <36358820+karimelkomy@users.noreply.github.com>
Date: Tue, 26 Nov 2019 11:13:29 +0200
Subject: [PATCH 5/8] Delete filetypes.xml
---
filetypes.xml | 8 --------
1 file changed, 8 deletions(-)
delete mode 100644 filetypes.xml
diff --git a/filetypes.xml b/filetypes.xml
deleted file mode 100644
index d0f4d90..0000000
--- a/filetypes.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
From 44fe58f232ce490e0740c25a04f88df6a756e934 Mon Sep 17 00:00:00 2001
From: Karim Elkomy <36358820+karimelkomy@users.noreply.github.com>
Date: Tue, 26 Nov 2019 11:13:38 +0200
Subject: [PATCH 6/8] Delete ide.general.xml
---
ide.general.xml | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 ide.general.xml
diff --git a/ide.general.xml b/ide.general.xml
deleted file mode 100644
index a4827a0..0000000
--- a/ide.general.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
From 70317ef643fa3e5540a177304e9e40a5f5892c66 Mon Sep 17 00:00:00 2001
From: Karim Elkomy <36358820+karimelkomy@users.noreply.github.com>
Date: Tue, 26 Nov 2019 11:13:47 +0200
Subject: [PATCH 7/8] Delete log_highlighting.xml
---
log_highlighting.xml | 20 --------------------
1 file changed, 20 deletions(-)
delete mode 100644 log_highlighting.xml
diff --git a/log_highlighting.xml b/log_highlighting.xml
deleted file mode 100644
index dddc99e..0000000
--- a/log_highlighting.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
- 3
-
-
\ No newline at end of file
From bd87c4d9c4c662cc12463ee6e3eb86bc1a34c510 Mon Sep 17 00:00:00 2001
From: "karimelkomy@msn.com" <$Yasmine89$>
Date: Tue, 28 Jun 2022 22:06:22 +0200
Subject: [PATCH 8/8] Update readme
---
README.md | 68 +++++++++++++++++++++++++------------------------------
1 file changed, 31 insertions(+), 37 deletions(-)
diff --git a/README.md b/README.md
index db7f00d..951d195 100644
--- a/README.md
+++ b/README.md
@@ -1,28 +1,25 @@
# Python-Test-Automation-Framework
-Description
-=============
-Test Automation Framework using selenium and Python with the below features:
+# Description
-* Framework is based on page object model.
-* Reporting using Allure report.
-* Reading locators from JSON file.
-* Reading test data from JSON file.
-* Integrated with TestRail to update test cases status after each run.
-* Framework can integrate with CodeShip.
+Test Automation Framework using selenium and Python with the below features:
+- Framework is based on page object model.
+- Reporting using Allure report.
+- Reading locators from JSON file.
+- Reading test data from JSON file.
+- Integrated with TestRail to update test cases status after each run.
+- Framework can integrate with CodeShip.
-Install dependences
-=====================
-* Install the depended packages in ``requirements.txt`` using ``pip install -r requirements.txt``
+# Install dependences
+- Install the depended packages in `requirements.txt` using `pip install -r requirements.txt`
-Create new test case
-=====================
+# Create new test case
In order to create a new test case using the **Framework**, you have to follow the below steps:
-* In **locators module**, create a new locator for the element you would like to use, as below:
+- In **locators module**, create a new locator for the element you would like to use, as below:
[{
@@ -32,7 +29,7 @@ In order to create a new test case using the **Framework**, you have to follow t
"locator": "//a[contains(text(),'Log In')]"
}]
-* In **test data module**, add the test data needed for your test case, as below:
+- In **test data module**, add the test data needed for your test case, as below:
{
"environment": "https://learn.letskodeit.com/",
@@ -41,26 +38,25 @@ In order to create a new test case using the **Framework**, you have to follow t
"password": "abcabc"
}
-
* If the element exist in more than one page (**Navigation element**), use **navigation module** to create a script for that navigation bar and add your navigation action to that element, as below:
def goToLoginPage(self):
self.elementClick(*self.locator(self.homePage_locators, 'link_login'))
-* If the element exists in only one page, go to **page module** and create a new script for that page e.g: ``login_page.py`` and add all the actions in that page, as below:
+* If the element exists in only one page, go to **page module** and create a new script for that page e.g: `login_page.py` and add all the actions in that page, as below:
def login(self, email, password):
self.sendKeys(email, *self.locator(self.loginPage_locators, 'input_email'))
self.sendKeys(password, *self.locator(self.loginPage_locators, 'input_password'))
self.elementClick(*self.locator(self.loginPage_locators, 'btn_login'))
-* Then, in **test module**, create a new script for your test case(s) e.g: ``test_login.py`` and add your test case, as below:
+* Then, in **test module**, create a new script for your test case(s) e.g: `test_login.py` and add your test case, as below:
@allure.story('epic_1') # story of the test case
@allure.severity(allure.severity_level.MINOR) # severity of the test case
@pytestrail.case('C48') # test case id on test rail
def test_login_successfully(self):
-
+
with allure.step('Navigate to login page'): # name of the test step
self.homeNavigation.goToLoginPage()
self.ts.markFinal(self.loginPage.isAt, "navigation to login page failed") # check if the navigation to login page occurs successfully
@@ -69,39 +65,35 @@ In order to create a new test case using the **Framework**, you have to follow t
self.loginPage.login(email=td.testData("email"), password=td.testData("password"))
self.ts.markFinal(self.dashboardPage.isAt, "login failed") # check if login successfully
-
**Notes:**
- * use ``@allure.story('[epic name]')`` decorator before each test case to define the related epic / story.
- * use ``@allure.severity(allure.severity_level.[severity])`` decorator before each test case to define the severity of the test case Minor/Major/Critical/Blocker.
- * use ``@pytestrail.case('[test case id on testrail]')`` decorator before each test case to defione the related test case id on test rail to make the script update run status on test rail.
+- use `@allure.story('[epic name]')` decorator before each test case to define the related epic / story.
+- use `@allure.severity(allure.severity_level.[severity])` decorator before each test case to define the severity of the test case Minor/Major/Critical/Blocker.
+- use `@pytestrail.case('[test case id on testrail]')` decorator before each test case to defione the related test case id on test rail to make the script update run status on test rail.
-Run the test case
-==================
+# Run the test case
In order to run the test case after creation, use on of the below commands:
-* To run the test case and create allure report but without update the status run on TestRail:
-
-``py.test --alluredir=allure_report tests/test_login.py``
+- To run the test case and create allure report but without update the status run on TestRail:
-``allure serve allure_report``
+`py.test --alluredir=allure_report tests/test_login.py`
+`allure serve allure_report`
-* To run the test case, create allure report and update the status of run on TestRail:
+- To run the test case, create allure report and update the status of run on TestRail:
-``py.test --alluredir=allure_report tests/test_login.py --testrail``
+`py.test --alluredir=allure_report tests/test_login.py --testrail`
-``allure serve allure_report``
+`allure serve allure_report`
**Note:**
- * There are other options of run that you can search for them, as running all the test cases for specific epic/story or with specific severity
+- There are other options of run that you can search for them, as running all the test cases for specific epic/story or with specific severity
-Integration with TestRail
-=========================
+# Integration with TestRail
-In order to setup the integration with TestRail, edit ``testrail.cfg`` with your testrail domain and credentials, as below:
+In order to setup the integration with TestRail, edit `testrail.cfg` with your testrail domain and credentials, as below:
[API]
url = https://[your testrail domain].testrail.io
@@ -110,3 +102,5 @@ In order to setup the integration with TestRail, edit ``testrail.cfg`` with your
[TESTRUN]
project_id = [project id]
+
+========================