You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/10/08 06:54:36 UTC

[skywalking] branch master updated: Fix wrong rules for checking lists in E2E (#7849)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new f76ad7a  Fix wrong rules for checking lists in E2E (#7849)
f76ad7a is described below

commit f76ad7a01d3028368ba157071f5c1513fca78f7f
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Oct 8 14:54:27 2021 +0800

    Fix wrong rules for checking lists in E2E (#7849)
---
 .github/actions/infra-e2e-test/action.yml          |  4 +
 .../satellite/native-protocols/docker-compose.yml  |  2 +-
 .../cases/satellite/native-protocols/e2e.yaml      | 71 +++++++++++------
 .../expected/dependency-services.yml               | 40 +---------
 .../native-protocols/expected/event-list.yml       | 25 +++---
 .../native-protocols/expected/logs-list.yml        | 12 +--
 .../expected/metrics-has-value.yml                 |  4 +-
 .../native-protocols/expected/profile-list.yml     |  6 +-
 .../expected/profile-segment-analyze.yml           | 16 +---
 .../expected/profile-segment-detail.yml            | 10 +--
 .../expected/profile-segment-list.yml              |  6 +-
 .../native-protocols/expected/service-endpoint.yml |  4 +-
 .../native-protocols/expected/service-instance.yml | 20 +----
 .../native-protocols/expected/service.yml          |  6 +-
 .../expected/trace-info-detail.yml                 | 12 +--
 .../expected/trace-users-detail.yml                | 22 +++--
 .../native-protocols/expected/traces-list.yml      | 18 +----
 test/e2e-v2/cases/simple/auth/docker-compose.yml   |  1 +
 test/e2e-v2/cases/simple/auth/e2e.yaml             | 26 +++---
 .../cases/simple/expected/dependency-services.yml  | 29 +------
 .../cases/simple/expected/metrics-has-value.yml    |  4 +-
 .../cases/simple/expected/service-endpoint.yml     |  8 +-
 .../cases/simple/expected/service-instance.yml     | 22 +----
 test/e2e-v2/cases/simple/expected/service.yml      |  6 +-
 .../cases/simple/expected/trace-info-detail.yml    | 72 -----------------
 .../cases/simple/expected/trace-users-detail.yml   | 93 ++++++++++++++++++++++
 test/e2e-v2/cases/simple/expected/traces-list.yml  | 20 +----
 test/e2e-v2/cases/simple/jdk/docker-compose.yml    |  1 +
 test/e2e-v2/cases/simple/jdk/e2e.yaml              | 30 +++----
 test/e2e-v2/cases/simple/mtls/e2e.yaml             | 30 +++----
 test/e2e-v2/cases/simple/ssl/e2e.yaml              | 30 +++----
 test/e2e-v2/script/env                             |  2 +-
 test/e2e/e2e-test/docker/go/Dockerfile.go          |  2 +-
 33 files changed, 279 insertions(+), 375 deletions(-)

diff --git a/.github/actions/infra-e2e-test/action.yml b/.github/actions/infra-e2e-test/action.yml
index 6e9d919..4ee6545 100644
--- a/.github/actions/infra-e2e-test/action.yml
+++ b/.github/actions/infra-e2e-test/action.yml
@@ -50,6 +50,10 @@ runs:
         # Retry one more time due to frequent "maven connection reset"
         ./mvnw --batch-mode -f test/e2e-v2/java-test-service/pom.xml clean package
         echo "::endgroup::"
+    - name: Setup go
+      uses: actions/setup-go@v2
+      with:
+        go-version: '1.16'
     - name: Run E2E Test
       uses: apache/skywalking-infra-e2e@main
       with:
diff --git a/test/e2e-v2/cases/satellite/native-protocols/docker-compose.yml b/test/e2e-v2/cases/satellite/native-protocols/docker-compose.yml
index eab6804..b427ca9 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/docker-compose.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/docker-compose.yml
@@ -108,4 +108,4 @@ services:
         condition: service_healthy
 
 networks:
-  e2e:
\ No newline at end of file
+  e2e:
diff --git a/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml b/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml
index d57422b..57ce2bd 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml
+++ b/test/e2e-v2/cases/satellite/native-protocols/e2e.yaml
@@ -29,38 +29,34 @@ setup:
       command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
 
 cleanup:
-  # always never success failure
-  on: always
+  on: success
 
 trigger:
   action: http
-  interval: 10s
+  interval: 3s
   times: 10
   url: http://${consumer_host}:${consumer_9092}/info
   method: POST
 
 verify:
-  # verify with retry strategy
   retry:
-    # max retry count
     count: 20
-    # the interval between two retries, in millisecond.
-    interval: 10000
+    interval: 3s
   cases:
     # basic check: service list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
       expected: expected/service.yml
     # basic check: service metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: expected/metrics-has-value.yml
     # basic check: service endpoint
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-name=e2e-service-provider
       expected: expected/service-endpoint.yml
     # basic check: service endpoint metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name=POST:/info --service-name=e2e-service-provider |yq e 'to_entries' -
       expected: expected/metrics-has-value.yml
     # basic check: dependency service
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name="e2e-service-provider"
       expected: expected/dependency-services.yml
 
     # native management: service instance list
@@ -68,18 +64,22 @@ verify:
       expected: expected/service-instance.yml
 
     # native jvm: service instance jvm metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name instance_jvm_thread_live_count --instance=provider1 --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name instance_jvm_thread_live_count --instance-name=provider1 --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: expected/metrics-has-value.yml
 
     # native tracing: trace segment list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
       expected: expected/traces-list.yml
     # native tracing: trace detail
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls \
+            | yq e '.traces | select(.[].endpointnames[0]=="POST:/info") | .[0].traceids[0]' - \
+        )
       expected: expected/trace-info-detail.yml
 
     # native meter: instance meter
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name meter_jvm_classes_loaded --instance=provider1 --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name meter_jvm_classes_loaded --instance-name=provider1 --service-name=e2e-service-provider |yq e 'to_entries' -
       expected: expected/metrics-has-value.yml
 
     # native event: event list
@@ -87,27 +87,48 @@ verify:
       expected: expected/event-list.yml
 
     # native log: logs list
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql logs list --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) --trace-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql logs list --service-name=e2e-service-provider --trace-id=$( \
+            swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls \
+              | yq e '.traces | select(.[].endpointnames[0]=="POST:/info") | .[0].traceids[0]' -
+        )
       expected: expected/logs-list.yml
 
     # native profile: create task
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile create --service-name=e2e-service-provider --endpoint=POST:/info --start-time=$((($(date +%s)+5)*1000)) --duration=1 --min-duration-threshold=0 --dump-period=10 --max-sampling-count=9
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql \
+          profile create --service-name=e2e-service-provider \
+            --endpoint-name=POST:/info \
+            --start-time=$((($(date +%s)+5)*1000)) \
+            --duration=1 --min-duration-threshold=0 \
+            --dump-period=10 --max-sampling-count=9
       expected: expected/profile-create.yml
     # native profile: sleep to wait agent notices and query profile list
