break60 4 years ago
parent
commit
353379d420
  1. 8
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterSchedulerService.java
  2. 7
      dolphinscheduler-server/src/main/resources/config/install_config.conf
  3. 25
      e2e/src/test/java/org/apache/dolphinscheduler/data/project/ProcessInstanceData.java
  4. 2
      e2e/src/test/java/org/apache/dolphinscheduler/data/project/ProjectData.java
  5. 2
      e2e/src/test/java/org/apache/dolphinscheduler/data/project/WorkflowDefineData.java
  6. 31
      e2e/src/test/java/org/apache/dolphinscheduler/locator/project/ProcessInstanceLocator.java
  7. 9
      e2e/src/test/java/org/apache/dolphinscheduler/locator/project/ProjectLocator.java
  8. 4
      e2e/src/test/java/org/apache/dolphinscheduler/locator/project/TimingLocator.java
  9. 2
      e2e/src/test/java/org/apache/dolphinscheduler/locator/project/WorkflowDefineLocator.java
  10. 226
      e2e/src/test/java/org/apache/dolphinscheduler/page/project/CreateWorkflowPage.java
  11. 40
      e2e/src/test/java/org/apache/dolphinscheduler/page/project/ProcessInstancePage.java
  12. 29
      e2e/src/test/java/org/apache/dolphinscheduler/page/project/ProjectPage.java
  13. 4
      e2e/src/test/java/org/apache/dolphinscheduler/page/project/TimingPage.java
  14. 226
      e2e/src/test/java/org/apache/dolphinscheduler/page/project/WorkflowDefinePage.java
  15. 6
      e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteProject.java
  16. 26
      e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteWorkflow.java
  17. 35
      e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestProcessInstance.java
  18. 12
      e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestProject.java
  19. 10
      e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestRunWorkflow.java
  20. 36
      e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestWorkflowDefine.java
  21. 29
      e2e/testng.xml

8
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterSchedulerService.java

