imjoey commented on a change in pull request #1381:
URL: https://github.com/apache/apisix-dashboard/pull/1381#discussion_r565125834



##########
File path: docs/back-end-e2e.md
##########
@@ -0,0 +1,87 @@
+<!--
+#
+# 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.
+#
+-->
+
+This document describes how to use E2E test locally.
+
+1. The E2E test using the back end needs to start the manage-API, admin-API, 
etcd and upstream node.
+
+2. To start the manage-API project locally, please refer to 
[develop](./develop.md) web section.
+
+3. To start the etcd locally, please refer to [etcd 
start](https://github.com/apache/apisix/blob/master/doc/install-dependencies.md)
 web section.
+
+4. To start the admin-API project locally, please refer to [admin-API 
start](https://github.com/apache/apisix#get-started) web section.
+
+5. To start the upstream node locally, please install docker in the local 
environment and execute the command.
+
+   ```sh
+    docker run -d --name upstream -v /(Your apisix-dashboard folder 
path)/api/test/docker/upstream.conf:/etc/nginx/conf.d/default.conf:ro -p 80:80 
-p 1980:1980 -p 1981:1981 -p 1982:1982 -p 1983:1983 -p 1984:1984 
johz/upstream:v2.0
+   ```
+
+6. After all the services are started, you can start the back-end E2E test.
+
+7. The upstream node IP is temporarily changed to the local IP address. After 
the test, it should be changed to GitHub upstream node IP. If the test case 
does not involve the upstream node, it does not need to be modified.
+
+   ```sh
+    # Local E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",
+        "methods": ["GET"],
+        "hosts": ["test.com"],
+        "status": 1,
+        "upstream": {
+            "nodes": {
+                # upstream node IP is required for local test
+                "(local ip):1981": 1
+                        },
+            "type": "roundrobin"
+            }
+    }
+
+     # GitHub E2E test create route example
+    {
+        "uris": ["/test-test"],
+        "name": "route_all",
+        "desc": "所有2",

Review comment:
       @Jaycean we would better use English words here. Thanks.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to