From 2749c7e5369459c1a410508cc4769db37f4a0043 Mon Sep 17 00:00:00 2001 From: xingchun-chen <55787491+xingchun-chen@users.noreply.github.com> Date: Wed, 10 Jun 2020 10:22:27 +0800 Subject: [PATCH] =?UTF-8?q?add=20alert=20manage=20testCase=20and=20optimiz?= =?UTF-8?q?e=20test=20case=20execution=20order=20=C2=A0=20(#2941)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add LoginTest license * Delete useless packages * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * e2e add project and workflow case * Update worker_group_id to worker_group in init.sql * Update worker_group_id to worker_group in init.sql * Update worker_group_id to worker_group * Increase dataX environment variable, sslTrust default value * modify dataX environment variable * update e2e chrome version * add alert manage testcase and Optimize test case execution order Co-authored-by: chenxingchun <438044805@qq.com> --- .../data/security/AlertManageData.java | 36 +++++++++ .../locator/security/AlertManageLocator.java | 35 +++++++++ .../page/security/AlertManagePage.java | 77 +++++++++++++++++++ .../{LoginTest.java => TestLogin.java} | 4 +- .../testDeleteData/TestDeleteAlert.java | 42 ++++++++++ .../TestDeleteProject.java} | 6 +- .../TestDeleteTenant.java} | 6 +- .../TestDeleteUser.java} | 6 +- .../TestDeleteWorkflow.java} | 6 +- .../TestCreateProject.java} | 6 +- .../TestCreateWorkflow.java} | 6 +- .../testSecurity/TestAlertManage.java | 36 +++++++++ .../TestTenantManage.java} | 6 +- .../TestUserManage.java} | 6 +- e2e/testng.xml | 25 +++--- 15 files changed, 266 insertions(+), 37 deletions(-) create mode 100644 e2e/src/test/java/org/apache/dolphinscheduler/data/security/AlertManageData.java create mode 100644 e2e/src/test/java/org/apache/dolphinscheduler/locator/security/AlertManageLocator.java create mode 100644 e2e/src/test/java/org/apache/dolphinscheduler/page/security/AlertManagePage.java rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{LoginTest.java => TestLogin.java} (95%) create mode 100644 e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteAlert.java rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{deleteData/DeleteProjectTest.java => testDeleteData/TestDeleteProject.java} (90%) rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{deleteData/DeleteTenantTest.java => testDeleteData/TestDeleteTenant.java} (90%) rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{deleteData/DeleteUserTest.java => testDeleteData/TestDeleteUser.java} (91%) rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{deleteData/DeleteWorkflowTest.java => testDeleteData/TestDeleteWorkflow.java} (91%) rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{project/CreateProjectTest.java => testProject/TestCreateProject.java} (90%) rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{project/CreateWorkflowTest.java => testProject/TestCreateWorkflow.java} (92%) create mode 100644 e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestAlertManage.java rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{security/TenantManageTest.java => testSecurity/TestTenantManage.java} (89%) rename e2e/src/test/java/org/apache/dolphinscheduler/testcase/{security/UserManageTest.java => testSecurity/TestUserManage.java} (90%) diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/data/security/AlertManageData.java b/e2e/src/test/java/org/apache/dolphinscheduler/data/security/AlertManageData.java new file mode 100644 index 0000000000..aa470169fc --- /dev/null +++ b/e2e/src/test/java/org/apache/dolphinscheduler/data/security/AlertManageData.java @@ -0,0 +1,36 @@ +/* + * 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.security; + +public class AlertManageData { + /** + * Alert Name + */ + public static final String ALERT_NAME = "selenium_alert_Name"; + /** + * Alert Type + */ + public static final String ALERT_TYPE = "邮件"; + + /** + * Alert Description + */ + public static final String DESCRIPTION = "create alert test"; + + public static final String ALERT_MANAGE = "告警组管理 - DolphinScheduler"; + +} diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/locator/security/AlertManageLocator.java b/e2e/src/test/java/org/apache/dolphinscheduler/locator/security/AlertManageLocator.java new file mode 100644 index 0000000000..e4dbe731df --- /dev/null +++ b/e2e/src/test/java/org/apache/dolphinscheduler/locator/security/AlertManageLocator.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.locator.security; + +import org.openqa.selenium.By; + +public class AlertManageLocator { + //create alert locator + public static final By CLICK_ALERT_MANAGE = By.xpath("//div[4]/div/a/div/a/span"); + public static final By CLICK_CREATE_ALERT = By.xpath("//div[1]/div[2]/div/div[2]/div[2]/div/div[1]/button/span"); + public static final By INPUT_ALERT_NAME = By.xpath("//div[2]/div/div[1]/div[2]/div/input"); + public static final By CLICK_ALERT_TYPE = By.xpath("//div[2]/div/div[2]/div/div[2]/div[2]/div/div[1]/div/input"); + public static final By SELECT_ALERT_EMAIL = By.xpath("//div[2]/div/div[2]/div/div[2]/div[2]/div/div[2]/div/div/div/ul/li[1]/span"); + public static final By INPUT_ALERT_DESCRIPTION = By.xpath("//textarea"); + public static final By SUBMIT_ALERT = By.xpath("//div[3]/button[2]/span"); + + //delete alert locator + public static final By DELETE_ALERT_BUTTON = By.xpath("//span/button"); + public static final By CONFIRM_DELETE_ALERT_BUTTON = By.xpath("//div[2]/div/button[2]/span"); +} + diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/page/security/AlertManagePage.java b/e2e/src/test/java/org/apache/dolphinscheduler/page/security/AlertManagePage.java new file mode 100644 index 0000000000..eb3fa34bb5 --- /dev/null +++ b/e2e/src/test/java/org/apache/dolphinscheduler/page/security/AlertManagePage.java @@ -0,0 +1,77 @@ +/* + * 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.security; + +import org.apache.dolphinscheduler.common.PageCommon; +import org.apache.dolphinscheduler.data.security.AlertManageData; +import org.apache.dolphinscheduler.locator.security.AlertManageLocator; +import org.openqa.selenium.WebDriver; + +public class AlertManagePage extends PageCommon { + /** + * Unique constructor + * @param driver driver + */ + public AlertManagePage(WebDriver driver) { + super(driver); + } + + /** + * createTenant + * + * @return Whether to enter the specified page after create tenant + */ + public boolean createAlert() throws InterruptedException { + // click alert manage + clickElement(AlertManageLocator.CLICK_ALERT_MANAGE); + Thread.sleep(2000); + + // click create alert button + clickElement(AlertManageLocator.CLICK_CREATE_ALERT); + Thread.sleep(2000); + + // input alert data + sendInput(AlertManageLocator.INPUT_ALERT_NAME, AlertManageData.ALERT_NAME); + + clickElement(AlertManageLocator.CLICK_ALERT_TYPE); + + clickElement(AlertManageLocator.SELECT_ALERT_EMAIL); + + sendInput(AlertManageLocator.INPUT_ALERT_DESCRIPTION, AlertManageData.DESCRIPTION); + + // click button + clickButton(AlertManageLocator.SUBMIT_ALERT); + + // Whether to enter the specified page after submit + return ifTitleContains(AlertManageData.ALERT_MANAGE); + } + + public boolean deleteAlert() throws InterruptedException { + + // click user manage + clickElement(AlertManageLocator.CLICK_ALERT_MANAGE); + + // click delete user button + clickButton(AlertManageLocator.DELETE_ALERT_BUTTON); + + // click confirm delete button + clickButton(AlertManageLocator.CONFIRM_DELETE_ALERT_BUTTON); + + // Whether to enter the specified page after submit + return ifTitleContains(AlertManageData.ALERT_MANAGE); + } +} diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/LoginTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/TestLogin.java similarity index 95% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/LoginTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/TestLogin.java index d1af921077..5c491f316e 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/LoginTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/TestLogin.java @@ -22,10 +22,10 @@ import org.testng.annotations.Test; import static org.apache.dolphinscheduler.base.BaseTest.driver; @Test(groups={"functionTests","login"}) -public class LoginTest { +public class TestLogin { private LoginPage loginPage; - @Test(description = "LoginTest", priority = 1) + @Test(description = "TestLogin") public void testLogin() throws InterruptedException { loginPage = new LoginPage(driver); System.out.println("==================================="); diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteAlert.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteAlert.java new file mode 100644 index 0000000000..5db107bb2a --- /dev/null +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteAlert.java @@ -0,0 +1,42 @@ +/* + * 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.testDeleteData; + +import org.apache.dolphinscheduler.base.BaseTest; +import org.apache.dolphinscheduler.page.security.AlertManagePage; +import org.apache.dolphinscheduler.page.security.TenantManagePage; +import org.testng.annotations.Test; + +public class TestDeleteAlert extends BaseTest { + private AlertManagePage alertManagePage; + private TenantManagePage tenantManagePage; + + @Test(groups={"functionTests"},dependsOnGroups = { "login","alert" },description = "TestDeleteAlert",priority=8) + public void testDeleteAlert() throws InterruptedException { + tenantManagePage = new TenantManagePage(driver); + System.out.println("jump to testSecurity to delete alert"); + tenantManagePage.jumpSecurity(); + + alertManagePage = new AlertManagePage(driver); + + //assert alert manage page + System.out.println("start delete alert"); + assert alertManagePage.deleteAlert(); + System.out.println("end delete alert"); + System.out.println("==================================="); + } +} diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteProjectTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteProject.java similarity index 90% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteProjectTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteProject.java index dc45b6e573..bcd4291e0e 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteProjectTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteProject.java @@ -14,16 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.deleteData; +package org.apache.dolphinscheduler.testcase.testDeleteData; import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.page.project.CreateProjectPage; import org.testng.annotations.Test; -public class DeleteProjectTest extends BaseTest { +public class TestDeleteProject extends BaseTest { private CreateProjectPage createProjectPage; - @Test(groups={"functionTests"},dependsOnGroups = { "login","project"},description = "DeleteProjectTest",priority=7) + @Test(groups={"functionTests"},dependsOnGroups = { "login","project"},description = "TestDeleteProject") public void testDeleteProject() throws InterruptedException { createProjectPage = new CreateProjectPage(driver); //jump to project manage page diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteTenantTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteTenant.java similarity index 90% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteTenantTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteTenant.java index 067bc4a973..9b162a4db3 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteTenantTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteTenant.java @@ -14,16 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.deleteData; +package org.apache.dolphinscheduler.testcase.testDeleteData; import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.page.security.TenantManagePage; import org.testng.annotations.Test; -public class DeleteTenantTest extends BaseTest { +public class TestDeleteTenant extends BaseTest { private TenantManagePage tenantManagePage; - @Test(groups={"functionTests"},dependsOnGroups = { "login","createTenant"},description = "DeleteTenantTest",priority=9) + @Test(groups={"functionTests"},dependsOnGroups = { "login","createTenant"},description = "TestDeleteTenant") public void testDeleteTenant() throws InterruptedException { tenantManagePage = new TenantManagePage(driver); //assert tenant manage page diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteUserTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteUser.java similarity index 91% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteUserTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteUser.java index 4507192217..cdd226fa40 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteUserTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteUser.java @@ -14,18 +14,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.deleteData; +package org.apache.dolphinscheduler.testcase.testDeleteData; import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.page.security.TenantManagePage; import org.apache.dolphinscheduler.page.security.UserManagePage; import org.testng.annotations.Test; -public class DeleteUserTest extends BaseTest { +public class TestDeleteUser extends BaseTest { private UserManagePage userManagePage; private TenantManagePage tenantManagePage; - @Test(groups={"functionTests"},dependsOnGroups = { "login","user" },description = "DeleteUserTest",priority=8) + @Test(groups={"functionTests"},dependsOnGroups = { "login","user" },description = "TestDeleteUser") public void testDeleteUser() throws InterruptedException { tenantManagePage = new TenantManagePage(driver); System.out.println("jump to security to delete user"); diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteWorkflowTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteWorkflow.java similarity index 91% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteWorkflowTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteWorkflow.java index 48eb0912fe..d84f34a65d 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/deleteData/DeleteWorkflowTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testDeleteData/TestDeleteWorkflow.java @@ -14,18 +14,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.deleteData; +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.testng.annotations.Test; -public class DeleteWorkflowTest extends BaseTest { +public class TestDeleteWorkflow extends BaseTest { private CreateWorkflowPage createWorkflowPage; private CreateProjectPage createProjectPage; - @Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "DeleteWorkflowTest",priority=6) + @Test(groups={"functionTests"},dependsOnGroups = { "login","workflow"},description = "TestDeleteWorkflow") public void testDeleteWorkflow() throws InterruptedException { createProjectPage = new CreateProjectPage(driver); //jump to project manage page diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/project/CreateProjectTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateProject.java similarity index 90% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/project/CreateProjectTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateProject.java index 8f7594b05c..925cf02a8b 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/project/CreateProjectTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateProject.java @@ -14,16 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.project; +package org.apache.dolphinscheduler.testcase.testProject; import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.page.project.CreateProjectPage; import org.testng.annotations.Test; -public class CreateProjectTest extends BaseTest { +public class TestCreateProject extends BaseTest { private CreateProjectPage createProjectPage; - @Test(groups={"functionTests","project"},dependsOnGroups = { "login" },description = "CreateProjectTest",priority=4) + @Test(groups={"functionTests","project"},dependsOnGroups = { "login" },description = "CreateProjectTest") public void testCreateProject() throws InterruptedException { createProjectPage = new CreateProjectPage(driver); // enter user manage page diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/project/CreateWorkflowTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateWorkflow.java similarity index 92% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/project/CreateWorkflowTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateWorkflow.java index 61aadf7a17..2b7d2b6944 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/project/CreateWorkflowTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testProject/TestCreateWorkflow.java @@ -14,19 +14,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.project; +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.testng.annotations.Test; -public class CreateWorkflowTest extends BaseTest { +public class TestCreateWorkflow extends BaseTest { private CreateWorkflowPage createWorkflowPage; private CreateProjectPage createProjectPage; - @Test(groups={"functionTests","workflow"},dependsOnGroups = { "login" },description = "CreateWorkflowTest",priority=5) + @Test(groups={"functionTests","workflow"},dependsOnGroups = { "login" },description = "TestCreateWorkflow") public void testCreateWorkflow() throws InterruptedException { createProjectPage = new CreateProjectPage(driver); System.out.println("jump to the projectManage page to create workflow"); diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestAlertManage.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestAlertManage.java new file mode 100644 index 0000000000..259faf1b78 --- /dev/null +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestAlertManage.java @@ -0,0 +1,36 @@ +/* + * 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.testSecurity; + +import org.apache.dolphinscheduler.base.BaseTest; +import org.apache.dolphinscheduler.page.security.AlertManagePage; +import org.testng.annotations.Test; + +public class TestAlertManage extends BaseTest { + private AlertManagePage alertManagePage; + + @Test(groups={"functionTests","alert"},dependsOnGroups = { "login" },description = "AlertManagePage") + public void testAlertManage() throws InterruptedException { + alertManagePage = new AlertManagePage(driver); + //assert alert manage page + System.out.println("start create alert"); + assert alertManagePage.createAlert(); + System.out.println("end create alert"); + System.out.println("==================================="); + + } +} diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/security/TenantManageTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestTenantManage.java similarity index 89% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/security/TenantManageTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestTenantManage.java index 721af36d06..109b81766a 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/security/TenantManageTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestTenantManage.java @@ -14,17 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.security; +package org.apache.dolphinscheduler.testcase.testSecurity; import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.page.security.TenantManagePage; import org.testng.annotations.Test; -public class TenantManageTest extends BaseTest { +public class TestTenantManage extends BaseTest { private TenantManagePage tenantManagePage; - @Test(groups={"functionTests","createTenant"},dependsOnGroups = { "login" },description = "TenantManageTest",priority=2) + @Test(groups={"functionTests","createTenant"},dependsOnGroups = { "login" },description = "TestTenantManage") public void testTenantManage() throws InterruptedException { tenantManagePage = new TenantManagePage(driver); //assert tenant manage page diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/security/UserManageTest.java b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestUserManage.java similarity index 90% rename from e2e/src/test/java/org/apache/dolphinscheduler/testcase/security/UserManageTest.java rename to e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestUserManage.java index fdcec1a5c6..20537de7a6 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/testcase/security/UserManageTest.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/testcase/testSecurity/TestUserManage.java @@ -14,16 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dolphinscheduler.testcase.security; +package org.apache.dolphinscheduler.testcase.testSecurity; import org.apache.dolphinscheduler.base.BaseTest; import org.apache.dolphinscheduler.page.security.UserManagePage; import org.testng.annotations.Test; -public class UserManageTest extends BaseTest { +public class TestUserManage extends BaseTest { private UserManagePage userManagePage; - @Test(groups={"functionTests","user"},dependsOnGroups = { "login" },description = "UserManageTest",priority=3) + @Test(groups={"functionTests","user"},dependsOnGroups = { "login" },description = "TestUserManage") public void testUserManage() throws InterruptedException { userManagePage = new UserManagePage(driver); //assert user manage page diff --git a/e2e/testng.xml b/e2e/testng.xml index eb4f21e9d8..5bd35bdc78 100644 --- a/e2e/testng.xml +++ b/e2e/testng.xml @@ -16,24 +16,27 @@ ~ limitations under the License. --> - + - - - - - - - - - - + + + + + + + + + + + + +