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: docs/RC/RC-API.md
+4-5
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
The RC API is the official way to interact with remote config. It allows to send RC payload to the library durint setup phase, and send request before/after each state change. Here is an example a scenario activating/deactivating ASM:
2
2
3
3
1. the library starts in an initial state where ASM is disabled. This state is validated with an assertion on a request containing an attack : the request should not been caught by ASM
4
-
2. Then a RC command is sent to activate ASM
5
-
3. another request containing an attack is sent, this one must be reported by ASM
6
-
4. A second command is sent to deactivate ASM
7
-
5. a thirst request containing an attack is sent, this last one should not be seen
8
-
4
+
1. Then a RC command is sent to activate ASM
5
+
1. another request containing an attack is sent, this one must be reported by ASM
6
+
1. A second command is sent to deactivate ASM
7
+
1. a thirst request containing an attack is sent, this last one should not be seen
9
8
10
9
Here is the test code performing that test. Please note the magic constants `ACTIVATE_ASM_PAYLOAD` and `DEACTIVATE_ASM_PAYLOAD`: they are encoded RC payload (exemple [here](https://github.com/DataDog/system-tests/blob/7644ceaa3c7ea44ade8bcca8c3bb2a5991d03e34/utils/proxy/rc_mocked_responses_asm_activate_only.json)). We still miss a tool that generate them from human-readable content, it will come in a near future.
In this code example, we can see that we are defining a proxy for remote config, with the name **APPSEC_API_SECURITY_RC**,
17
-
it means that this scenario will mock calls from libraries to `/v7/config` by the content in *utils/proxy/rc_mocked_responses_**appsec_api_security_rc**.json* file.
18
+
it means that this scenario will mock calls from libraries to `/v7/config` by the content in *utils/proxy/rc_mocked_responses\_**appsec_api_security_rc**.json* file.
Copy file name to clipboardExpand all lines: docs/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
System tests is a test workbench that allows any kind of functional testing over libraries (AKA tracers) and agents. It's built with several key principles:
4
4
5
-
**Black box testing*: only components' interfaces are checked. As those interfaces are very stable, our tests can make assertions without any assumptions regarding underlying implementations. "Check that the car moves, regardless of the engine"
6
-
**No test isolation*: Yes, it's surprising. But it allows to be very fast. So never hesitate to add a new test. And if you need a very specific test case, we can run it separately.
5
+
-*Black box testing*: only components' interfaces are checked. As those interfaces are very stable, our tests can make assertions without any assumptions regarding underlying implementations. "Check that the car moves, regardless of the engine"
6
+
-*No test isolation*: Yes, it's surprising. But it allows to be very fast. So never hesitate to add a new test. And if you need a very specific test case, we can run it separately.
Copy file name to clipboardExpand all lines: docs/RFCs/manifest.md
+6-7
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# RFC status
2
2
3
-
* Initiated : June 2023
4
-
* Validated : july 2023
5
-
* Implemented : August 2023
3
+
- Initiated : June 2023
4
+
- Validated : july 2023
5
+
- Implemented : August 2023
6
6
7
7
### Context
8
8
@@ -20,7 +20,7 @@ Unfortunatly, it comes with a major drawback: Activating a single test can becom
20
20
To solve this, we'll try to leverage two points :
21
21
22
22
1. Often, those declarations involve only one component
23
-
2. Often, a component is modified by only one developper
23
+
1. Often, a component is modified by only one developper
24
24
25
25
The idea is to offer an alternative way to declare those metadata, using one file per component, also known as manifest file. Those files will be inside system tests repo, declaring for a given component some metadata.
26
26
@@ -54,12 +54,11 @@ Will support:
54
54
Won't support:
55
55
56
56
- any complex logic
57
-
_ because there is not limit on the complexity. We need to draw a line based on the ratio format simplicity / number of occurrences. The cutoff point is only test classes, declaring version for weblog variants, or skip reason for the entire class.
57
+
\_ because there is not limit on the complexity. We need to draw a line based on the ratio format simplicity / number of occurrences. The cutoff point is only test classes, declaring version for weblog variants, or skip reason for the entire class.
58
58
- declaring metadata (bug, flaky, irrelevant) for test methods
59
59
- because their namings are not stable, it would lead to frequent modifications of manifest files, spaming every team
60
60
- because conflict mostly happen at class level
61
61
62
-
63
62
## Example
64
63
65
64
```yaml
@@ -79,7 +78,7 @@ tests/:
79
78
"*": missing_feature # All other weblogs: not yet available
Copy file name to clipboardExpand all lines: docs/edit/add-test-class.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
When you add a test class (see [features](./features.md)), you need to declare what feature it belongs to in the [Feature Parity Dashbaord](https://feature-parity.us1.prod.dog/). To achieve that, use `@features` decorators :
2
2
3
-
4
3
```python
5
4
@features.awesome_tests
6
5
classTest_AwesomeFeature:
@@ -14,9 +13,9 @@ The link to the feature is in the docstring: hover the name, this link will show
14
13
## Use case 2: the feature does not exists
15
14
16
15
1. Create it in [Feature Parity Dashbaord](https://feature-parity.us1.prod.dog/)
17
-
2. pick its feature ID (the number in the URL)
18
-
3. copy pasta in `utils/_features.py` (its straightforward)
16
+
1. pick its feature ID (the number in the URL)
17
+
1. copy pasta in `utils/_features.py` (its straightforward)
0 commit comments