-    - query: sleep 10 && swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list -service-name=e2e-service-provider --endpoint=POST:/info
+    - query: sleep 10 && swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list -service-name=e2e-service-provider --endpoint-name=POST:/info
       expected: expected/profile-list.yml
     # native profile: sleep to wait segment report and query profiled segment list
     - query: |
         curl -X POST http://${consumer_host}:${consumer_9092}/info > /dev/null;
         sleep 5;
-        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint=POST:/info|yq e '.[0].id' -)
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint-name=POST:/info | yq e '.[0].id' - \
+        )
       expected: expected/profile-segment-list.yml
     # native profile: query profiled segment
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-segment --segment-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint=POST:/info|yq e '.[0].id' -) | yq e '.[0].segmentid' -)
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-segment --segment-id=$( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$( \
+            swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint-name=POST:/info | yq e '.[0].id' - \
+          ) | yq e '.[0].segmentid' - \
+        )
       expected: expected/profile-segment-detail.yml
     # native profile: query profiled segment
     - query: |
-        segmentid=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint=POST:/info|yq e '.[0].id' -) |yq e '.[0].segmentid' -);
+        segmentid=$( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$( \
+            swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint-name=POST:/info | yq e '.[0].id' - \
+          ) | yq e '.[0].segmentid' - \
+        );
         start=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-segment --segment-id=$segmentid|yq e '.spans.[0].starttime' -);
         end=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-segment --segment-id=$segmentid|yq e '.spans.[0].endtime' -);
         swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-analyze --segment-id=$segmentid --time-ranges=$(echo $start"-"$end)
@@ -120,8 +141,10 @@ verify:
                  agent.span_limit_per_segment: 1' | yq e '{"message": .}' -
       expected: expected/etcd-put.yml
     - query: |
+        curl -s -XPOST http://${provider_host}:${provider_9090}/users -d '{"id":"123","name":"SinglesBar"}' -H "Content-Type: application/json" > /dev/null;
         sleep 5;
-        curl -X POST http://${provider_host}:${provider_9090}/users -d '{}' -H "Content-Type: application/json" > /dev/null;
-        sleep 5;
-        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace list --step=SECOND --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)|grep -A 5 "/users"|head -n 6|tail -n1|awk -F ' ' '{print $2}')
-      expected: expected/trace-users-detail.yml
\ No newline at end of file
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --order startTime --service-name "e2e-service-provider" --endpoint-name "POST:/users" \
+            | yq e '.traces[0].traceids[0]' - \
+        )
+      expected: expected/trace-users-detail.yml
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
index 7b6996c..aa6e2fc 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/dependency-services.yml
@@ -14,35 +14,18 @@
 # limitations under the License.
 
 nodes:
-{{- range .nodes }}
-{{- if eq .name "User" }}
-- id: {{ b64enc "User" }}.0
-  name: User
-  type: USER
-  isreal: false
-{{- end }}
-{{- if eq .name "e2e-service-provider" }}
+{{- contains .nodes }}
 - id: {{ b64enc "e2e-service-provider"}}.1
   name: e2e-service-provider
   type: Tomcat
   isreal: true
-{{- end }}
-{{- if eq .name "e2e-service-consumer" }}
 - id: {{ b64enc "e2e-service-consumer"}}.1
   name: e2e-service-consumer
   type: Tomcat
   isreal: true
 {{- end }}
-{{- if eq .name "localhost:-1" }}
-- id: {{ b64enc "localhost:-1" }}.0
-  name: localhost:-1
-  type: H2
-  isreal: false
-{{- end }}
-{{- end }}
 calls:
