add guide for run tests on built UI
This commit is contained in:
parent
88fcd9b63a
commit
5eebe2e6ff
@ -42,6 +42,8 @@ As result, in REPOSITORY column, next images should be present:
|
|||||||
|
|
||||||
mvn clean install -DblackBoxTests.skip=false -Dsuite=all
|
mvn clean install -DblackBoxTests.skip=false -Dsuite=all
|
||||||
|
|
||||||
|
### To run a separate test manually on a built UI:
|
||||||
|
1. Add the black-box-tests module in the [pom.xml](../pom.xml)
|
||||||
|
2. Add Vm Option "-DrunLocal=true -Dtb.baseUiUrl=http://localhost:4200/" in Run -> Edit Configuration -> Edit Configuration Templates -> TestNG
|
||||||
|
3. Go to the test class you need in the [UI tests directory](../black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests) and run the test in it
|
||||||
|
or go to the [resources](../black-box-tests/src/test/resources) and run test suite you need
|
||||||
@ -36,33 +36,20 @@ public class TestProperties {
|
|||||||
if (instance.isActive()) {
|
if (instance.isActive()) {
|
||||||
return HTTPS_URL;
|
return HTTPS_URL;
|
||||||
}
|
}
|
||||||
return getProperties().getProperty("tb.baseUrl");
|
return System.getProperty("tb.baseUrl", "http://localhost:8080");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getBaseUiUrl() {
|
public static String getBaseUiUrl() {
|
||||||
if (instance.isActive()) {
|
if (instance.isActive()) {
|
||||||
return "https://host.docker.internal";
|
return "https://host.docker.internal";
|
||||||
}
|
}
|
||||||
return getProperties().getProperty("tb.baseUrl");
|
return System.getProperty("tb.baseUiUrl", "http://localhost:8080");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getWebSocketUrl() {
|
public static String getWebSocketUrl() {
|
||||||
if (instance.isActive()) {
|
if (instance.isActive()) {
|
||||||
return WSS_URL;
|
return WSS_URL;
|
||||||
}
|
}
|
||||||
return getProperties().getProperty("tb.wsUrl");
|
return System.getProperty("tb.wsUrl", "ws://localhost:8080");
|
||||||
}
|
|
||||||
|
|
||||||
private static Properties getProperties() {
|
|
||||||
if (properties == null) {
|
|
||||||
try (InputStream input = TestProperties.class.getClassLoader().getResourceAsStream("config.properties")) {
|
|
||||||
properties = new Properties();
|
|
||||||
properties.load(input);
|
|
||||||
} catch (IOException ex) {
|
|
||||||
log.error("Exception while reading test properties " + ex.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
tb.baseUrl=http://localhost:8080
|
|
||||||
tb.wsUrl=ws://localhost:8080
|
|
||||||
Loading…
x
Reference in New Issue
Block a user