2018-10-31 13:07:43 +02:00
## Black box tests execution
To run the black box tests with using Docker, the local Docker images of Thingsboard's microservices should be built. < br / >
- Build the local Docker images in the directory with the Thingsboard's main [pom.xml ](./../../pom.xml ):
mvn clean install -Ddockerfile.skip=false
- Verify that the new local images were built:
docker image ls
As result, in REPOSITORY column, next images should be present:
thingsboard/tb-coap-transport
2021-04-14 12:40:25 +03:00
thingsboard/tb-lwm2m-transport
2018-10-31 13:07:43 +02:00
thingsboard/tb-http-transport
thingsboard/tb-mqtt-transport
2021-05-28 12:15:55 +03:00
thingsboard/tb-snmp-transport
2018-10-31 13:07:43 +02:00
thingsboard/tb-node
thingsboard/tb-web-ui
thingsboard/tb-js-executor
2023-04-10 12:33:45 +03:00
- Run the black box tests (without ui tests) in the [msa/black-box-tests ](../black-box-tests ) directory with Redis standalone:
2018-10-31 13:07:43 +02:00
2018-11-01 18:02:09 +02:00
mvn clean install -DblackBoxTests.skip=false
2022-06-22 17:40:37 +03:00
- Run the black box tests in the [msa/black-box-tests ](../black-box-tests ) directory with Redis cluster:
mvn clean install -DblackBoxTests.skip=false -DblackBoxTests.redisCluster=true
2022-06-23 18:58:29 +03:00
- Run the black box tests in the [msa/black-box-tests ](../black-box-tests ) directory in Hybrid mode (postgres + cassandra):
mvn clean install -DblackBoxTests.skip=false -DblackBoxTests.hybridMode=true
2022-11-22 18:12:19 +02:00
- To run the black box tests with using local env run tests in the [msa/black-box-tests ](../black-box-tests ) directory with runLocal property:
2022-11-07 17:26:17 +02:00
mvn clean install -DblackBoxTests.skip=false -DrunLocal=true
2023-04-10 12:33:45 +03:00
- To run only ui tests in the [msa/black-box-tests ](../black-box-tests ) directory:
2022-11-22 18:12:19 +02:00
2022-12-07 18:00:38 +01:00
mvn clean install -DblackBoxTests.skip=false -Dsuite=uiTests
2022-12-06 16:33:44 +01:00
2023-04-10 12:33:45 +03:00
- To run only ui smoke rule chains tests in the [msa/black-box-tests ](../black-box-tests ) directory:
mvn clean install -DblackBoxTests.skip=false -Dsuite=smokesRuleChain
- To run only ui smoke customers tests in the [msa/black-box-tests ](../black-box-tests ) directory:
mvn clean install -DblackBoxTests.skip=false -Dsuite=smokesCustomer
- To run only ui smoke profiles tests in the [msa/black-box-tests ](../black-box-tests ) directory:
mvn clean install -DblackBoxTests.skip=false -Dsuite=smokesPrifiles
- To run all tests (black-box and ui) in the [msa/black-box-tests ](../black-box-tests ) directory:
2022-11-29 16:12:12 +02:00
mvn clean install -DblackBoxTests.skip=false -Dsuite=all
2022-11-22 18:12:19 +02:00
2023-01-06 12:02:44 +02:00
### To run a separate test manually on a built UI:
2023-01-11 13:24:30 +02:00
1. Add the black-box-tests module in the [pom.xml ](../pom.xml ) or add as a Maven project as in the picture

2023-01-06 12:02:44 +02:00
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