Replies: 3 comments 7 replies
-
So, in this process, we are going to use a new built(PR version) e2e infra tool to drive some predictable cases, and verify whether this tool doesn't break anything existing. |
Beta Was this translation helpful? Give feedback.
-
Thanks for raising this incredible idea, I've never thought about testing infra e2e with the tool itself! From my understanding, there are two versions of If we find a verification bug, say, the actual data doesn't match the expected data file, and we want to verify this in a PR that trying to fix it, but the verification has a bug in all previous versions, including the released version, this means we have no idea whether the fix works or not, because the verification itself has a bug as it's using a version before the fix (the following part): verify: # (1)
fail-fast: false
concurrency: false
cases:
- name: Test infra e2e's fail-fast mode
query: e2e run -c case1/e2e.yaml verify -o yaml # the verification inside this `e2e` is OK because it uses PR codes
expected: case1/expected.yaml
# but we can't guarantee the `verify` section above in (1) is not buggy 😅 Does it make sense if we run all the two |
Beta Was this translation helpful? Give feedback.
-
I added a more detailed example to demonstrate the idea. cc @wu-sheng @kezhenxu94 As for the question asked by @kezhenxu94, IMO, verification is one of the most basic features provided by the Infra E2E, we can absolutely make sure it's correct with unit tests, right? |
Beta Was this translation helpful? Give feedback.
-
Background
Recently, there are several features implemented in SkyWalking Infra E2E (credit to @chunriyeqiongsaigao, the OSPP 2022 student), including fail-fast/non-fail-fast mode and concurrent verification. However, these features make Infra E2E more complicated, and they are not easy to test. So I suggested the student test these new features of Infra E2E with
httpbin
, more details can be seen here.This test method is very convenient when I want to verify Infra E2E’s updates. But we still need to do it manually (like modify e2e.yaml). So, how about automating it? Also, there is no E2E test for Infra E2E, maybe we can use Infra E2E itself to do this.
Overview
The basic flow of SkyWalking Infra E2E is like this:
If we use Infra E2E to test itself:
Example
If we use Infra E2E to test itself, the test folder structure will be like this:
For example, we want to test the fail-fast/non-fail-fast mode of the Infra E2E tool.
In the fail-fast mode, we expect that when any case fails, the tool will not continue to verify the rest of the cases.
So we can give three cases to the Infra E2E (the dev version), and the first case will fail (we can design these cases' results in advance), like:
Then use the dev version to verify them in the fail-fast case, the expected result should be 0 passed, 1 failed (case 1), 2 skipped (case 2 and case 3). We can let the dev version output the result in YAML format (not support yet), then it can be verified by Infra E2E (the released version):
Summary
It's kind of like a programming language bootstrap. Welcome to discuss as it's still just a rough idea. We can transfer this to an issue when we think the idea is feasible.
Beta Was this translation helpful? Give feedback.
All reactions