add suite for all tests
This commit is contained in:
parent
b02f6bc9b3
commit
de4cc224a6
@ -34,9 +34,13 @@ As result, in REPOSITORY column, next images should be present:
|
|||||||
|
|
||||||
mvn clean install -DblackBoxTests.skip=false -DrunLocal=true
|
mvn clean install -DblackBoxTests.skip=false -DrunLocal=true
|
||||||
|
|
||||||
- To run ui smoke tests in the [msa/black-box-tests](../black-box-tests) directory specifying suiteFile property:
|
- To run ui smoke tests in the [msa/black-box-tests](../black-box-tests) directory specifying suite name:
|
||||||
|
|
||||||
mvn clean install -DblackBoxTests.skip=false -DsuiteFile=src/test/resources/smokeTests.xml
|
mvn clean install -DblackBoxTests.skip=false -Dsuite=uiTests
|
||||||
|
|
||||||
|
- To run all tests in the [msa/black-box-tests](../black-box-tests) directory specifying suite name:
|
||||||
|
|
||||||
|
mvn clean install -DblackBoxTests.skip=false -Dsuite=all
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<main.dir>${basedir}/../..</main.dir>
|
<main.dir>${basedir}/../..</main.dir>
|
||||||
<suiteFile>src/test/resources/testNG.xml</suiteFile>
|
<suite>blackBox</suite>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -184,7 +184,7 @@
|
|||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<suiteXmlFiles>
|
<suiteXmlFiles>
|
||||||
<suiteXmlFile>${suiteFile}</suiteXmlFile>
|
<suiteXmlFile>src/test/resources/${suite}.xml</suiteXmlFile>
|
||||||
</suiteXmlFiles>
|
</suiteXmlFiles>
|
||||||
<skipTests>${blackBoxTests.skip}</skipTests>
|
<skipTests>${blackBoxTests.skip}</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@ -70,6 +70,7 @@ public class CustomerPageElements extends OtherPageElementsHelper {
|
|||||||
private static final String MANAGE_CUSTOMERS_DEVICE_BTN_VIEW = "Manage devices";
|
private static final String MANAGE_CUSTOMERS_DEVICE_BTN_VIEW = "Manage devices";
|
||||||
private static final String MANAGE_CUSTOMERS_DASHBOARD_BTN_VIEW = "Manage dashboards";
|
private static final String MANAGE_CUSTOMERS_DASHBOARD_BTN_VIEW = "Manage dashboards";
|
||||||
private static final String MANAGE_CUSTOMERS_EDGE_BTN_VIEW = "Manage edges ";
|
private static final String MANAGE_CUSTOMERS_EDGE_BTN_VIEW = "Manage edges ";
|
||||||
|
private static final String DELETE_FROM_VIEW_BTN = "//tb-customer//span[contains(text(),' Delete')]";
|
||||||
|
|
||||||
public WebElement titleFieldAddEntityView() {
|
public WebElement titleFieldAddEntityView() {
|
||||||
return waitUntilElementToBeClickable(ADD_ENTITY_VIEW + String.format(INPUT_FIELD, INPUT_FIELD_NAME_TITLE));
|
return waitUntilElementToBeClickable(ADD_ENTITY_VIEW + String.format(INPUT_FIELD, INPUT_FIELD_NAME_TITLE));
|
||||||
@ -274,4 +275,8 @@ public class CustomerPageElements extends OtherPageElementsHelper {
|
|||||||
public WebElement manageCustomersEdgeBtnView() {
|
public WebElement manageCustomersEdgeBtnView() {
|
||||||
return waitUntilElementToBeClickable(String.format(MANAGE_BTN_VIEW, MANAGE_CUSTOMERS_EDGE_BTN_VIEW));
|
return waitUntilElementToBeClickable(String.format(MANAGE_BTN_VIEW, MANAGE_CUSTOMERS_EDGE_BTN_VIEW));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WebElement customerViewDeleteBtn() {
|
||||||
|
return waitUntilElementToBeClickable(DELETE_FROM_VIEW_BTN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -256,7 +256,6 @@ public class CustomerEditMenuTest extends AbstractDiverBaseTest {
|
|||||||
public void addAllInformation() {
|
public void addAllInformation() {
|
||||||
customerName = ENTITY_NAME;
|
customerName = ENTITY_NAME;
|
||||||
testRestClient.postCustomer(defaultCustomerPrototype(customerName));
|
testRestClient.postCustomer(defaultCustomerPrototype(customerName));
|
||||||
;
|
|
||||||
String text = "Text";
|
String text = "Text";
|
||||||
String email = "email@mail.com";
|
String email = "email@mail.com";
|
||||||
String number = "2015550123";
|
String number = "2015550123";
|
||||||
|
|||||||
@ -81,10 +81,11 @@ public class DeleteCustomerTest extends AbstractDiverBaseTest {
|
|||||||
|
|
||||||
sideBarMenuView.customerBtn().click();
|
sideBarMenuView.customerBtn().click();
|
||||||
customerPage.entity(customerName).click();
|
customerPage.entity(customerName).click();
|
||||||
String deletedCustomer = ruleChainsPage.deleteRuleChainFromView(customerName);
|
customerPage.customerViewDeleteBtn().click();
|
||||||
ruleChainsPage.refreshBtn().click();
|
customerPage.warningPopUpYesBtn().click();
|
||||||
|
customerPage.refreshBtn().click();
|
||||||
|
|
||||||
Assert.assertTrue(ruleChainsPage.entityIsNotPresent(deletedCustomer));
|
Assert.assertTrue(customerPage.entityIsNotPresent(customerName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(priority = 20, groups = "smoke")
|
@Test(priority = 20, groups = "smoke")
|
||||||
|
|||||||
@ -101,6 +101,7 @@ public class CreateRuleChainImportTest extends AbstractDiverBaseTest {
|
|||||||
@Test(priority = 30, groups = "smoke")
|
@Test(priority = 30, groups = "smoke")
|
||||||
@Description
|
@Description
|
||||||
public void importRuleChainAndSave() {
|
public void importRuleChainAndSave() {
|
||||||
|
ruleChainName = IMPORT_RULE_CHAIN_NAME;
|
||||||
sideBarMenuView.ruleChainsBtn().click();
|
sideBarMenuView.ruleChainsBtn().click();
|
||||||
ruleChainsPage.openImportRuleChainView();
|
ruleChainsPage.openImportRuleChainView();
|
||||||
ruleChainsPage.browseFile().sendKeys(absolutePathToFileImportRuleChain);
|
ruleChainsPage.browseFile().sendKeys(absolutePathToFileImportRuleChain);
|
||||||
@ -108,7 +109,6 @@ public class CreateRuleChainImportTest extends AbstractDiverBaseTest {
|
|||||||
openRuleChainPage.doneBtn().click();
|
openRuleChainPage.doneBtn().click();
|
||||||
openRuleChainPage.waitUntilDoneBtnDisable();
|
openRuleChainPage.waitUntilDoneBtnDisable();
|
||||||
sideBarMenuView.ruleChainsBtn().click();
|
sideBarMenuView.ruleChainsBtn().click();
|
||||||
ruleChainName = IMPORT_RULE_CHAIN_NAME;
|
|
||||||
|
|
||||||
Assert.assertNotNull(ruleChainsPage.entity(IMPORT_RULE_CHAIN_NAME));
|
Assert.assertNotNull(ruleChainsPage.entity(IMPORT_RULE_CHAIN_NAME));
|
||||||
Assert.assertTrue(ruleChainsPage.entity(IMPORT_RULE_CHAIN_NAME).isDisplayed());
|
Assert.assertTrue(ruleChainsPage.entity(IMPORT_RULE_CHAIN_NAME).isDisplayed());
|
||||||
@ -119,7 +119,6 @@ public class CreateRuleChainImportTest extends AbstractDiverBaseTest {
|
|||||||
public void importRuleChainAndSaveWithSameName() {
|
public void importRuleChainAndSaveWithSameName() {
|
||||||
ruleChainName = IMPORT_RULE_CHAIN_NAME;
|
ruleChainName = IMPORT_RULE_CHAIN_NAME;
|
||||||
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
|
testRestClient.postRuleChain(defaultRuleChainPrototype(ruleChainName));
|
||||||
;
|
|
||||||
|
|
||||||
sideBarMenuView.ruleChainsBtn().click();
|
sideBarMenuView.ruleChainsBtn().click();
|
||||||
ruleChainsPage.openImportRuleChainView();
|
ruleChainsPage.openImportRuleChainView();
|
||||||
|
|||||||
26
msa/black-box-tests/src/test/resources/all.xml
Normal file
26
msa/black-box-tests/src/test/resources/all.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
Copyright © 2016-2022 The Thingsboard Authors
|
||||||
|
|
||||||
|
Licensed 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.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
||||||
|
|
||||||
|
<suite name="All tests">
|
||||||
|
<suite-files>
|
||||||
|
<suite-file path="blackBox.xml"/>
|
||||||
|
<suite-file path="uiTests.xml"/>
|
||||||
|
</suite-files>
|
||||||
|
</suite>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
-->
|
-->
|
||||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
||||||
|
|
||||||
<suite name="Smoke tests">
|
<suite name="UI smoke tests">
|
||||||
<suite-files>
|
<suite-files>
|
||||||
<suite-file path="smokesRuleChain.xml"/>
|
<suite-file path="smokesRuleChain.xml"/>
|
||||||
<suite-file path="smokesCustomer.xml"/>
|
<suite-file path="smokesCustomer.xml"/>
|
||||||
Loading…
x
Reference in New Issue
Block a user