You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/06/15 02:41:32 UTC

[GitHub] [dolphinscheduler] SbloodyS commented on a diff in pull request #10442: [Feature-10411] Add tenant api test

SbloodyS commented on code in PR #10442:
URL: https://github.com/apache/dolphinscheduler/pull/10442#discussion_r897482748


##########
dolphinscheduler-api-test/README.md:
##########
@@ -0,0 +1,44 @@
+# DolphinScheduler Backend API Test
+
+## Page Object Model
+
+DolphinScheduler API test respects
+the [Page Object Model (POM)](https://www.selenium.dev/documentation/guidelines/page_object_models/) design pattern.
+Every page of DolphinScheduler's api is abstracted into a class for better maintainability.
+
+### Example
+
+The login page's api is abstracted
+as [`LoginPage`](dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api.test/pages/LoginPage.java), with the
+following fields,
+
+```java
+public HttpResponse login(String username, String password) {
+    Map<String, Object> params = new HashMap<>();
+
+    params.put("userName", username);
+    params.put("userPassword", password);
+
+    RequestClient requestClient = new RequestClient();
+
+    return requestClient.post("/login", null, params);
+}
+```
+
+where `userName`, `userPassword` are the main elements on UI that we are interested in.
+
+## Test Environment Setup
+
+DolphinScheduler End-to-End test uses [testcontainers](https://www.testcontainers.org) to set up the testing

Review Comment:
   No. They are not related.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org