Skip to content

Commit 73da930

Browse files
readme reformat
1 parent a630cb3 commit 73da930

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ More details of this module can be refered in [selpy](https://pypi.org/project/s
3535
* Clone this repository
3636
* Navigate to the cloned folder
3737
* 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`
4141

4242
## To Run the tests
4343
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
4646
pytest
4747
```
4848

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+
4955
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)
5056

5157
```shell script
@@ -306,9 +312,9 @@ assert (AmazonHomePage.is_home_page_displayed() is True), "Amazon home page is n
306312
307313
In order to have distinguished set of data I have used three types of data.
308314
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.
312318
313319
## Detailing snap Mode:
314320
@@ -339,7 +345,7 @@ dynamic_variable.compare(ui_dynamic_data)
339345
340346
This will compare and report it to allure and assertion has been done within that method.
341347
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.
343349
344350
5. Use only YML files for this purpose, since it is easier to handle key value pair with yaml file.
345351

0 commit comments

Comments
 (0)