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
-[Example Usage - Properties files use key value pairs and the reason for using it is to avoid hard coded values in our tests](#example-usage---properties-files-use-key-value-pairs-and-the-reason-for-using-it-is-to-avoid-hard-coded-values-in-our-tests)
10
+
-[Example Usage](#example-usage)
11
11
-[Using the Load Properties Utility](#using-the-load-properties-utility)
12
-
-[Example usage](#example-usage)
12
+
-[Example Usage](#example-usage-1)
13
13
14
14
## How This Works
15
15
@@ -27,21 +27,25 @@ To ensure that there are no mistakes when providing this input there are two add
27
27
28
28
To add values to the properties file follow the format:
29
29
30
-
## Example Usage - Properties files use key value pairs and the reason for using it is to avoid hard coded values in our tests
30
+
## Example Usage
31
31
32
-
```python
33
-
from utils.load_properties import PropertiesFile
34
-
# Create an instance of the PropertiesFile class
35
-
properties = PropertiesFile()
32
+
1. Properties files use key-value pairs because they provide a simple, organized, and flexible way to store configuration data.
2. Each line in the file assigns a value to a key (For example, c1_daily_invitation_rate=10). This makes it easy to look up and change values as needed.
3. Using key-value pairs in properties files helps keep your tests clean, flexible, and easy to maintain by avoiding hard-coded values in your test scripts.
37
+
38
+
Why avoid hard coded values in tests?
39
+
40
+
1. Maintainability: If we need to update a value (like a test organization ID or a rate), we only have to change it in one place—the properties file—instead of searching through all your test code.
41
+
42
+
2. Reusability: The same test code can be run with different data just by changing the properties file, making your tests more flexible.
43
+
44
+
3. Separation of Concerns: Test logic stays in your code, while test data and configuration are kept separate in the properties file.
45
+
46
+
4. Readability: It’s easier to see and manage all your test settings and data in one file.
47
+
48
+
5. Environment Flexibility: We can have different properties files for different environments (e.g., Dev, Test, Prod) without changing your test code.
45
49
46
50
## Using the Load Properties Utility
47
51
@@ -52,11 +56,11 @@ Here there are two fixtures:
52
56
1.`smokescreen_properties` - which is used to load the file: tests/smokescreen/bcss_smokescreen_tests.properties
53
57
2.`get_general_properties` - which is used to load the file: tests/bcss_tests.properties
0 commit comments