-{{- range .calls }}
-{{- if eq .source "ZTJlLXNlcnZpY2UtY29uc3VtZXI=.1" }}
+{{- contains .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents: []
   target: {{ b64enc "e2e-service-provider"}}.1
@@ -52,22 +35,3 @@ calls:
     - CLIENT
     - SERVER
 {{- end }}
-{{- if eq .source "ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1" }}
-- source: {{ b64enc "e2e-service-provider" }}.1
-  sourcecomponents: []
-  target: {{ b64enc "localhost:-1"}}.0
-  targetcomponents: []
-  id: {{ b64enc "e2e-service-provider" }}.1-{{ b64enc "localhost:-1"}}.0
-  detectpoints:
-    - CLIENT
-{{- end }}
-{{- if eq .source "VXNlcg==.0" }}
-- source: {{ b64enc "User" }}.0
-  sourcecomponents: []
-  target: {{ b64enc "e2e-service-consumer"}}.1
-  targetcomponents: []
-  id: {{ b64enc "User" }}.0-{{ b64enc "e2e-service-consumer"}}.1
-  detectpoints:
-    - SERVER
-{{- end }}
-{{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/event-list.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/event-list.yml
index 08b4879..0d559ea 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/event-list.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/event-list.yml
@@ -14,29 +14,36 @@
 # limitations under the License.
 
 events:
-{{- range .events }}
+{{- contains .events }}
 - uuid: {{ notEmpty .uuid }}
   source:
-    {{- if eq .source.service "e2e-service-provider" }}
     service: e2e-service-provider
     serviceinstance: provider1
-    {{- end }}
-    {{- if eq .source.service "e2e-service-consumer" }}
+    endpoint: ""
+  name: Start
+  type: Normal
+  message: Start Java Application
+  parameters:
+  {{- contains .parameters }}
+    - key: OPTS
+      value: {{ notEmpty .value }}
+  {{- end }}
+  starttime: {{ gt .starttime 0 }}
+  endtime: {{ gt .endtime 0 }}
+- uuid: {{ notEmpty .uuid }}
+  source:
     service: e2e-service-consumer
     serviceinstance: consumer1
-    {{- end }}
     endpoint: ""
   name: Start
   type: Normal
   message: Start Java Application
   parameters:
-  {{- range .parameters }}
-  {{- if eq .key "OPTS"}}
+  {{- contains .parameters }}
     - key: OPTS
       value: {{ notEmpty .value }}
   {{- end }}
-  {{- end }}
   starttime: {{ gt .starttime 0 }}
   endtime: {{ gt .endtime 0 }}
 {{- end }}
-total: {{ gt .total 0 }}
\ No newline at end of file
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/logs-list.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/logs-list.yml
index c13422d..2269e64 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/logs-list.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/logs-list.yml
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 logs:
-{{- range .logs }}
+{{- contains .logs }}
   - servicename: e2e-service-provider
     serviceid: {{ b64enc "e2e-service-provider" }}.1
     serviceinstancename: provider1
@@ -27,19 +27,13 @@ logs:
     content: |
       {{ notEmpty .content }}
     tags:
-    {{- range .tags }}
-    {{- if eq .key "level"}}
+    {{- contains .tags }}
     - key: level
       value: INFO
-    {{- end }}
-    {{- if eq .key "logger" }}
     - key: logger
       value: {{ notEmpty .value }}
-    {{- end }}
-    {{- if eq .key "thread" }}
     - key: thread
       value: {{ notEmpty .value }}
     {{- end }}
-    {{- end }}
 {{- end }}
-total: {{ gt .total 0 }}
\ No newline at end of file
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/metrics-has-value.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/metrics-has-value.yml
index 27ae47c..5359e6d 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/metrics-has-value.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/metrics-has-value.yml
@@ -15,7 +15,5 @@
 
 {{- contains . }}
 - key: {{ notEmpty .key }}
-  value: {{ ge .value 0 }}
-- key: {{ notEmpty .key }}
   value: {{ ge .value 1 }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-list.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-list.yml
index f414419..186e1df 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-list.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-list.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- range . }}
+{{- contains . }}
 - id: {{ notEmpty .id }}
   serviceid: {{ b64enc "e2e-service-provider" }}.1
   servicename: ""
@@ -24,11 +24,11 @@
   dumpperiod: 10
   maxsamplingcount: 9
   logs:
-    {{- range .logs }}
+    {{- contains .logs }}
     - id: {{ notEmpty .id }}
       instanceid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
       operationtype: {{ notEmpty .operationtype }}
       instancename: ""
       operationtime: {{ gt .operationtime 0 }}
   {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-analyze.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-analyze.yml
index 2ce6611..9471b07 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-analyze.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-analyze.yml
@@ -15,26 +15,14 @@
 
 tip: null
 trees:
-  {{- range .trees }}
+  {{- contains .trees }}
   - elements:
     {{- contains .elements }}
     - id: "{{ notEmpty .id }}"
       parentid: "{{ notEmpty .parentid }}"
-      codesignature:
-        {{- if eq .codesignature "java.lang.Thread.sleep:-2" }}
-          java.lang.Thread.sleep:-2
-        {{- end }}
+      codesignature: "java.lang.Thread.sleep:-2"
       duration: {{ gt .duration 0 }}
       durationchildexcluded: {{ gt .durationchildexcluded 0 }}
       count: {{ gt .count 0 }}
-    - id: "{{ notEmpty .id }}"
-      parentid: "{{ notEmpty .parentid }}"
-      codesignature:
-        {{- if ne .codesignature "java.lang.Thread.sleep:-2" }}
-          {{ notEmpty .codesignature }}
-        {{- end}}
-      duration: {{ ge .duration 0 }}
-      durationchildexcluded: {{ ge .durationchildexcluded 0 }}
-      count: {{ gt .count 0 }}
     {{- end }}
   {{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-detail.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-detail.yml
index 28aeaef..43f5b6b 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-detail.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-detail.yml
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 spans:
-{{- range .spans }}
+{{- contains .spans }}
 - spanid: 0
   parentspanid: -1
   servicecode: e2e-service-provider
@@ -28,15 +28,11 @@ spans:
   iserror: false
   layer: Http
   tags:
-    {{- range .tags }}
-    {{- if eq .key "url" }}
+    {{- contains .tags }}
     - key: url
       value: {{ notEmpty .value }}
-    {{- end }}
-    {{- if eq .key "http.method" }}
     - key: http.method
       value: POST
     {{- end }}
-    {{- end }}
   logs: []
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-list.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-list.yml
index 6c54147..b65f72a 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-list.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/profile-segment-list.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- range . }}
+{{- contains . }}
 - segmentid: {{ notEmpty .segmentid }}
   endpointnames:
     - POST:/info
@@ -21,7 +21,7 @@
   start: "{{ notEmpty .start }}"
   iserror: false
   traceids:
-  {{- range .traceids }}
+  {{- contains .traceids }}
     - {{ notEmpty . }}
   {{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/service-endpoint.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/service-endpoint.yml
index 30b1efb..d2afb45 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/service-endpoint.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/service-endpoint.yml
@@ -13,9 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- range .}}
-{{- if eq .name "POST:/info" }}
+{{- contains .}}
 - id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/info" }}
   name: POST:/info
 {{- end}}
-{{- end}}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/service-instance.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/service-instance.yml
index ef74087..5f03bc1 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/service-instance.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/service-instance.yml
@@ -15,40 +15,26 @@
 # specific language governing permissions and limitations
 # under the License.
 
-{{- range .}}
+{{- contains .}}
 - id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
   name: {{ notEmpty .name }}
   attributes:
-  {{- range .attributes }}
-  {{- if eq .name "OS Name" }}
+  {{- contains .attributes }}
   - name: OS Name
     value: Linux
-  {{- end }}
-  {{- if eq .name "hostname" }}
   - name: hostname
     value: {{ notEmpty .value }}
-  {{- end }}
-  {{- if eq .name "Process No." }}
   - name: Process No.
     value: "1"
-  {{- end }}
-  {{- if eq .name "Start Time" }}
   - name: Start Time
     value: {{ notEmpty .value }}
-  {{- end }}
-  {{- if eq .name "JVM Arguments" }}
   - name: JVM Arguments
     value: '{{ notEmpty .value }}'
-  {{- end }}
-  {{- if eq .name "Jar Dependencies" }}
   - name: Jar Dependencies
     value: '{{ notEmpty .value }}'
-  {{- end }}
-  {{- if eq .name "ipv4s" }}
   - name: ipv4s
     value: {{ notEmpty .value }}
-  {{- end }}
   {{- end}}
   language: JAVA
   instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
-{{- end}}
\ No newline at end of file
+{{- end}}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml
index e299d8b..20e26bc 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/service.yml
@@ -13,15 +13,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- range . }}
-{{- if eq .name "e2e-service-provider" }}
+{{- contains . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
-{{- end }}
-{{- if eq .name "e2e-service-consumer" }}
 - id: {{ b64enc "e2e-service-consumer" }}.1
   name: e2e-service-consumer
   group: ""
 {{- end }}
-{{- end }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/trace-info-detail.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/trace-info-detail.yml
index 836705a..95b9bd9 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/trace-info-detail.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/trace-info-detail.yml
@@ -14,14 +14,14 @@
 # limitations under the License.
 
 spans:
-  {{- range .spans}}
+  {{- contains .spans }}
   - traceid: {{ notEmpty .traceid }}
     segmentid: {{ notEmpty .segmentid }}
     spanid: {{ .spanid }}
     parentspanid: {{ .parentspanid }}
     refs:
       {{- if eq .servicecode "e2e-service-provider" }}
-      {{- range .refs }}
+      {{- contains .refs }}
         - traceid: {{ notEmpty .traceid }}
           parentsegmentid: {{ notEmpty .parentsegmentid }}
           parentspanid: 1
@@ -58,15 +58,11 @@ spans:
     iserror: false
     layer: Http
     tags:
-      {{- range .tags }}
-      {{- if eq .key "http.method" }}
+      {{- contains .tags }}
       - key: http.method
         value: POST
-      {{- end }}
-      {{- if eq .key "url" }}
       - key: url
         value: {{ notEmpty .value }}
       {{- end }}
-      {{- end }}
     logs: []
-  {{- end }}
\ No newline at end of file
+  {{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/trace-users-detail.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/trace-users-detail.yml
index b46479e..9bc9f55 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/trace-users-detail.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/trace-users-detail.yml
@@ -14,14 +14,14 @@
 # limitations under the License.
 
 spans:
-  {{- range .spans}}
-  - traceid: {{ notEmpty .traceid }}
-    segmentid: {{ notEmpty .segmentid }}
-    spanid: 0
-    parentspanid: -1
+  {{- with (index .spans 0) }}
+  - traceid: {{ .traceid }}
+    segmentid: {{ .segmentid }}
+    spanid: {{ .spanid }}
+    parentspanid: {{ .parentspanid }}
     refs: []
-    servicecode: {{ notEmpty .servicecode }}
-    serviceinstancename: {{ notEmpty .serviceinstancename }}
+    servicecode: e2e-service-provider
+    serviceinstancename: provider1
     starttime: {{ gt .starttime 0 }}
     endtime: {{ gt .endtime 0 }}
     endpointname: POST:/users
@@ -31,15 +31,11 @@ spans:
     iserror: false
     layer: Http
     tags:
-      {{- range .tags }}
-      {{- if eq .key "http.method" }}
+      {{- contains .tags }}
       - key: http.method
         value: POST
-      {{- end }}
-      {{- if eq .key "url" }}
       - key: url
         value: {{ notEmpty .value }}
       {{- end }}
-      {{- end }}
     logs: []
-  {{- end }}
\ No newline at end of file
+  {{- end }}
diff --git a/test/e2e-v2/cases/satellite/native-protocols/expected/traces-list.yml b/test/e2e-v2/cases/satellite/native-protocols/expected/traces-list.yml
index 0bbf661..fd51537 100644
--- a/test/e2e-v2/cases/satellite/native-protocols/expected/traces-list.yml
+++ b/test/e2e-v2/cases/satellite/native-protocols/expected/traces-list.yml
@@ -14,28 +14,16 @@
 # limitations under the License.
 
 traces:
-{{- range .traces }}
+{{- contains .traces }}
 - segmentid: {{ notEmpty .segmentid }}
   endpointnames:
-  {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/execute" }}
-    - H2/JDBI/Statement/execute
-  {{- end}}
-  {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/executeQuery" }}
-    - H2/JDBI/Statement/executeQuery
-  {{- end}}
-  {{- if eq (index .endpointnames 0) "H2/JDBI/PreparedStatement/executeQuery" }}
-    - H2/JDBI/PreparedStatement/executeQuery
-  {{- end }}
-  {{- if eq (index .endpointnames 0) "POST:/info" }}
+  {{- contains .endpointnames }}
     - POST:/info
   {{- end }}
-  {{- if eq (index .endpointnames 0) "POST:/users" }}
-    - POST:/users
-  {{- end }}
   duration: {{ ge .duration 0 }}
   start: "{{ notEmpty .start}}"
   iserror: false
   traceids:
     - {{ (index .traceids 0) }}
 {{- end }}
-total: {{ gt .total 0 }}
\ No newline at end of file
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/cases/simple/auth/docker-compose.yml b/test/e2e-v2/cases/simple/auth/docker-compose.yml
index 54ada05..086393a 100644
--- a/test/e2e-v2/cases/simple/auth/docker-compose.yml
+++ b/test/e2e-v2/cases/simple/auth/docker-compose.yml
@@ -24,6 +24,7 @@ services:
       SW_AUTHENTICATION: test-token
     ports:
       - 12800
+
   provider:
     extends:
       file: ../../../script/docker-compose/base-compose.yml
diff --git a/test/e2e-v2/cases/simple/auth/e2e.yaml b/test/e2e-v2/cases/simple/auth/e2e.yaml
index e8473d3..3a620c5 100644
--- a/test/e2e-v2/cases/simple/auth/e2e.yaml
+++ b/test/e2e-v2/cases/simple/auth/e2e.yaml
@@ -35,41 +35,43 @@ trigger:
   action: http
   interval: 10s
   times: 10
-  url: http://${consumer_host}:${consumer_9092}/info
+  url: http://${consumer_host}:${consumer_9092}/users
   method: POST
+  body: '{"id":"123","name":"skywalking"}'
+  headers:
+    "Content-Type": "application/json"
 
 verify:
-  # verify with retry strategy
   retry:
-    # max retry count
     count: 20
-    # the interval between two retries, in millisecond.
     interval: 10000
   cases:
     # service list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
       expected: ../expected/service.yml
     # service metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # service endpoint
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=users --service-name=e2e-service-provider
       expected: ../expected/service-endpoint.yml
     # service endpoint metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name=POST:/users --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # dependency service
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name e2e-service-provider
       expected: ../expected/dependency-services.yml
     # service instance list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider
       expected: ../expected/service-instance.yml
 
-    # dependency instance
-
     # trace segment list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
       expected: ../expected/traces-list.yml
     # trace detail
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
-      expected: ../expected/trace-info-detail.yml
\ No newline at end of file
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls \
+            | yq e '.traces | select(.[].endpointnames[0]=="POST:/users") | .[0].traceids[0]' -
+        )
+      expected: ../expected/trace-users-detail.yml
diff --git a/test/e2e-v2/cases/simple/expected/dependency-services.yml b/test/e2e-v2/cases/simple/expected/dependency-services.yml
index 7b6996c..600dd6d 100644
--- a/test/e2e-v2/cases/simple/expected/dependency-services.yml
+++ b/test/e2e-v2/cases/simple/expected/dependency-services.yml
@@ -14,35 +14,22 @@
 # limitations under the License.
 
 nodes:
-{{- range .nodes }}
-{{- if eq .name "User" }}
-- id: {{ b64enc "User" }}.0
-  name: User
-  type: USER
-  isreal: false
-{{- end }}
-{{- if eq .name "e2e-service-provider" }}
+{{- contains .nodes }}
 - id: {{ b64enc "e2e-service-provider"}}.1
   name: e2e-service-provider
   type: Tomcat
   isreal: true
-{{- end }}
-{{- if eq .name "e2e-service-consumer" }}
 - id: {{ b64enc "e2e-service-consumer"}}.1
   name: e2e-service-consumer
   type: Tomcat
   isreal: true
-{{- end }}
-{{- if eq .name "localhost:-1" }}
 - id: {{ b64enc "localhost:-1" }}.0
   name: localhost:-1
   type: H2
   isreal: false
 {{- end }}
-{{- end }}
 calls:
-{{- range .calls }}
-{{- if eq .source "ZTJlLXNlcnZpY2UtY29uc3VtZXI=.1" }}
+{{- contains .calls }}
 - source: {{ b64enc "e2e-service-consumer"}}.1
   sourcecomponents: []
   target: {{ b64enc "e2e-service-provider"}}.1
@@ -51,8 +38,6 @@ calls:
   detectpoints:
     - CLIENT
     - SERVER
-{{- end }}
-{{- if eq .source "ZTJlLXNlcnZpY2UtcHJvdmlkZXI=.1" }}
 - source: {{ b64enc "e2e-service-provider" }}.1
   sourcecomponents: []
   target: {{ b64enc "localhost:-1"}}.0
@@ -61,13 +46,3 @@ calls:
   detectpoints:
     - CLIENT
 {{- end }}
-{{- if eq .source "VXNlcg==.0" }}
-- source: {{ b64enc "User" }}.0
-  sourcecomponents: []
-  target: {{ b64enc "e2e-service-consumer"}}.1
-  targetcomponents: []
-  id: {{ b64enc "User" }}.0-{{ b64enc "e2e-service-consumer"}}.1
-  detectpoints:
-    - SERVER
-{{- end }}
-{{- end }}
diff --git a/test/e2e-v2/cases/simple/expected/metrics-has-value.yml b/test/e2e-v2/cases/simple/expected/metrics-has-value.yml
index 27ae47c..5359e6d 100644
--- a/test/e2e-v2/cases/simple/expected/metrics-has-value.yml
+++ b/test/e2e-v2/cases/simple/expected/metrics-has-value.yml
@@ -15,7 +15,5 @@
 
 {{- contains . }}
 - key: {{ notEmpty .key }}
-  value: {{ ge .value 0 }}
-- key: {{ notEmpty .key }}
   value: {{ ge .value 1 }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/test/e2e-v2/cases/simple/expected/service-endpoint.yml b/test/e2e-v2/cases/simple/expected/service-endpoint.yml
index 30b1efb..629cd4f 100644
--- a/test/e2e-v2/cases/simple/expected/service-endpoint.yml
+++ b/test/e2e-v2/cases/simple/expected/service-endpoint.yml
@@ -13,9 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- range .}}
-{{- if eq .name "POST:/info" }}
-- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/info" }}
-  name: POST:/info
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/users" }}
+  name: POST:/users
 {{- end}}
-{{- end}}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/simple/expected/service-instance.yml b/test/e2e-v2/cases/simple/expected/service-instance.yml
index ef74087..e525205 100644
--- a/test/e2e-v2/cases/simple/expected/service-instance.yml
+++ b/test/e2e-v2/cases/simple/expected/service-instance.yml
@@ -15,40 +15,26 @@
 # specific language governing permissions and limitations
 # under the License.
 
-{{- range .}}
+{{- contains . }}
 - id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
-  name: {{ notEmpty .name }}
+  name: provider1
   attributes:
-  {{- range .attributes }}
-  {{- if eq .name "OS Name" }}
+  {{- contains .attributes }}
   - name: OS Name
     value: Linux
-  {{- end }}
-  {{- if eq .name "hostname" }}
   - name: hostname
     value: {{ notEmpty .value }}
-  {{- end }}
-  {{- if eq .name "Process No." }}
   - name: Process No.
     value: "1"
-  {{- end }}
-  {{- if eq .name "Start Time" }}
   - name: Start Time
     value: {{ notEmpty .value }}
-  {{- end }}
-  {{- if eq .name "JVM Arguments" }}
   - name: JVM Arguments
     value: '{{ notEmpty .value }}'
-  {{- end }}
-  {{- if eq .name "Jar Dependencies" }}
   - name: Jar Dependencies
     value: '{{ notEmpty .value }}'
-  {{- end }}
-  {{- if eq .name "ipv4s" }}
   - name: ipv4s
     value: {{ notEmpty .value }}
-  {{- end }}
   {{- end}}
   language: JAVA
   instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
-{{- end}}
\ No newline at end of file
+{{- end}}
diff --git a/test/e2e-v2/cases/simple/expected/service.yml b/test/e2e-v2/cases/simple/expected/service.yml
index e299d8b..20e26bc 100644
--- a/test/e2e-v2/cases/simple/expected/service.yml
+++ b/test/e2e-v2/cases/simple/expected/service.yml
@@ -13,15 +13,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- range . }}
-{{- if eq .name "e2e-service-provider" }}
+{{- contains . }}
 - id: {{ b64enc "e2e-service-provider" }}.1
   name: e2e-service-provider
   group: ""
-{{- end }}
-{{- if eq .name "e2e-service-consumer" }}
 - id: {{ b64enc "e2e-service-consumer" }}.1
   name: e2e-service-consumer
   group: ""
 {{- end }}
-{{- end }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/simple/expected/trace-info-detail.yml b/test/e2e-v2/cases/simple/expected/trace-info-detail.yml
deleted file mode 100644
index 836705a..0000000
--- a/test/e2e-v2/cases/simple/expected/trace-info-detail.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-spans:
-  {{- range .spans}}
-  - traceid: {{ notEmpty .traceid }}
-    segmentid: {{ notEmpty .segmentid }}
-    spanid: {{ .spanid }}
-    parentspanid: {{ .parentspanid }}
-    refs:
-      {{- if eq .servicecode "e2e-service-provider" }}
-      {{- range .refs }}
-        - traceid: {{ notEmpty .traceid }}
-          parentsegmentid: {{ notEmpty .parentsegmentid }}
-          parentspanid: 1
-          type: CROSS_PROCESS
-      {{- end }}
-      {{- end }}
-      {{- if eq .servicecode "e2e-service-consumer" }}
-        []
-      {{- end }}
-    servicecode: {{ notEmpty .servicecode }}
-    serviceinstancename: {{ notEmpty .serviceinstancename }}
-    starttime: {{ gt .starttime 0 }}
-    endtime: {{ gt .endtime 0 }}
-    endpointname:
-      {{- if eq .type "Exit" }}
-        /info
-      {{ else }}
-        POST:/info
-      {{- end }}
-    type: {{ notEmpty .type }}
-    peer:
-    {{- if eq .type "Exit" }}
-      provider:9090
-    {{ else }}
-      ""
-    {{- end }}
-    component:
-    {{- if eq .type "Exit" }}
-      SpringRestTemplate
-    {{- end }}
-    {{- if eq .type "Entry" }}
-      Tomcat
-    {{- end }}
-    iserror: false
-    layer: Http
-    tags:
-      {{- range .tags }}
-      {{- if eq .key "http.method" }}
-      - key: http.method
-        value: POST
-      {{- end }}
-      {{- if eq .key "url" }}
-      - key: url
-        value: {{ notEmpty .value }}
-      {{- end }}
-      {{- end }}
-    logs: []
-  {{- end }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/simple/expected/trace-users-detail.yml b/test/e2e-v2/cases/simple/expected/trace-users-detail.yml
new file mode 100644
index 0000000..0905893
--- /dev/null
+++ b/test/e2e-v2/cases/simple/expected/trace-users-detail.yml
@@ -0,0 +1,93 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+spans:
+  {{- contains .spans }}
+  - traceid: {{ .traceid }}
+    segmentid: {{ .segmentid }}
+    spanid: {{ .spanid }}
+    parentspanid: {{ .parentspanid }}
+    refs: []
+    servicecode: e2e-service-consumer
+    serviceinstancename: consumer1
+    starttime: {{ gt .starttime 0 }}
+    endtime: {{ gt .endtime 0 }}
+    endpointname: POST:/users
+    type: Entry
+    peer: ""
+    component: Tomcat
+    iserror: false
+    layer: Http
+    tags:
+      {{- contains .tags }}
+      - key: http.method
+        value: POST
+      - key: url
+        value: {{ notEmpty .value }}
+      {{- end }}
+    logs: []
+  - traceid: {{ notEmpty .traceid }}
+    segmentid: {{ .segmentid }}
+    spanid: {{ .spanid }}
+    parentspanid: {{ .parentspanid }}
+    refs: []
+    servicecode: e2e-service-consumer
+    serviceinstancename: consumer1
+    starttime: {{ gt .starttime 0 }}
+    endtime: {{ gt .endtime 0 }}
+    endpointname: /users
+    type: Exit
+    peer: provider:9090
+    component: SpringRestTemplate
+    iserror: false
+    layer: Http
+    tags:
+      {{- contains .tags }}
+      - key: http.method
+        value: POST
+      - key: url
+        value: {{ notEmpty .value }}
+      {{- end }}
+    logs: []
+  - traceid: {{ notEmpty .traceid }}
+    segmentid: {{ .segmentid }}
+    spanid: {{ .spanid }}
+    parentspanid: {{ .parentspanid }}
+    refs:
+      {{- contains .refs }}
+      - traceid: {{ notEmpty .traceid }}
+        parentsegmentid: {{ .parentsegmentid }}
+        parentspanid: 1
+        type: CROSS_PROCESS
+      {{- end }}
+    servicecode: e2e-service-provider
+    serviceinstancename: provider1
+    starttime: {{ gt .starttime 0 }}
+    endtime: {{ gt .endtime 0 }}
+    endpointname: POST:/users
+    type: Entry
+    peer: ""
+    component: Tomcat
+    iserror: false
+    layer: Http
+    tags:
+      {{- contains .tags }}
+      - key: http.method
+        value: POST
+      - key: url
+        value: {{ notEmpty .value }}
+      {{- end }}
+    logs: []
+  {{- end }}
diff --git a/test/e2e-v2/cases/simple/expected/traces-list.yml b/test/e2e-v2/cases/simple/expected/traces-list.yml
index 0bbf661..876508f 100644
--- a/test/e2e-v2/cases/simple/expected/traces-list.yml
+++ b/test/e2e-v2/cases/simple/expected/traces-list.yml
@@ -14,28 +14,14 @@
 # limitations under the License.
 
 traces:
-{{- range .traces }}
+{{- contains .traces }}
 - segmentid: {{ notEmpty .segmentid }}
   endpointnames:
-  {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/execute" }}
-    - H2/JDBI/Statement/execute
-  {{- end}}
-  {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/executeQuery" }}
-    - H2/JDBI/Statement/executeQuery
-  {{- end}}
-  {{- if eq (index .endpointnames 0) "H2/JDBI/PreparedStatement/executeQuery" }}
-    - H2/JDBI/PreparedStatement/executeQuery
-  {{- end }}
-  {{- if eq (index .endpointnames 0) "POST:/info" }}
-    - POST:/info
-  {{- end }}
-  {{- if eq (index .endpointnames 0) "POST:/users" }}
     - POST:/users
-  {{- end }}
   duration: {{ ge .duration 0 }}
   start: "{{ notEmpty .start}}"
   iserror: false
   traceids:
-    - {{ (index .traceids 0) }}
+    - {{ index .traceids 0 }}
 {{- end }}
-total: {{ gt .total 0 }}
\ No newline at end of file
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/cases/simple/jdk/docker-compose.yml b/test/e2e-v2/cases/simple/jdk/docker-compose.yml
index 879eae6..5daf0a4 100644
--- a/test/e2e-v2/cases/simple/jdk/docker-compose.yml
+++ b/test/e2e-v2/cases/simple/jdk/docker-compose.yml
@@ -22,6 +22,7 @@ services:
       service: oap
     ports:
       - 12800
+
   provider:
     extends:
       file: ../../../script/docker-compose/base-compose.yml
diff --git a/test/e2e-v2/cases/simple/jdk/e2e.yaml b/test/e2e-v2/cases/simple/jdk/e2e.yaml
index e8473d3..52fb0cd 100644
--- a/test/e2e-v2/cases/simple/jdk/e2e.yaml
+++ b/test/e2e-v2/cases/simple/jdk/e2e.yaml
@@ -33,43 +33,45 @@ cleanup:
 
 trigger:
   action: http
-  interval: 10s
+  interval: 3s
   times: 10
-  url: http://${consumer_host}:${consumer_9092}/info
+  url: http://${consumer_host}:${consumer_9092}/users
   method: POST
+  body: '{"id":"123","name":"skywalking"}'
+  headers:
+    "Content-Type": "application/json"
 
 verify:
-  # verify with retry strategy
   retry:
-    # max retry count
     count: 20
-    # the interval between two retries, in millisecond.
-    interval: 10000
+    interval: 3s
   cases:
     # service list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
       expected: ../expected/service.yml
     # service metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # service endpoint
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=users --service-name=e2e-service-provider
       expected: ../expected/service-endpoint.yml
     # service endpoint metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name=POST:/users --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # dependency service
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=e2e-service-provider
       expected: ../expected/dependency-services.yml
     # service instance list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider
       expected: ../expected/service-instance.yml
 
-    # dependency instance
-
     # trace segment list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
       expected: ../expected/traces-list.yml
     # trace detail
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
-      expected: ../expected/trace-info-detail.yml
\ No newline at end of file
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls \
+            | yq e '.traces | select(.[].endpointnames[0]=="POST:/users") | .[0].traceids[0]' -
+        )
+      expected: ../expected/trace-users-detail.yml
diff --git a/test/e2e-v2/cases/simple/mtls/e2e.yaml b/test/e2e-v2/cases/simple/mtls/e2e.yaml
index e8473d3..2bd06a1 100644
--- a/test/e2e-v2/cases/simple/mtls/e2e.yaml
+++ b/test/e2e-v2/cases/simple/mtls/e2e.yaml
@@ -33,43 +33,45 @@ cleanup:
 
 trigger:
   action: http
-  interval: 10s
+  interval: 3s
   times: 10
-  url: http://${consumer_host}:${consumer_9092}/info
+  url: http://${consumer_host}:${consumer_9092}/users
   method: POST
+  body: '{"id":"123","name":"skywalking"}'
+  headers:
+    "Content-Type": "application/json"
 
 verify:
-  # verify with retry strategy
   retry:
-    # max retry count
     count: 20
-    # the interval between two retries, in millisecond.
-    interval: 10000
+    interval: 3s
   cases:
     # service list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
       expected: ../expected/service.yml
     # service metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # service endpoint
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=users --service-name=e2e-service-provider
       expected: ../expected/service-endpoint.yml
     # service endpoint metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name=POST:/users --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # dependency service
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name e2e-service-provider
       expected: ../expected/dependency-services.yml
     # service instance list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider
       expected: ../expected/service-instance.yml
 
-    # dependency instance
-
     # trace segment list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
       expected: ../expected/traces-list.yml
     # trace detail
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
-      expected: ../expected/trace-info-detail.yml
\ No newline at end of file
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls \
+            | yq e '.traces | select(.[].endpointnames[0]=="POST:/users") | .[0].traceids[0]' -
+        )
+      expected: ../expected/trace-users-detail.yml
diff --git a/test/e2e-v2/cases/simple/ssl/e2e.yaml b/test/e2e-v2/cases/simple/ssl/e2e.yaml
index e8473d3..2bd06a1 100644
--- a/test/e2e-v2/cases/simple/ssl/e2e.yaml
+++ b/test/e2e-v2/cases/simple/ssl/e2e.yaml
@@ -33,43 +33,45 @@ cleanup:
 
 trigger:
   action: http
-  interval: 10s
+  interval: 3s
   times: 10
-  url: http://${consumer_host}:${consumer_9092}/info
+  url: http://${consumer_host}:${consumer_9092}/users
   method: POST
+  body: '{"id":"123","name":"skywalking"}'
+  headers:
+    "Content-Type": "application/json"
 
 verify:
-  # verify with retry strategy
   retry:
-    # max retry count
     count: 20
-    # the interval between two retries, in millisecond.
-    interval: 10000
+    interval: 3s
   cases:
     # service list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
       expected: ../expected/service.yml
     # service metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # service endpoint
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=users --service-name=e2e-service-provider
       expected: ../expected/service-endpoint.yml
     # service endpoint metrics
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=POST:/info --service=e2e-service-provider |yq e 'to_entries' -
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name=POST:/users --service-name=e2e-service-provider | yq e 'to_entries' -
       expected: ../expected/metrics-has-value.yml
     # dependency service
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name e2e-service-provider
       expected: ../expected/dependency-services.yml
     # service instance list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider
       expected: ../expected/service-instance.yml
 
-    # dependency instance
-
     # trace segment list
     - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
       expected: ../expected/traces-list.yml
     # trace detail
-    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
-      expected: ../expected/trace-info-detail.yml
\ No newline at end of file
+    - query: |
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
+          swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls \
+            | yq e '.traces | select(.[].endpointnames[0]=="POST:/users") | .[0].traceids[0]' -
+        )
+      expected: ../expected/trace-users-detail.yml
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/script/env
index b91bdea..2c6d375 100644
--- a/test/e2e-v2/script/env
+++ b/test/e2e-v2/script/env
@@ -15,4 +15,4 @@
 
 SW_AGENT_JAVA_COMMIT=3997f0256056788bd054ee37e4603c11c0fd6756
 SW_AGENT_SATELLITE_COMMIT=1f3c08a5af19f8522f2a40d9339c45fa816bfe07
-SW_CTL_COMMIT=401e0e5671a3fb49de1d1e1e89f5b693b2062867
\ No newline at end of file
+SW_CTL_COMMIT=76f9f848b3142d14c6ab6fa7910d408b92bced64
diff --git a/test/e2e/e2e-test/docker/go/Dockerfile.go b/test/e2e/e2e-test/docker/go/Dockerfile.go
index 61f9407..9982856 100644
--- a/test/e2e/e2e-test/docker/go/Dockerfile.go
+++ b/test/e2e/e2e-test/docker/go/Dockerfile.go
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM golang:1.12 AS builder
+FROM golang:1.13 AS builder
 
 ARG COMMIT_HASH=4af380c2db6243106b0fc650b6003ce3b3eb82a0
 ARG GO2SKY_CODE=${COMMIT_HASH}.tar.gz