You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,9 @@ More details of this module can be refered in [selpy](https://pypi.org/project/s
35
35
* Clone this repository
36
36
* Navigate to the cloned folder
37
37
* To install the dependencies in MAC we use Homebrew version manager install (using)[https://brew.sh/]
38
-
* Once brew is installed install python by ```brew install python3```
39
-
* To get additional dependencies of python like pip3, do ```brew postinstall python3```
40
-
* Install the required packages needed for this framework using ```pip3 install -r requirements.txt```
38
+
* Once brew is installed install python by `brew install python3`
39
+
* To get additional dependencies of python like pip3, do `brew postinstall python3`
40
+
* Install the required packages needed for this framework using `pip3 install -r requirements.txt`
41
41
42
42
## To Run the tests
43
43
For a simple run of all the test files in normal mode, try
@@ -46,6 +46,12 @@ For a simple run of all the test files in normal mode, try
46
46
pytest
47
47
```
48
48
49
+
To run the tests in snap mode (to save the UI texts to the dynamic file)
50
+
```shell script
51
+
snap=1 pytest
52
+
```
53
+
Once the changes are saved to the file run the tests with `pytest` to get the test running against the saved data. To verify this feature I intentionally added two locator texts which will be changing continuously.
54
+
49
55
To Run the tests in parallel mode or multi thread run for the available test files, try (To have parallel run you need to have atleast 2 tests inside your folder structure)
50
56
51
57
```shell script
@@ -306,9 +312,9 @@ assert (AmazonHomePage.is_home_page_displayed() is True), "Amazon home page is n
306
312
307
313
In order to have distinguished set of data I have used three types of data.
308
314
309
-
**Global** - Global configuration for the whole project. Here mode of run, browsers to use, browser configurations etc., are specified.
310
-
**Test Data** - This is to store the module level data. Ideally for each test file we need to have a test data file, but that depends on the requirement.
311
-
**Dynamic Data** - This is to store the dynamic data. Files in this folder are supposed to change when we run with `snap=1 pytest`. This is separated from the other data files so that other static files are not disturbed during the run.
315
+
* **Global** - Global configuration for the whole project. Here mode of run, browsers to use, browser configurations etc., are specified.
316
+
* **Test Data** - This is to store the module level data. Ideally for each test file we need to have a test data file, but that depends on the requirement.
317
+
* **Dynamic Data** - This is to store the dynamic data. Files in this folder are supposed to change when we run with `snap=1 pytest`. This is separated from the other data files so that other static files are not disturbed during the run.
This will compare and report it to allure and assertion has been done within that method.
341
347
342
-
4. While running the suite for first time where no data is saved within the test file, run the suite with ```snap=1 pytest``` this will ensure the UI data is being saved to the file.
348
+
4. While running the suite for first time where no data is saved within the test file, run the suite with `snap=1 pytest` this will ensure the UI data is being saved to the file.
343
349
344
350
5. Use only YML files for this purpose, since it is easier to handle key value pair with yaml file.
0 commit comments