@ -46,7 +46,7 @@ import java.util.concurrent.TimeUnit;
public class MasterSchedulerService extends Thread { public class MasterSchedulerService extends Thread {
/** /**
* logger of MasterSchedulerThread * logger of MasterSchedulerService
*/ */
private static final Logger logger = LoggerFactory.getLogger(MasterSchedulerService.class); private static final Logger logger = LoggerFactory.getLogger(MasterSchedulerService.class);
@ -80,7 +80,7 @@ public class MasterSchedulerService extends Thread {
/** /**
* constructor of MasterSchedulerThread * constructor of MasterSchedulerService
*/ */
@PostConstruct @PostConstruct
public void init(){ public void init(){
@ -91,7 +91,7 @@ public class MasterSchedulerService extends Thread {
@Override @Override
public void start(){ public void start(){
super.setName("MasterSchedulerThread"); super.setName("MasterSchedulerService");
super.start(); super.start();
} }
@ -109,7 +109,7 @@ public class MasterSchedulerService extends Thread {
} }
/** /**
* run of MasterSchedulerThread * run of MasterSchedulerService
*/ */
@Override @Override
public void run() { public void run() {

7
dolphinscheduler-server/src/main/resources/config/install_config.conf

@ -27,12 +27,13 @@ dbhost="192.168.xx.xx:3306"
# db username # db username
username="xx" username="xx"
# db password
# NOTICE: if there are special characters, please use the \ to escape, for example, `[` escape to `\[`
password="xx"
# database name # database name
dbname="dolphinscheduler" dbname="dolphinscheduler"
# db passwprd
# NOTICE: if there are special characters, please use the \ to escape, for example, `[` escape to `\[`
password="xx"
# zk cluster # zk cluster
zkQuorum="192.168.xx.xx:2181,192.168.xx.xx:2181,192.168.xx.xx:2181" zkQuorum="192.168.xx.xx:2181,192.168.xx.xx:2181,192.168.xx.xx:2181"

25
e2e/src/test/java/org/apache/dolphinscheduler/data/project/ProcessInstanceData.java

@ -0,0 +1,25 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.data.project;
public class ProcessInstanceData {
//Process Instance page title
public static final String PROCESS_INSTANCE_TITLE = "工作流实例 - DolphinScheduler";
public static final String RERUN_TYPE= "重跑";
}

2
e2e/src/test/java/org/apache/dolphinscheduler/data/project/CreateProjectData.java → e2e/src/test/java/org/apache/dolphinscheduler/data/project/ProjectData.java

@ -16,7 +16,7 @@
*/ */
package org.apache.dolphinscheduler.data.project; package org.apache.dolphinscheduler.data.project;
public class CreateProjectData { public class ProjectData {
// create project name // create project name
public static final String PROJECT_NAME = "selenium_project_1"; public static final String PROJECT_NAME = "selenium_project_1";
// create project description // create project description

2
e2e/src/test/java/org/apache/dolphinscheduler/data/project/CreateWorkflowData.java → e2e/src/test/java/org/apache/dolphinscheduler/data/project/WorkflowDefineData.java

@ -16,7 +16,7 @@
*/ */
package org.apache.dolphinscheduler.data.project; package org.apache.dolphinscheduler.data.project;
public class CreateWorkflowData { public class WorkflowDefineData {
/** /**
* create workflow data * create workflow data
*/ */

31
e2e/src/test/java/org/apache/dolphinscheduler/locator/project/ProcessInstanceLocator.java

@ -0,0 +1,31 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.locator.project;
import org.openqa.selenium.By;
public class ProcessInstanceLocator {
// jump Process Instance page
//click Process Instance name
public static final By CLICK_PROCESS_INSTANCE_NAME = By.xpath("//div[3]/div/ul/li[2]");
// click rerun button
public static final By CLICK_RERUN_BUTTON = By.xpath("//tr[2]/td[14]/div[1]/button[2]");
//assert rerun type
public static final By RUNNING_TYPE = By.xpath("//tr[2]/td[5]/span");
}

9
e2e/src/test/java/org/apache/dolphinscheduler/locator/project/CreateProjectLocator.java → e2e/src/test/java/org/apache/dolphinscheduler/locator/project/ProjectLocator.java

@ -18,17 +18,12 @@ package org.apache.dolphinscheduler.locator.project;
import org.openqa.selenium.By; import org.openqa.selenium.By;
public class CreateProjectLocator { public class ProjectLocator {
//click project manage //click project manage
// public static final By PROJECT_MANAGE = By.xpath("//div[@class='clearfix list'][2]");
public static final By PROJECT_MANAGE = By.xpath("//div[2]/div[2]/div/a/span"); public static final By PROJECT_MANAGE = By.xpath("//div[2]/div[2]/div/a/span");
// public static final By SECURITY_MANAGE = By.xpath("//div[@class='m-top']/div/div[2]/dev[@class='clearfix list'][6]");
public static final By SECURITY_MANAGE = By.xpath("//div[2]/div[6]/div/a/span");
//click create project button //click create project button
public static final By CREATE_PROJECT_BUTTON = By.xpath("//div[2]/div/div[1]/button/span"); public static final By CREATE_PROJECT_BUTTON = By.xpath("//button/span");
//input project name //input project name
public static final By PROJECT_NAME = By.xpath("//div[2]/div/div/div[2]/div/input"); public static final By PROJECT_NAME = By.xpath("//div[2]/div/div/div[2]/div/input");

4
e2e/src/test/java/org/apache/dolphinscheduler/locator/project/TimingLocator.java

@ -45,9 +45,9 @@ public class TimingLocator {
public static final By CLICK_CREATE_BUTTON = By.xpath("//div[12]/button[2]/span"); public static final By CLICK_CREATE_BUTTON = By.xpath("//div[12]/button[2]/span");
//edit timing //edit timing
public static final By CLICK_TIMING_MANAGEMENT_BUTTON = By.xpath("//div[2]/div/div[3]/div[1]/div/table/tr[2]/td[10]/button[6]"); public static final By CLICK_TIMING_MANAGEMENT_BUTTON = By.xpath("//tr[2]/td[10]/button[6]");
public static final By CLICK_EDIT_TIMING_BUTTON = By.xpath("//div[2]/div[3]/div/div[2]/div[1]/table/tr[2]/td[10]/button[1]"); public static final By CLICK_EDIT_TIMING_BUTTON = By.xpath("//tr[2]/td[10]/button[1]/i");
//online timing //online timing
public static final By CLICK_ONLINE_TIMING_BUTTON = By.xpath("//td[10]/button[2]"); public static final By CLICK_ONLINE_TIMING_BUTTON = By.xpath("//td[10]/button[2]");

2
e2e/src/test/java/org/apache/dolphinscheduler/locator/project/CreateWorkflowLocator.java → e2e/src/test/java/org/apache/dolphinscheduler/locator/project/WorkflowDefineLocator.java

@ -19,7 +19,7 @@ package org.apache.dolphinscheduler.locator.project;
import org.openqa.selenium.By; import org.openqa.selenium.By;
public class CreateWorkflowLocator { public class WorkflowDefineLocator {
/** /**
* jump workflow define page * jump workflow define page

226
e2e/src/test/java/org/apache/dolphinscheduler/page/project/CreateWorkflowPage.java

@ -1,226 +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.
*/
package org.apache.dolphinscheduler.page.project;
import org.apache.dolphinscheduler.common.PageCommon;
import org.apache.dolphinscheduler.constant.TestConstant;
import org.apache.dolphinscheduler.data.project.CreateWorkflowData;
import org.apache.dolphinscheduler.locator.project.CreateWorkflowLocator;
import org.apache.dolphinscheduler.locator.project.RunWorkflowLocator;
import org.openqa.selenium.WebDriver;
public class CreateWorkflowPage extends PageCommon {
public CreateWorkflowPage(WebDriver driver) {
super(driver);
}
/**
* jump create workflow page
*/
public boolean jumpWorkflowPage() throws InterruptedException {
// click project name
clickElement(CreateWorkflowLocator.CLICK_PROJECT_NAME);
Thread.sleep(TestConstant.ONE_THOUSAND);
System.out.println("Click on workflow define to jump to workflow define page");
// click workflow define
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_DEFINE);
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
}
public boolean createWorkflow() throws InterruptedException {
System.out.println("Click create workflow button");
// click create workflow button
clickElement(CreateWorkflowLocator.CLICK_CREATE_WORKFLOW_BUTTON);
System.out.println("drag shell task");
//drag shell_task
dragAndDrop(CreateWorkflowLocator.MOUSE_DOWN_AT_SHELL,CreateWorkflowLocator.MOUSE_MOVE_SHELL_AT_DAG);
//input shell task _name
sendInput(CreateWorkflowLocator.INPUT_SHELL_TASK_NAME , CreateWorkflowData.SHELL_TASK_NAME);
//click stop run type
clickElement(CreateWorkflowLocator.CLICK_STOP_RUN_TYPE);
//click normal run type
clickElement(CreateWorkflowLocator.CLICK_NORMAL_RUN_TYPE);
//input shell task description
sendInput(CreateWorkflowLocator.INPUT_SHELL_TASK_DESCRIPTION , CreateWorkflowData.SHELL_TASK_DESCRIPTION);
//select task priority
clickElement(CreateWorkflowLocator.CLICK_TASK_PRIORITY);
clickElement(CreateWorkflowLocator.SELECT_TASK_PRIORITY);
//select work group
clickElement(CreateWorkflowLocator.CLICK_WORK_GROUP);
clickElement(CreateWorkflowLocator.SELECT_WORK_GROUP);
//select number of failed retries
clickElement(CreateWorkflowLocator.SELECT_FAIL_RETRIES_NUMBER);
//select failed retry interval
clickElement(CreateWorkflowLocator.SELECT_FAIL_RETRIES_INTERVAL);
//click timeout alarm
clickElement(CreateWorkflowLocator.CLICK_TIMEOUT_ALARM);
//select timeout fail
clickElement(CreateWorkflowLocator.SELECT_TIMEOUT_FAIL);
//cancel timeout alarm
clickElement(CreateWorkflowLocator.CANCEL_TIMEOUT_ALARM);
//select timeout alarm
clickElement(CreateWorkflowLocator.SELECT_TIMEOUT_ALARM);
//clear timeout
clearInput(CreateWorkflowLocator.SELECT_TIMEOUT);
clearInput(CreateWorkflowLocator.SELECT_TIMEOUT);
//input timeout
sendInput(CreateWorkflowLocator.SELECT_TIMEOUT, CreateWorkflowData.INPUT_TIMEOUT);
//click codeMirror and input script
inputCodeMirror(CreateWorkflowLocator.CLICK_CODE_MIRROR, CreateWorkflowLocator.INPUT_SCRIPT, CreateWorkflowData.SHELL_SCRIPT);
scrollToElementBottom(CreateWorkflowLocator.SCROLL_BOTTOM);
//click custom parameters
clickElement(CreateWorkflowLocator.CLICK_CUSTOM_PARAMETERS);
//input custom parameters
sendInput(CreateWorkflowLocator.INPUT_CUSTOM_PARAMETERS, CreateWorkflowData.INPUT_CUSTOM_PARAMETERS);
//input custom parameters value
sendInput(CreateWorkflowLocator.INPUT_CUSTOM_PARAMETERS_VALUE, CreateWorkflowData.INPUT_CUSTOM_PARAMETERS_VALUE);
//click add custom parameters
clickElement(CreateWorkflowLocator.CLICK_ADD_CUSTOM_PARAMETERS);
scrollToElementBottom(CreateWorkflowLocator.SCROLL_BOTTOM);
//input add custom parameters
sendInput(CreateWorkflowLocator.INPUT_ADD_CUSTOM_PARAMETERS, CreateWorkflowData.INPUT_ADD_CUSTOM_PARAMETERS);
//input add custom parameters value
sendInput(CreateWorkflowLocator.INPUT_ADD_CUSTOM_PARAMETERS_VALUE, CreateWorkflowData.INPUT_ADD_CUSTOM_PARAMETERS_VALUE);
//click delete custom parameters
clickElement(CreateWorkflowLocator.CLICK_DELETE_CUSTOM_PARAMETERS);
//click submit button
clickElement(CreateWorkflowLocator.CLICK_SUBMIT_BUTTON);
Thread.sleep(TestConstant.ONE_THOUSAND);
System.out.println("Task node set up successfully");
System.out.println("move to Dag Element ");
moveToDragElement(CreateWorkflowLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100);
return ifTitleContains(CreateWorkflowData.CREATE_WORKFLOW_TITLE);
}
/**
* save workflow
*/
public boolean saveWorkflow() throws InterruptedException {
System.out.println("start to save workflow ");
//click save workflow button
clickElement(CreateWorkflowLocator.CLICK_SAVE_WORKFLOW_BUTTON);
//input workflow name
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_NAME, CreateWorkflowData.INPUT_WORKFLOW_NAME);
//input workflow description
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_DESCRIPTION, CreateWorkflowData.INPUT_WORKFLOW_DESCRIPTION);
//select tenant
clickElement(CreateWorkflowLocator.CLICK_TENANT);
clickElement(CreateWorkflowLocator.SELECT_TENANT);
//click workflow timeout alarm
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_TIMEOUT_ALARM);
clearInput(CreateWorkflowLocator.INPUT_WORKFLOW_TIMEOUT);
//input workflow timeout
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_TIMEOUT, CreateWorkflowData.INPUT_WORKFLOW_TIMEOUT);
//click workflow global parameters
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_GLOBAL_PARAMETERS);
//input workflow global parameters
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS, CreateWorkflowData.INPUT_WORKFLOW_GLOBAL_PARAMETERS);
//input workflow global parameters value
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES, CreateWorkflowData.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
//click to add workflow global parameters
clickElement(CreateWorkflowLocator.CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS);
//input to add workflow global parameters
sendInput(CreateWorkflowLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS, CreateWorkflowData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS);
//input to add workflow global parameters value
sendInput(CreateWorkflowLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES, CreateWorkflowData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
//delete workflow global parameters value
clickElement(CreateWorkflowLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS);
Thread.sleep(TestConstant.ONE_THOUSAND);
//click add button
System.out.println("submit workflow");
clickButton(CreateWorkflowLocator.CLICK_ADD_BUTTON);
return ifTitleContains(CreateWorkflowData.CREATE_WORKFLOW_TITLE);
}
public boolean onlineWorkflow() throws InterruptedException {
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_DEFINE);
// click online button
System.out.println("Click online workflow button");
clickButton(CreateWorkflowLocator.CLICK_ONLINE_WORKFLOW_BUTTON);
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
}
public boolean offlineWorkflow() throws InterruptedException {
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_DEFINE);
// click offline button
System.out.println("offline workflow");
Thread.sleep(500);
clickButton(CreateWorkflowLocator.CLICK_OFFLINE_WORKFLOW_BUTTON);
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
}
public boolean deleteWorkflow() throws InterruptedException {
//click delete workflow
Thread.sleep(500);
clickButton(CreateWorkflowLocator.DELETE_WORKFLOW_BOTTOM);
//click confirm delete project
clickButton(CreateWorkflowLocator.CONFIRM_DELETE_WORKFLOW_BOTTOM);
// Whether to enter the specified page after submit
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
}
}

40
e2e/src/test/java/org/apache/dolphinscheduler/page/project/ProcessInstancePage.java

@ -0,0 +1,40 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.page.project;
import org.apache.dolphinscheduler.common.PageCommon;
import org.apache.dolphinscheduler.locator.project.ProcessInstanceLocator;
import org.openqa.selenium.WebDriver;
import org.apache.dolphinscheduler.data.project.ProcessInstanceData;
public class ProcessInstancePage extends PageCommon {
public ProcessInstancePage(WebDriver driver) {
super(driver);
}
/**
* rerun workflow page
*/
public boolean rerunWorkflowPage() throws InterruptedException {
clickTopElement(ProcessInstanceLocator.CLICK_PROCESS_INSTANCE_NAME);
clickTopElement(ProcessInstanceLocator.CLICK_RERUN_BUTTON);
return ifTitleContains(ProcessInstanceData.PROCESS_INSTANCE_TITLE);
}
}

29
e2e/src/test/java/org/apache/dolphinscheduler/page/project/CreateProjectPage.java → e2e/src/test/java/org/apache/dolphinscheduler/page/project/ProjectPage.java

@ -18,12 +18,12 @@ package org.apache.dolphinscheduler.page.project;
import org.apache.dolphinscheduler.common.PageCommon; import org.apache.dolphinscheduler.common.PageCommon;
import org.apache.dolphinscheduler.constant.TestConstant; import org.apache.dolphinscheduler.constant.TestConstant;
import org.apache.dolphinscheduler.data.project.CreateProjectData; import org.apache.dolphinscheduler.data.project.ProjectData;
import org.apache.dolphinscheduler.locator.project.CreateProjectLocator; import org.apache.dolphinscheduler.locator.project.ProjectLocator;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriver;
public class CreateProjectPage extends PageCommon { public class ProjectPage extends PageCommon {
public CreateProjectPage(WebDriver driver) { public ProjectPage(WebDriver driver) {
super(driver); super(driver);
} }
@ -31,9 +31,9 @@ public class CreateProjectPage extends PageCommon {
* jump to ProjectManagePage * jump to ProjectManagePage
*/ */
public boolean jumpProjectManagePage() throws InterruptedException { public boolean jumpProjectManagePage() throws InterruptedException {
clickTopElement(CreateProjectLocator.PROJECT_MANAGE); clickTopElement(ProjectLocator.PROJECT_MANAGE);
Thread.sleep(TestConstant.ONE_THOUSAND); Thread.sleep(TestConstant.ONE_THOUSAND);
return ifTitleContains(CreateProjectData.PROJECT_TITLE); return ifTitleContains(ProjectData.PROJECT_TITLE);
} }
/** /**
@ -42,17 +42,18 @@ public class CreateProjectPage extends PageCommon {
* @return Whether to enter the specified page after create project * @return Whether to enter the specified page after create project
*/ */
public boolean createProject() throws InterruptedException { public boolean createProject() throws InterruptedException {
clickElement(CreateProjectLocator.CREATE_PROJECT_BUTTON); Thread.sleep(500);
clickElement(ProjectLocator.CREATE_PROJECT_BUTTON);
// input create project data // input create project data
sendInput(CreateProjectLocator.PROJECT_NAME, CreateProjectData.PROJECT_NAME); sendInput(ProjectLocator.PROJECT_NAME, ProjectData.PROJECT_NAME);
sendInput(CreateProjectLocator.PROJECT_DESCRIPTION, CreateProjectData.DESCRIPTION); sendInput(ProjectLocator.PROJECT_DESCRIPTION, ProjectData.DESCRIPTION);
// click submit button // click submit button
clickButton(CreateProjectLocator.SUBMIT_BUTTON); clickButton(ProjectLocator.SUBMIT_BUTTON);
// Whether to enter the specified page after submit // Whether to enter the specified page after submit
return ifTitleContains(CreateProjectData.PROJECT_TITLE); return ifTitleContains(ProjectData.PROJECT_TITLE);
} }
/** /**
@ -62,12 +63,12 @@ public class CreateProjectPage extends PageCommon {
*/ */
public boolean deleteProject() throws InterruptedException { public boolean deleteProject() throws InterruptedException {
//click delete project //click delete project
clickElement(CreateProjectLocator.DELETE_PROJECT_BUTTON); clickElement(ProjectLocator.DELETE_PROJECT_BUTTON);
//click confirm delete project //click confirm delete project
clickElement(CreateProjectLocator.CONFIRM_DELETE_PROJECT_BUTTON); clickElement(ProjectLocator.CONFIRM_DELETE_PROJECT_BUTTON);
// Whether to enter the specified page after submit // Whether to enter the specified page after submit
return ifTitleContains(CreateProjectData.PROJECT_TITLE); return ifTitleContains(ProjectData.PROJECT_TITLE);
} }
} }

4
e2e/src/test/java/org/apache/dolphinscheduler/page/project/TimingPage.java

@ -64,11 +64,11 @@ public class TimingPage extends PageCommon {
public boolean editTiming() throws InterruptedException { public boolean editTiming() throws InterruptedException {
// click timing button // click timing button
System.out.println("Click timing management button"); System.out.println("Click timing management button");
Thread.sleep(1000);
clickButton(TimingLocator.CLICK_TIMING_MANAGEMENT_BUTTON); clickButton(TimingLocator.CLICK_TIMING_MANAGEMENT_BUTTON);
Thread.sleep(500); Thread.sleep(1000);
System.out.println("Click edit timing button"); System.out.println("Click edit timing button");
clickButton(TimingLocator.CLICK_EDIT_TIMING_BUTTON); clickButton(TimingLocator.CLICK_EDIT_TIMING_BUTTON);
Thread.sleep(500);
System.out.println("Click execution timing button"); System.out.println("Click execution timing button");
clickButton(TimingLocator.CLICK_EXECUTION_TIMING_BUTTON); clickButton(TimingLocator.CLICK_EXECUTION_TIMING_BUTTON);
Thread.sleep(1000); Thread.sleep(1000);

226
e2e/src/test/java/org/apache/dolphinscheduler/page/project/WorkflowDefinePage.java

@ -0,0 +1,226 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.page.project;
import org.apache.dolphinscheduler.common.PageCommon;
import org.apache.dolphinscheduler.constant.TestConstant;
import org.apache.dolphinscheduler.data.project.WorkflowDefineData;
import org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator;
import org.openqa.selenium.WebDriver;
public class WorkflowDefinePage extends PageCommon {
public WorkflowDefinePage(WebDriver driver) {
super(driver);
}
/**
* jump create workflow page
*/
public boolean jumpWorkflowPage() throws InterruptedException {
// click project name
clickElement(WorkflowDefineLocator.CLICK_PROJECT_NAME);
Thread.sleep(TestConstant.ONE_THOUSAND);
System.out.println("Click on workflow define to jump to workflow define page");
// click workflow define
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
public boolean createWorkflow() throws InterruptedException {
System.out.println("Click create workflow button");
// click create workflow button
clickElement(WorkflowDefineLocator.CLICK_CREATE_WORKFLOW_BUTTON);
System.out.println("drag shell task");
//drag shell_task
dragAndDrop(WorkflowDefineLocator.MOUSE_DOWN_AT_SHELL, WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG);
//input shell task _name
sendInput(WorkflowDefineLocator.INPUT_SHELL_TASK_NAME , WorkflowDefineData.SHELL_TASK_NAME);
//click stop run type
clickElement(WorkflowDefineLocator.CLICK_STOP_RUN_TYPE);
//click normal run type
clickElement(WorkflowDefineLocator.CLICK_NORMAL_RUN_TYPE);
//input shell task description
sendInput(WorkflowDefineLocator.INPUT_SHELL_TASK_DESCRIPTION , WorkflowDefineData.SHELL_TASK_DESCRIPTION);
//select task priority
clickElement(WorkflowDefineLocator.CLICK_TASK_PRIORITY);
clickElement(WorkflowDefineLocator.SELECT_TASK_PRIORITY);
//select work group
clickElement(WorkflowDefineLocator.CLICK_WORK_GROUP);
clickElement(WorkflowDefineLocator.SELECT_WORK_GROUP);
//select number of failed retries
clickElement(WorkflowDefineLocator.SELECT_FAIL_RETRIES_NUMBER);
//select failed retry interval
clickElement(WorkflowDefineLocator.SELECT_FAIL_RETRIES_INTERVAL);
//click timeout alarm
clickElement(WorkflowDefineLocator.CLICK_TIMEOUT_ALARM);
//select timeout fail
clickElement(WorkflowDefineLocator.SELECT_TIMEOUT_FAIL);
//cancel timeout alarm
clickElement(WorkflowDefineLocator.CANCEL_TIMEOUT_ALARM);
//select timeout alarm
clickElement(WorkflowDefineLocator.SELECT_TIMEOUT_ALARM);
//clear timeout
clearInput(WorkflowDefineLocator.SELECT_TIMEOUT);
clearInput(WorkflowDefineLocator.SELECT_TIMEOUT);
//input timeout
sendInput(WorkflowDefineLocator.SELECT_TIMEOUT, WorkflowDefineData.INPUT_TIMEOUT);
//click codeMirror and input script
inputCodeMirror(WorkflowDefineLocator.CLICK_CODE_MIRROR, WorkflowDefineLocator.INPUT_SCRIPT, WorkflowDefineData.SHELL_SCRIPT);
scrollToElementBottom(WorkflowDefineLocator.SCROLL_BOTTOM);
//click custom parameters
clickElement(WorkflowDefineLocator.CLICK_CUSTOM_PARAMETERS);
//input custom parameters
sendInput(WorkflowDefineLocator.INPUT_CUSTOM_PARAMETERS, WorkflowDefineData.INPUT_CUSTOM_PARAMETERS);
//input custom parameters value
sendInput(WorkflowDefineLocator.INPUT_CUSTOM_PARAMETERS_VALUE, WorkflowDefineData.INPUT_CUSTOM_PARAMETERS_VALUE);
//click add custom parameters
clickElement(WorkflowDefineLocator.CLICK_ADD_CUSTOM_PARAMETERS);
scrollToElementBottom(WorkflowDefineLocator.SCROLL_BOTTOM);
//input add custom parameters
sendInput(WorkflowDefineLocator.INPUT_ADD_CUSTOM_PARAMETERS, WorkflowDefineData.INPUT_ADD_CUSTOM_PARAMETERS);
//input add custom parameters value
sendInput(WorkflowDefineLocator.INPUT_ADD_CUSTOM_PARAMETERS_VALUE, WorkflowDefineData.INPUT_ADD_CUSTOM_PARAMETERS_VALUE);
//click delete custom parameters
clickElement(WorkflowDefineLocator.CLICK_DELETE_CUSTOM_PARAMETERS);
//click submit button
clickElement(WorkflowDefineLocator.CLICK_SUBMIT_BUTTON);
Thread.sleep(TestConstant.ONE_THOUSAND);
System.out.println("Task node set up successfully");
System.out.println("move to Dag Element ");
moveToDragElement(WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100);
return ifTitleContains(WorkflowDefineData.CREATE_WORKFLOW_TITLE);
}
/**
* save workflow
*/
public boolean saveWorkflow() throws InterruptedException {
System.out.println("start to save workflow ");
//click save workflow button
clickElement(WorkflowDefineLocator.CLICK_SAVE_WORKFLOW_BUTTON);
//input workflow name
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_NAME, WorkflowDefineData.INPUT_WORKFLOW_NAME);
//input workflow description
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_DESCRIPTION, WorkflowDefineData.INPUT_WORKFLOW_DESCRIPTION);
//select tenant
clickElement(WorkflowDefineLocator.CLICK_TENANT);
clickElement(WorkflowDefineLocator.SELECT_TENANT);
//click workflow timeout alarm
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_TIMEOUT_ALARM);
clearInput(WorkflowDefineLocator.INPUT_WORKFLOW_TIMEOUT);
//input workflow timeout
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_TIMEOUT, WorkflowDefineData.INPUT_WORKFLOW_TIMEOUT);
//click workflow global parameters
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_GLOBAL_PARAMETERS);
//input workflow global parameters
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS, WorkflowDefineData.INPUT_WORKFLOW_GLOBAL_PARAMETERS);
//input workflow global parameters value
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES, WorkflowDefineData.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
//click to add workflow global parameters
clickElement(WorkflowDefineLocator.CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS);
//input to add workflow global parameters
sendInput(WorkflowDefineLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS, WorkflowDefineData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS);
//input to add workflow global parameters value
sendInput(WorkflowDefineLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES, WorkflowDefineData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
//delete workflow global parameters value
clickElement(WorkflowDefineLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS);
Thread.sleep(TestConstant.ONE_THOUSAND);
//click add button
System.out.println("submit workflow");
clickButton(WorkflowDefineLocator.CLICK_ADD_BUTTON);
return ifTitleContains(WorkflowDefineData.CREATE_WORKFLOW_TITLE);
}
public boolean onlineWorkflow() throws InterruptedException {
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
// click online button
System.out.println("Click online workflow button");
clickButton(WorkflowDefineLocator.CLICK_ONLINE_WORKFLOW_BUTTON);
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
public boolean offlineWorkflow() throws InterruptedException {
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
// click offline button
System.out.println("offline workflow");
Thread.sleep(500);
clickButton(WorkflowDefineLocator.CLICK_OFFLINE_WORKFLOW_BUTTON);
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
public boolean deleteWorkflow() throws InterruptedException {
//click delete workflow
Thread.sleep(500);
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
clickButton(WorkflowDefineLocator.DELETE_WORKFLOW_BOTTOM);
//click confirm delete project
clickButton(WorkflowDefineLocator.CONFIRM_DELETE_WORKFLOW_BOTTOM);
// Whether to enter the specified page after submit
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
}

6
e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteProject.java

@ -17,15 +17,15 @@
package org.apache.dolphinscheduler.testcase.testDeleteData; package org.apache.dolphinscheduler.testcase.testDeleteData;
import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage; import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestDeleteProject extends BaseTest { public class TestDeleteProject extends BaseTest {
private CreateProjectPage createProjectPage; private ProjectPage createProjectPage;
@Test(groups={"functionTests"},dependsOnGroups = { "login","project"},description = "TestDeleteProject") @Test(groups={"functionTests"},dependsOnGroups = { "login","project"},description = "TestDeleteProject")
public void testDeleteProject() throws InterruptedException { public void testDeleteProject() throws InterruptedException {
createProjectPage = new CreateProjectPage(driver); createProjectPage = new ProjectPage(driver);
//jump to project manage page //jump to project manage page
System.out.println("jump to the project manage page to delete project"); System.out.println("jump to the project manage page to delete project");
createProjectPage.jumpProjectManagePage(); createProjectPage.jumpProjectManagePage();

26
e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteWorkflow.java

@ -17,27 +17,29 @@
package org.apache.dolphinscheduler.testcase.testDeleteData; package org.apache.dolphinscheduler.testcase.testDeleteData;
import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage; import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.apache.dolphinscheduler.page.project.CreateWorkflowPage; import org.apache.dolphinscheduler.page.project.WorkflowDefinePage;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestDeleteWorkflow extends BaseTest { public class TestDeleteWorkflow extends BaseTest {
private CreateWorkflowPage createWorkflowPage; private WorkflowDefinePage createWorkflowPage;
private CreateProjectPage createProjectPage; private ProjectPage createProjectPage;
/**
* offline workflow
* @throws InterruptedException
*/
@Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "TestDeleteWorkflow") @Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "TestDeleteWorkflow")
public void testDeleteWorkflow() throws InterruptedException { public void testOfflineWorkflow() throws InterruptedException {
createProjectPage = new CreateProjectPage(driver); createWorkflowPage = new WorkflowDefinePage(driver);
//jump to project manage page
// System.out.println("jump to the project manage page to delete workflow");
// createProjectPage.jumpProjectManagePage();
createWorkflowPage = new CreateWorkflowPage(driver);
// createWorkflowPage.jumpWorkflowPage();
System.out.println("start offline workflow"); System.out.println("start offline workflow");
assert createWorkflowPage.offlineWorkflow(); assert createWorkflowPage.offlineWorkflow();
System.out.println("end offline workflow"); System.out.println("end offline workflow");
System.out.println("===================================");
}
@Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "TestDeleteWorkflow")
public void testDeleteWorkflow() throws InterruptedException {
System.out.println("start delete workflow"); System.out.println("start delete workflow");
assert createWorkflowPage.deleteWorkflow(); assert createWorkflowPage.deleteWorkflow();
System.out.println("end delete workflow"); System.out.println("end delete workflow");

35
e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestProcessInstance.java

@ -0,0 +1,35 @@
/*
* 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.
*/
package org.apache.dolphinscheduler.testcase.testProject;
import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.ProcessInstancePage;
import org.testng.annotations.Test;
public class TestProcessInstance extends BaseTest {
private ProcessInstancePage processInstancePage;
@Test(groups={"functionTests","processInstance"},dependsOnGroups = { "login","workflow" },description = "testRerun")
public void testRerun() throws InterruptedException {
processInstancePage = new ProcessInstancePage(driver);
//rerun workflow
System.out.println("start rerun workflow");
processInstancePage.rerunWorkflowPage();
System.out.println("end rerun workflow");
System.out.println("===================================");
}
}

12
e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateProject.java → e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestProject.java

@ -17,21 +17,21 @@
package org.apache.dolphinscheduler.testcase.testProject; package org.apache.dolphinscheduler.testcase.testProject;
import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage; import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestCreateProject extends BaseTest { public class TestProject extends BaseTest {
private CreateProjectPage createProjectPage; private ProjectPage projectPage;
@Test(groups={"functionTests","project"},dependsOnGroups = { "login" },description = "CreateProjectTest") @Test(groups={"functionTests","project"},dependsOnGroups = { "login" },description = "CreateProjectTest")
public void testCreateProject() throws InterruptedException { public void testCreateProject() throws InterruptedException {
createProjectPage = new CreateProjectPage(driver); projectPage = new ProjectPage(driver);
// enter user manage page // enter user manage page
System.out.println("jump to the projectManage page to create project "); System.out.println("jump to the projectManage page to create project ");
createProjectPage.jumpProjectManagePage(); projectPage.jumpProjectManagePage();
//assert user manage page //assert user manage page
System.out.println("start create project"); System.out.println("start create project");
assert createProjectPage.createProject(); assert projectPage.createProject();
System.out.println("end create project"); System.out.println("end create project");
System.out.println("==================================="); System.out.println("===================================");
} }

10
e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestRunWorkflow.java

@ -17,14 +17,14 @@
package org.apache.dolphinscheduler.testcase.testProject; package org.apache.dolphinscheduler.testcase.testProject;
import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage; import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.apache.dolphinscheduler.page.project.CreateWorkflowPage; import org.apache.dolphinscheduler.page.project.WorkflowDefinePage;
import org.apache.dolphinscheduler.page.project.RunWorkflowPage; import org.apache.dolphinscheduler.page.project.RunWorkflowPage;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestRunWorkflow extends BaseTest { public class TestRunWorkflow extends BaseTest {
private CreateWorkflowPage createWorkflowPage; private WorkflowDefinePage createWorkflowPage;
private CreateProjectPage createProjectPage; private ProjectPage projectPage;
private RunWorkflowPage runWorkflowPage; private RunWorkflowPage runWorkflowPage;
@ -32,7 +32,7 @@ public class TestRunWorkflow extends BaseTest {
public void testRunWorkflow() throws InterruptedException { public void testRunWorkflow() throws InterruptedException {
runWorkflowPage = new RunWorkflowPage(driver); runWorkflowPage = new RunWorkflowPage(driver);
createProjectPage = new CreateProjectPage(driver); projectPage = new ProjectPage(driver);
System.out.println("start run workflow"); System.out.println("start run workflow");
assert runWorkflowPage.runWorkflow(); assert runWorkflowPage.runWorkflow();
System.out.println("end run workflow"); System.out.println("end run workflow");

36
e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateWorkflow.java → e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestWorkflowDefine.java

@ -17,32 +17,40 @@
package org.apache.dolphinscheduler.testcase.testProject; package org.apache.dolphinscheduler.testcase.testProject;
import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage; import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.apache.dolphinscheduler.page.project.CreateWorkflowPage; import org.apache.dolphinscheduler.page.project.WorkflowDefinePage;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class TestCreateWorkflow extends BaseTest { public class TestWorkflowDefine extends BaseTest {
private CreateWorkflowPage createWorkflowPage; private WorkflowDefinePage workflowDefinePage;
private CreateProjectPage createProjectPage; private ProjectPage projectPage;
/**
@Test(groups={"functionTests","workflow"},dependsOnGroups = { "login" },description = "TestCreateWorkflow") * test Create WorkflowDefine
* @throws InterruptedException
*/
@Test(groups={"functionTests","workflow"},dependsOnGroups = { "login" },description = "TestWorkflowDefine")
public void testCreateWorkflow() throws InterruptedException { public void testCreateWorkflow() throws InterruptedException {
createProjectPage = new CreateProjectPage(driver); projectPage = new ProjectPage(driver);
System.out.println("jump to the projectManage page to create workflow"); System.out.println("jump to the projectManage page to create workflow");
createProjectPage.jumpProjectManagePage(); projectPage.jumpProjectManagePage();
createWorkflowPage = new CreateWorkflowPage(driver); workflowDefinePage = new WorkflowDefinePage(driver);
System.out.println("Click on the project name to jump to the project homepage"); System.out.println("Click on the project name to jump to the project homepage");
createWorkflowPage.jumpWorkflowPage(); workflowDefinePage.jumpWorkflowPage();
System.out.println("start create workflow"); System.out.println("start create workflow");
assert createWorkflowPage.createWorkflow(); assert workflowDefinePage.createWorkflow();
assert createWorkflowPage.saveWorkflow(); assert workflowDefinePage.saveWorkflow();
System.out.println("end create workflow"); System.out.println("end create workflow");
System.out.println("===================================");
}
@Test(groups={"functionTests","workflow"},dependsOnGroups = { "login" },description = "TestOnlineWorkflow")
public void testOnlineWorkflow() throws InterruptedException {
workflowDefinePage = new WorkflowDefinePage(driver);
System.out.println("start online workflow"); System.out.println("start online workflow");
assert createWorkflowPage.onlineWorkflow(); assert workflowDefinePage.onlineWorkflow();
System.out.println("end online workflow"); System.out.println("end online workflow");
System.out.println("==================================="); System.out.println("===================================");
} }

29
e2e/testng.xml

@ -26,6 +26,7 @@
<classes> <classes>
<class name="org.apache.dolphinscheduler.testcase.TestLogin"></class> <class name="org.apache.dolphinscheduler.testcase.TestLogin"></class>
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestTenantManage"></class> <class name="org.apache.dolphinscheduler.testcase.testSecurity.TestTenantManage"></class>
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestAlertManage"></class> <class name="org.apache.dolphinscheduler.testcase.testSecurity.TestAlertManage"></class>
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestQueueManage"></class> <class name="org.apache.dolphinscheduler.testcase.testSecurity.TestQueueManage"></class>
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestTokenManage"></class> <class name="org.apache.dolphinscheduler.testcase.testSecurity.TestTokenManage"></class>
@ -37,8 +38,19 @@
</methods> </methods>
</class> </class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestCreateProject"></class> <class name="org.apache.dolphinscheduler.testcase.testProject.TestProject">
<class name="org.apache.dolphinscheduler.testcase.testProject.TestCreateWorkflow"></class> <methods>
<include name="createProject" />
</methods>
</class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestWorkflowDefine">
<methods>
<include name="testCreateWorkflow" />
<include name="testOnlineWorkflow" />
</methods>
</class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestRunWorkflow"></class> <class name="org.apache.dolphinscheduler.testcase.testProject.TestRunWorkflow"></class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestTiming"> <class name="org.apache.dolphinscheduler.testcase.testProject.TestTiming">
@ -50,8 +62,19 @@
<include name="testDeleteTiming" /> <include name="testDeleteTiming" />
</methods> </methods>
</class> </class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestProcessInstance">
<methods>
<include name="testRerun" />
</methods>
</class>
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteWorkflow">
<methods>
<include name="testOfflineWorkflow" />
<include name="testDeleteWorkflow" />
</methods>
</class>
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteWorkflow"></class>
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteProject"></class> <class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteProject"></class>
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteAlert"></class> <class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteAlert"></class>
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteToken"></class> <class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteToken"></class>

Loading…
Cancel
Save