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
-[Adding to the Properties File](#adding-to-the-properties-file)
10
11
-[Using the Load Properties Utility](#using-the-load-properties-utility)
11
-
-[Example usage](#example-usage)
12
+
-[Example Usage](#example-usage)
12
13
13
14
## How This Works
14
15
@@ -24,13 +25,37 @@ To ensure that there are no mistakes when providing this input there are two add
24
25
1.`get_smokescreen_properties()`: Which will load `self.smokescreen_properties_file`
25
26
2.`get_general_properties()`: Which will load `self.general_properties_file`
26
27
28
+
## Adding to the Properties File
29
+
27
30
To add values to the properties file follow the format:
28
31
29
-
# ----------------------------------
30
-
# EXAMPLE VALUES
31
-
# ----------------------------------
32
-
example_value_1=value1
33
-
example_value_2=value2
32
+
```java
33
+
# ----------------------------------
34
+
# ExampleValues
35
+
# ----------------------------------
36
+
example_value_1=value1
37
+
example_value_2=value2
38
+
```
39
+
40
+
**Reasoning for storing values in the properties file:**
41
+
42
+
1. Properties files use key-value pairs because they provide a simple, organized, and flexible way to store configuration data.
43
+
44
+
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.
45
+
46
+
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.
47
+
48
+
**Why avoid hard coded values in tests?**
49
+
50
+
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.
51
+
52
+
2. Reusability: The same test code can be run with different data just by changing the properties file, making your tests more flexible.
53
+
54
+
3. Separation of Concerns: Test logic stays in your code, while test data and configuration are kept separate in the properties file.
55
+
56
+
4. Readability: It’s easier to see and manage all your test settings and data in one file.
57
+
58
+
5. Environment Flexibility: We can have different properties files for different environments (e.g., Development, Test, Production) without changing your test code.
34
59
35
60
## Using the Load Properties Utility
36
61
@@ -41,9 +66,11 @@ Here there are two fixtures:
41
66
1.`smokescreen_properties` - which is used to load the file: tests/smokescreen/bcss_smokescreen_tests.properties
42
67
2.`get_general_properties` - which is used to load the file: tests/bcss_tests.properties
0 commit comments