提交 353379d4 编写于 作者: B break60
......@@ -46,7 +46,7 @@ import java.util.concurrent.TimeUnit;
public class MasterSchedulerService extends Thread {
/**
* logger of MasterSchedulerThread
* logger of MasterSchedulerService
*/
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
public void init(){
......@@ -91,7 +91,7 @@ public class MasterSchedulerService extends Thread {
@Override
public void start(){
super.setName("MasterSchedulerThread");
super.setName("MasterSchedulerService");
super.start();
}
......@@ -109,7 +109,7 @@ public class MasterSchedulerService extends Thread {
}
/**
* run of MasterSchedulerThread
* run of MasterSchedulerService
*/
@Override
public void run() {
......
......@@ -16,7 +16,7 @@
#
# NOTICE : If the following config has special characters in the variable `.*[]^${}\+?|()@#&`, Please escape, for example, `[` escape to `\[`
# NOTICE: If the following config has special characters in the variable `.*[]^${}\+?|()@#&`, Please escape, for example, `[` escape to `\[`
# postgresql or mysql
dbtype="mysql"
......@@ -27,12 +27,13 @@ dbhost="192.168.xx.xx:3306"
# db username
username="xx"
# db password
# NOTICE: if there are special characters, please use the \ to escape, for example, `[` escape to `\[`
password="xx"
# database name
dbname="dolphinscheduler"
# db passwprd
# NOTICE: if there are special characters, please use the \ to escape, for example, `[` escape to `\[`
password="xx"
# zk cluster
zkQuorum="192.168.xx.xx:2181,192.168.xx.xx:2181,192.168.xx.xx:2181"
......@@ -137,4 +138,4 @@ alertServer="ds3"
# run api machine
# note: list of machine hostnames for deploying api server
apiServers="ds1"
\ No newline at end of file
apiServers="ds1"
/*
* 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= "重跑";
}
......@@ -16,7 +16,7 @@
*/
package org.apache.dolphinscheduler.data.project;
public class CreateProjectData {
public class ProjectData {
// create project name
public static final String PROJECT_NAME = "selenium_project_1";
// create project description
......
......@@ -16,7 +16,7 @@
*/
package org.apache.dolphinscheduler.data.project;
public class CreateWorkflowData {
public class WorkflowDefineData {
/**
* create workflow data
*/
......
/*
* 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");
}
......@@ -18,17 +18,12 @@ package org.apache.dolphinscheduler.locator.project;
import org.openqa.selenium.By;
public class CreateProjectLocator {
public class ProjectLocator {
//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 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
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
public static final By PROJECT_NAME = By.xpath("//div[2]/div/div/div[2]/div/input");
......
......@@ -45,9 +45,9 @@ public class TimingLocator {
public static final By CLICK_CREATE_BUTTON = By.xpath("//div[12]/button[2]/span");
//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
public static final By CLICK_ONLINE_TIMING_BUTTON = By.xpath("//td[10]/button[2]");
......
......@@ -19,7 +19,7 @@ package org.apache.dolphinscheduler.locator.project;
import org.openqa.selenium.By;
public class CreateWorkflowLocator {
public class WorkflowDefineLocator {
/**
* jump workflow define page
......
/*
* 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);
}
}
......@@ -18,12 +18,12 @@ package org.apache.dolphinscheduler.page.project;
import org.apache.dolphinscheduler.common.PageCommon;
import org.apache.dolphinscheduler.constant.TestConstant;
import org.apache.dolphinscheduler.data.project.CreateProjectData;
import org.apache.dolphinscheduler.locator.project.CreateProjectLocator;
import org.apache.dolphinscheduler.data.project.ProjectData;
import org.apache.dolphinscheduler.locator.project.ProjectLocator;
import org.openqa.selenium.WebDriver;
public class CreateProjectPage extends PageCommon {
public CreateProjectPage(WebDriver driver) {
public class ProjectPage extends PageCommon {
public ProjectPage(WebDriver driver) {
super(driver);
}
......@@ -31,9 +31,9 @@ public class CreateProjectPage extends PageCommon {
* jump to ProjectManagePage
*/
public boolean jumpProjectManagePage() throws InterruptedException {
clickTopElement(CreateProjectLocator.PROJECT_MANAGE);
clickTopElement(ProjectLocator.PROJECT_MANAGE);
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
*/
public boolean createProject() throws InterruptedException {
clickElement(CreateProjectLocator.CREATE_PROJECT_BUTTON);
Thread.sleep(500);
clickElement(ProjectLocator.CREATE_PROJECT_BUTTON);
// input create project data
sendInput(CreateProjectLocator.PROJECT_NAME, CreateProjectData.PROJECT_NAME);
sendInput(CreateProjectLocator.PROJECT_DESCRIPTION, CreateProjectData.DESCRIPTION);
sendInput(ProjectLocator.PROJECT_NAME, ProjectData.PROJECT_NAME);
sendInput(ProjectLocator.PROJECT_DESCRIPTION, ProjectData.DESCRIPTION);
// click submit button
clickButton(CreateProjectLocator.SUBMIT_BUTTON);
clickButton(ProjectLocator.SUBMIT_BUTTON);
// 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 {
//click delete project
clickElement(CreateProjectLocator.DELETE_PROJECT_BUTTON);
clickElement(ProjectLocator.DELETE_PROJECT_BUTTON);
//click confirm delete project
clickElement(CreateProjectLocator.CONFIRM_DELETE_PROJECT_BUTTON);
clickElement(ProjectLocator.CONFIRM_DELETE_PROJECT_BUTTON);
// Whether to enter the specified page after submit
return ifTitleContains(CreateProjectData.PROJECT_TITLE);
return ifTitleContains(ProjectData.PROJECT_TITLE);
}
}
......@@ -64,11 +64,11 @@ public class TimingPage extends PageCommon {
public boolean editTiming() throws InterruptedException {
// click timing button
System.out.println("Click timing management button");
Thread.sleep(1000);
clickButton(TimingLocator.CLICK_TIMING_MANAGEMENT_BUTTON);
Thread.sleep(500);
Thread.sleep(1000);
System.out.println("Click edit timing button");
clickButton(TimingLocator.CLICK_EDIT_TIMING_BUTTON);
Thread.sleep(500);
System.out.println("Click execution timing button");
clickButton(TimingLocator.CLICK_EXECUTION_TIMING_BUTTON);
Thread.sleep(1000);
......
......@@ -18,13 +18,12 @@ 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.apache.dolphinscheduler.data.project.WorkflowDefineData;
import org.apache.dolphinscheduler.locator.project.WorkflowDefineLocator;
import org.openqa.selenium.WebDriver;
public class CreateWorkflowPage extends PageCommon {
public CreateWorkflowPage(WebDriver driver) {
public class WorkflowDefinePage extends PageCommon {
public WorkflowDefinePage(WebDriver driver) {
super(driver);
}
......@@ -34,105 +33,105 @@ public class CreateWorkflowPage extends PageCommon {
public boolean jumpWorkflowPage() throws InterruptedException {
// click project name
clickElement(CreateWorkflowLocator.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(CreateWorkflowLocator.CLICK_WORKFLOW_DEFINE);
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
public boolean createWorkflow() throws InterruptedException {
System.out.println("Click create workflow button");
// click create workflow button
clickElement(CreateWorkflowLocator.CLICK_CREATE_WORKFLOW_BUTTON);
clickElement(WorkflowDefineLocator.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);
dragAndDrop(WorkflowDefineLocator.MOUSE_DOWN_AT_SHELL, WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG);
//input shell task _name
sendInput(CreateWorkflowLocator.INPUT_SHELL_TASK_NAME , CreateWorkflowData.SHELL_TASK_NAME);
sendInput(WorkflowDefineLocator.INPUT_SHELL_TASK_NAME , WorkflowDefineData.SHELL_TASK_NAME);
//click stop run type
clickElement(CreateWorkflowLocator.CLICK_STOP_RUN_TYPE);
clickElement(WorkflowDefineLocator.CLICK_STOP_RUN_TYPE);
//click normal run type
clickElement(CreateWorkflowLocator.CLICK_NORMAL_RUN_TYPE);
clickElement(WorkflowDefineLocator.CLICK_NORMAL_RUN_TYPE);
//input shell task description
sendInput(CreateWorkflowLocator.INPUT_SHELL_TASK_DESCRIPTION , CreateWorkflowData.SHELL_TASK_DESCRIPTION);
sendInput(WorkflowDefineLocator.INPUT_SHELL_TASK_DESCRIPTION , WorkflowDefineData.SHELL_TASK_DESCRIPTION);
//select task priority
clickElement(CreateWorkflowLocator.CLICK_TASK_PRIORITY);
clickElement(CreateWorkflowLocator.SELECT_TASK_PRIORITY);
clickElement(WorkflowDefineLocator.CLICK_TASK_PRIORITY);
clickElement(WorkflowDefineLocator.SELECT_TASK_PRIORITY);
//select work group
clickElement(CreateWorkflowLocator.CLICK_WORK_GROUP);
clickElement(CreateWorkflowLocator.SELECT_WORK_GROUP);
clickElement(WorkflowDefineLocator.CLICK_WORK_GROUP);
clickElement(WorkflowDefineLocator.SELECT_WORK_GROUP);
//select number of failed retries
clickElement(CreateWorkflowLocator.SELECT_FAIL_RETRIES_NUMBER);
clickElement(WorkflowDefineLocator.SELECT_FAIL_RETRIES_NUMBER);
//select failed retry interval
clickElement(CreateWorkflowLocator.SELECT_FAIL_RETRIES_INTERVAL);
clickElement(WorkflowDefineLocator.SELECT_FAIL_RETRIES_INTERVAL);
//click timeout alarm
clickElement(CreateWorkflowLocator.CLICK_TIMEOUT_ALARM);
clickElement(WorkflowDefineLocator.CLICK_TIMEOUT_ALARM);
//select timeout fail
clickElement(CreateWorkflowLocator.SELECT_TIMEOUT_FAIL);
clickElement(WorkflowDefineLocator.SELECT_TIMEOUT_FAIL);
//cancel timeout alarm
clickElement(CreateWorkflowLocator.CANCEL_TIMEOUT_ALARM);
clickElement(WorkflowDefineLocator.CANCEL_TIMEOUT_ALARM);
//select timeout alarm
clickElement(CreateWorkflowLocator.SELECT_TIMEOUT_ALARM);
clickElement(WorkflowDefineLocator.SELECT_TIMEOUT_ALARM);
//clear timeout
clearInput(CreateWorkflowLocator.SELECT_TIMEOUT);
clearInput(CreateWorkflowLocator.SELECT_TIMEOUT);
clearInput(WorkflowDefineLocator.SELECT_TIMEOUT);
clearInput(WorkflowDefineLocator.SELECT_TIMEOUT);
//input timeout
sendInput(CreateWorkflowLocator.SELECT_TIMEOUT, CreateWorkflowData.INPUT_TIMEOUT);
sendInput(WorkflowDefineLocator.SELECT_TIMEOUT, WorkflowDefineData.INPUT_TIMEOUT);
//click codeMirror and input script
inputCodeMirror(CreateWorkflowLocator.CLICK_CODE_MIRROR, CreateWorkflowLocator.INPUT_SCRIPT, CreateWorkflowData.SHELL_SCRIPT);
scrollToElementBottom(CreateWorkflowLocator.SCROLL_BOTTOM);
inputCodeMirror(WorkflowDefineLocator.CLICK_CODE_MIRROR, WorkflowDefineLocator.INPUT_SCRIPT, WorkflowDefineData.SHELL_SCRIPT);
scrollToElementBottom(WorkflowDefineLocator.SCROLL_BOTTOM);
//click custom parameters
clickElement(CreateWorkflowLocator.CLICK_CUSTOM_PARAMETERS);
clickElement(WorkflowDefineLocator.CLICK_CUSTOM_PARAMETERS);
//input custom parameters
sendInput(CreateWorkflowLocator.INPUT_CUSTOM_PARAMETERS, CreateWorkflowData.INPUT_CUSTOM_PARAMETERS);
sendInput(WorkflowDefineLocator.INPUT_CUSTOM_PARAMETERS, WorkflowDefineData.INPUT_CUSTOM_PARAMETERS);
//input custom parameters value
sendInput(CreateWorkflowLocator.INPUT_CUSTOM_PARAMETERS_VALUE, CreateWorkflowData.INPUT_CUSTOM_PARAMETERS_VALUE);
sendInput(WorkflowDefineLocator.INPUT_CUSTOM_PARAMETERS_VALUE, WorkflowDefineData.INPUT_CUSTOM_PARAMETERS_VALUE);
//click add custom parameters
clickElement(CreateWorkflowLocator.CLICK_ADD_CUSTOM_PARAMETERS);
clickElement(WorkflowDefineLocator.CLICK_ADD_CUSTOM_PARAMETERS);
scrollToElementBottom(CreateWorkflowLocator.SCROLL_BOTTOM);
scrollToElementBottom(WorkflowDefineLocator.SCROLL_BOTTOM);
//input add custom parameters
sendInput(CreateWorkflowLocator.INPUT_ADD_CUSTOM_PARAMETERS, CreateWorkflowData.INPUT_ADD_CUSTOM_PARAMETERS);
sendInput(WorkflowDefineLocator.INPUT_ADD_CUSTOM_PARAMETERS, WorkflowDefineData.INPUT_ADD_CUSTOM_PARAMETERS);
//input add custom parameters value
sendInput(CreateWorkflowLocator.INPUT_ADD_CUSTOM_PARAMETERS_VALUE, CreateWorkflowData.INPUT_ADD_CUSTOM_PARAMETERS_VALUE);
sendInput(WorkflowDefineLocator.INPUT_ADD_CUSTOM_PARAMETERS_VALUE, WorkflowDefineData.INPUT_ADD_CUSTOM_PARAMETERS_VALUE);
//click delete custom parameters
clickElement(CreateWorkflowLocator.CLICK_DELETE_CUSTOM_PARAMETERS);
clickElement(WorkflowDefineLocator.CLICK_DELETE_CUSTOM_PARAMETERS);
//click submit button
clickElement(CreateWorkflowLocator.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(CreateWorkflowLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100);
moveToDragElement(WorkflowDefineLocator.MOUSE_MOVE_SHELL_AT_DAG,-300,-100);
return ifTitleContains(CreateWorkflowData.CREATE_WORKFLOW_TITLE);
return ifTitleContains(WorkflowDefineData.CREATE_WORKFLOW_TITLE);
}
/**
......@@ -142,85 +141,86 @@ public class CreateWorkflowPage extends PageCommon {
System.out.println("start to save workflow ");
//click save workflow button
clickElement(CreateWorkflowLocator.CLICK_SAVE_WORKFLOW_BUTTON);
clickElement(WorkflowDefineLocator.CLICK_SAVE_WORKFLOW_BUTTON);
//input workflow name
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_NAME, CreateWorkflowData.INPUT_WORKFLOW_NAME);
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_NAME, WorkflowDefineData.INPUT_WORKFLOW_NAME);
//input workflow description
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_DESCRIPTION, CreateWorkflowData.INPUT_WORKFLOW_DESCRIPTION);
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_DESCRIPTION, WorkflowDefineData.INPUT_WORKFLOW_DESCRIPTION);
//select tenant
clickElement(CreateWorkflowLocator.CLICK_TENANT);
clickElement(CreateWorkflowLocator.SELECT_TENANT);
clickElement(WorkflowDefineLocator.CLICK_TENANT);
clickElement(WorkflowDefineLocator.SELECT_TENANT);
//click workflow timeout alarm
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_TIMEOUT_ALARM);
clearInput(CreateWorkflowLocator.INPUT_WORKFLOW_TIMEOUT);
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_TIMEOUT_ALARM);
clearInput(WorkflowDefineLocator.INPUT_WORKFLOW_TIMEOUT);
//input workflow timeout
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_TIMEOUT, CreateWorkflowData.INPUT_WORKFLOW_TIMEOUT);
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_TIMEOUT, WorkflowDefineData.INPUT_WORKFLOW_TIMEOUT);
//click workflow global parameters
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_GLOBAL_PARAMETERS);
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_GLOBAL_PARAMETERS);
//input workflow global parameters
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS, CreateWorkflowData.INPUT_WORKFLOW_GLOBAL_PARAMETERS);
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS, WorkflowDefineData.INPUT_WORKFLOW_GLOBAL_PARAMETERS);
//input workflow global parameters value
sendInput(CreateWorkflowLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES, CreateWorkflowData.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
sendInput(WorkflowDefineLocator.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES, WorkflowDefineData.INPUT_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
//click to add workflow global parameters
clickElement(CreateWorkflowLocator.CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS);
clickElement(WorkflowDefineLocator.CLICK_ADD_WORKFLOW_GLOBAL_PARAMETERS);
//input to add workflow global parameters
sendInput(CreateWorkflowLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS, CreateWorkflowData.INPUT_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(CreateWorkflowLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES, CreateWorkflowData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
sendInput(WorkflowDefineLocator.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES, WorkflowDefineData.INPUT_ADD_WORKFLOW_GLOBAL_PARAMETERS_VALUES);
//delete workflow global parameters value
clickElement(CreateWorkflowLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS);
clickElement(WorkflowDefineLocator.CLICK_DELETE_WORKFLOW_GLOBAL_PARAMETERS);
Thread.sleep(TestConstant.ONE_THOUSAND);
//click add button
System.out.println("submit workflow");
clickButton(CreateWorkflowLocator.CLICK_ADD_BUTTON);
clickButton(WorkflowDefineLocator.CLICK_ADD_BUTTON);
return ifTitleContains(CreateWorkflowData.CREATE_WORKFLOW_TITLE);
return ifTitleContains(WorkflowDefineData.CREATE_WORKFLOW_TITLE);
}
public boolean onlineWorkflow() throws InterruptedException {
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_DEFINE);
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
// click online button
System.out.println("Click online workflow button");
clickButton(CreateWorkflowLocator.CLICK_ONLINE_WORKFLOW_BUTTON);
clickButton(WorkflowDefineLocator.CLICK_ONLINE_WORKFLOW_BUTTON);
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
public boolean offlineWorkflow() throws InterruptedException {
clickElement(CreateWorkflowLocator.CLICK_WORKFLOW_DEFINE);
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
// click offline button
System.out.println("offline workflow");
Thread.sleep(500);
clickButton(CreateWorkflowLocator.CLICK_OFFLINE_WORKFLOW_BUTTON);
clickButton(WorkflowDefineLocator.CLICK_OFFLINE_WORKFLOW_BUTTON);
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
public boolean deleteWorkflow() throws InterruptedException {
//click delete workflow
Thread.sleep(500);
clickButton(CreateWorkflowLocator.DELETE_WORKFLOW_BOTTOM);
clickElement(WorkflowDefineLocator.CLICK_WORKFLOW_DEFINE);
clickButton(WorkflowDefineLocator.DELETE_WORKFLOW_BOTTOM);
//click confirm delete project
clickButton(CreateWorkflowLocator.CONFIRM_DELETE_WORKFLOW_BOTTOM);
clickButton(WorkflowDefineLocator.CONFIRM_DELETE_WORKFLOW_BOTTOM);
// Whether to enter the specified page after submit
return ifTitleContains(CreateWorkflowData.WORKFLOW_TITLE);
return ifTitleContains(WorkflowDefineData.WORKFLOW_TITLE);
}
}
......@@ -17,15 +17,15 @@
package org.apache.dolphinscheduler.testcase.testDeleteData;
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;
public class TestDeleteProject extends BaseTest {
private CreateProjectPage createProjectPage;
private ProjectPage createProjectPage;
@Test(groups={"functionTests"},dependsOnGroups = { "login","project"},description = "TestDeleteProject")
public void testDeleteProject() throws InterruptedException {
createProjectPage = new CreateProjectPage(driver);
createProjectPage = new ProjectPage(driver);
//jump to project manage page
System.out.println("jump to the project manage page to delete project");
createProjectPage.jumpProjectManagePage();
......
......@@ -17,27 +17,29 @@
package org.apache.dolphinscheduler.testcase.testDeleteData;
import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage;
import org.apache.dolphinscheduler.page.project.CreateWorkflowPage;
import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.apache.dolphinscheduler.page.project.WorkflowDefinePage;
import org.testng.annotations.Test;
public class TestDeleteWorkflow extends BaseTest {
private CreateWorkflowPage createWorkflowPage;
private CreateProjectPage createProjectPage;
private WorkflowDefinePage createWorkflowPage;
private ProjectPage createProjectPage;
/**
* offline workflow
* @throws InterruptedException
*/
@Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "TestDeleteWorkflow")
public void testDeleteWorkflow() throws InterruptedException {
createProjectPage = new CreateProjectPage(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();
public void testOfflineWorkflow() throws InterruptedException {
createWorkflowPage = new WorkflowDefinePage(driver);
System.out.println("start offline workflow");
assert createWorkflowPage.offlineWorkflow();
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");
assert createWorkflowPage.deleteWorkflow();
System.out.println("end delete workflow");
......
/*
* 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("===================================");
}
}
......@@ -17,21 +17,21 @@
package org.apache.dolphinscheduler.testcase.testProject;
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;
public class TestCreateProject extends BaseTest {
private CreateProjectPage createProjectPage;
public class TestProject extends BaseTest {
private ProjectPage projectPage;
@Test(groups={"functionTests","project"},dependsOnGroups = { "login" },description = "CreateProjectTest")
public void testCreateProject() throws InterruptedException {
createProjectPage = new CreateProjectPage(driver);
projectPage = new ProjectPage(driver);
// enter user manage page
System.out.println("jump to the projectManage page to create project ");
createProjectPage.jumpProjectManagePage();
projectPage.jumpProjectManagePage();
//assert user manage page
System.out.println("start create project");
assert createProjectPage.createProject();
assert projectPage.createProject();
System.out.println("end create project");
System.out.println("===================================");
}
......
......@@ -17,14 +17,14 @@
package org.apache.dolphinscheduler.testcase.testProject;
import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage;
import org.apache.dolphinscheduler.page.project.CreateWorkflowPage;
import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.apache.dolphinscheduler.page.project.WorkflowDefinePage;
import org.apache.dolphinscheduler.page.project.RunWorkflowPage;
import org.testng.annotations.Test;
public class TestRunWorkflow extends BaseTest {
private CreateWorkflowPage createWorkflowPage;
private CreateProjectPage createProjectPage;
private WorkflowDefinePage createWorkflowPage;
private ProjectPage projectPage;
private RunWorkflowPage runWorkflowPage;
......@@ -32,7 +32,7 @@ public class TestRunWorkflow extends BaseTest {
public void testRunWorkflow() throws InterruptedException {
runWorkflowPage = new RunWorkflowPage(driver);
createProjectPage = new CreateProjectPage(driver);
projectPage = new ProjectPage(driver);
System.out.println("start run workflow");
assert runWorkflowPage.runWorkflow();
System.out.println("end run workflow");
......
......@@ -17,32 +17,40 @@
package org.apache.dolphinscheduler.testcase.testProject;
import org.apache.dolphinscheduler.base.BaseTest;
import org.apache.dolphinscheduler.page.project.CreateProjectPage;
import org.apache.dolphinscheduler.page.project.CreateWorkflowPage;
import org.apache.dolphinscheduler.page.project.ProjectPage;
import org.apache.dolphinscheduler.page.project.WorkflowDefinePage;
import org.testng.annotations.Test;
public class TestCreateWorkflow extends BaseTest {
private CreateWorkflowPage createWorkflowPage;
private CreateProjectPage createProjectPage;
public class TestWorkflowDefine extends BaseTest {
private WorkflowDefinePage workflowDefinePage;
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 {
createProjectPage = new CreateProjectPage(driver);
projectPage = new ProjectPage(driver);
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");
createWorkflowPage.jumpWorkflowPage();
workflowDefinePage.jumpWorkflowPage();
System.out.println("start create workflow");
assert createWorkflowPage.createWorkflow();
assert createWorkflowPage.saveWorkflow();
assert workflowDefinePage.createWorkflow();
assert workflowDefinePage.saveWorkflow();
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");
assert createWorkflowPage.onlineWorkflow();
assert workflowDefinePage.onlineWorkflow();
System.out.println("end online workflow");
System.out.println("===================================");
}
......
......@@ -26,6 +26,7 @@
<classes>
<class name="org.apache.dolphinscheduler.testcase.TestLogin"></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.TestQueueManage"></class>
<class name="org.apache.dolphinscheduler.testcase.testSecurity.TestTokenManage"></class>
......@@ -37,8 +38,19 @@
</methods>
</class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestCreateProject"></class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestCreateWorkflow"></class>
<class name="org.apache.dolphinscheduler.testcase.testProject.TestProject">
<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.TestTiming">
......@@ -50,8 +62,19 @@
<include name="testDeleteTiming" />
</methods>
</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.TestDeleteAlert"></class>
<class name="org.apache.dolphinscheduler.testcase.testDeleteData.TestDeleteToken"></class>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册