DolphinScheduler/dolphinscheduler-api-test
xiangzihao 627c76b75a
Some checks failed
API-Test / API-Test-Path-Filter (push) Has been cancelled
Backend / Backend-Path-Filter (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
E2E-K8S / E2E-K8S-Path-Filter (push) Has been cancelled
E2E / E2E-Path-Filter (push) Has been cancelled
publish-docker / build (push) Has been cancelled
publish-helm-chart / build (push) Has been cancelled
Test / Unit-Test-Path-Filter (push) Has been cancelled
API-Test / API-Test-Build (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.ExecutorAPITest name:ExecutorAPITest]) (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.LdapLoginAPITest name:LdapLoginAPITest]) (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.ProjectAPITest name:ProjectAPITest]) (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.SchedulerAPITest name:SchedulerAPITest]) (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.TenantAPITest name:TenantAPITest]) (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.WorkerGroupAPITest name:WorkerGroupAPITest]) (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.WorkflowDefinitionAPITest name:WorkflowDefinitionAPITest]) (push) Has been cancelled
API-Test / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.api.test.cases.WorkflowInstanceAPITest name:WorkflowInstanceAPITest]) (push) Has been cancelled
API-Test / API-Test-Result (push) Has been cancelled
Backend / Backend-Build (11) (push) Has been cancelled
Backend / Backend-Build (8) (push) Has been cancelled
Backend / ${{ matrix.case.name }} (map[name:cluster-test-mysql-with-mysql-registry script:.github/workflows/cluster-test/mysql_with_mysql_registry/start-job.sh]) (push) Has been cancelled
Backend / ${{ matrix.case.name }} (map[name:cluster-test-mysql-with-zookeeper-registry script:.github/workflows/cluster-test/mysql_with_zookeeper_registry/start-job.sh]) (push) Has been cancelled
Backend / ${{ matrix.case.name }} (map[name:cluster-test-postgresql-with-postgresql-registry script:.github/workflows/cluster-test/postgresql_with_postgresql_registry/start-job.sh]) (push) Has been cancelled
Backend / ${{ matrix.case.name }} (map[name:cluster-test-postgresql-zookeeper-registry script:.github/workflows/cluster-test/postgresql_with_zookeeper_registry/start-job.sh]) (push) Has been cancelled
Backend / ${{ matrix.case.name }}-${{ matrix.version }} (map[name:schema-check-with-mysql script:.github/workflows/schema-check/mysql/start-job.sh], 3.1.9) (push) Has been cancelled
Backend / ${{ matrix.case.name }}-${{ matrix.version }} (map[name:schema-check-with-mysql script:.github/workflows/schema-check/mysql/start-job.sh], 3.2.0) (push) Has been cancelled
Backend / ${{ matrix.case.name }}-${{ matrix.version }} (map[name:schema-check-with-postgresql script:.github/workflows/schema-check/postgresql/start-job.sh], 3.1.9) (push) Has been cancelled
Backend / ${{ matrix.case.name }}-${{ matrix.version }} (map[name:schema-check-with-postgresql script:.github/workflows/schema-check/postgresql/start-job.sh], 3.2.0) (push) Has been cancelled
Backend / Build (push) Has been cancelled
E2E-K8S / E2E-K8S-Execute (push) Has been cancelled
E2E-K8S / E2E-K8S-Result (push) Has been cancelled
E2E / E2E-Build (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.ClickhouseDataSourceE2ETest name:ClickhouseDataSourceE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.ClusterE2ETest name:ClusterE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.EnvironmentE2ETest name:EnvironmentE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.FileManageE2ETest name:FileManageE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.HiveDataSourceE2ETest name:HiveDataSourceE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.MysqlDataSourceE2ETest name:MysqlDataSourceE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.PostgresDataSourceE2ETest name:PostgresDataSourceE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.ProjectE2ETest name:ProjectE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.QueueE2ETest name:QueueE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.SqlServerDataSourceE2ETest name:SqlServerDataSourceE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.TenantE2ETest name:TenantE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.TokenE2ETest name:TokenE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.UserE2ETest name:UserE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.WorkerGroupE2ETest name:WorkerGroupE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.WorkflowE2ETest name:WorkflowE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.WorkflowHttpTaskE2ETest name:WorkflowHttpTaskE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.WorkflowJavaTaskE2ETest name:WorkflowJavaTaskE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.tasks.PythonTaskE2ETest name:PythonTaskE2ETest]) (push) Has been cancelled
E2E / ${{ matrix.case.name }} (map[class:org.apache.dolphinscheduler.e2e.cases.tasks.ShellTaskE2ETest name:ShellTaskE2ETest]) (push) Has been cancelled
E2E / E2E (push) Has been cancelled
Test / Unit-Test (11) (push) Has been cancelled
Test / Unit-Test (8) (push) Has been cancelled
Test / Unit Test (push) Has been cancelled
[Improvement-16106] Add admin-user-filter in LDAP (#16826)
* improvement 16106

* fix ut

* fix comment

* fix spotless
2024-11-22 17:39:18 +08:00
..
dolphinscheduler-api-test-case [Improvement-16106] Add admin-user-filter in LDAP (#16826) 2024-11-22 17:39:18 +08:00
dolphinscheduler-api-test-core
pom.xml [Improvement-16106] Add admin-user-filter in LDAP (#16826) 2024-11-22 17:39:18 +08:00
README.md [Improvement-16106] Add admin-user-filter in LDAP (#16826) 2024-11-22 17:39:18 +08:00

DolphinScheduler Backend API Test

Page Object Model

DolphinScheduler API test respects the Page Object Model (POM) 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 , with the following fields,

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 API test uses testcontainers to set up the testing environment, with docker compose.

Typically, every test case needs one or more docker-compose.yaml files to set up all needed components, and expose the DolphinScheduler UI port for testing. You can use @DolphinScheduler(composeFiles = "") and pass the docker-compose.yaml files to automatically set up the environment in the test class.


@DolphinScheduler(composeFiles = "docker/tenant/docker-compose.yaml")
class TenantAPITest {
}

Notes

Local development

Mac M1

Add VM options to the test configuration in IntelliJ IDEA:

# In this mode you need to install docker desktop for mac and run it with locally
-Dm1_chip=true

Running locally(without Docker)

# In this mode you need to start frontend and backend services locally
-Dlocal=true

Running locally(with Docker)

# In this mode you only need to install docker locally
  • To run the tests locally, you need to have the DolphinScheduler running locally. You should add dolphinscheduler-api-test/pom.xml to the maven project Since it does not participate in project compilation, it is not in the main project.
  • Running run test class org.apache.dolphinscheduler.api.test.cases.TenantAPITest in the IDE.