This project is designed for testing the CUBA Global Events add-on.
- Linux or macOS
- Locally installed PostgreSQL 9.5+
- 16GB RAM and a modern multi-core CPU
- Free port ranges: 7770..7776, 7801, 7802, 8050..8056, 8080..8086, 8090..8096, 8780..8786
First, create local PostgreSQL database which will be used by all configurations below:
./gradlew createDb
-
Start Tomcat with
core
,web
andportal
blocks:./gradlew setupTomcat deploy start
-
Open
http://localhost:8080/app
in two different browsers. -
Open Application > Screen1 in both browsers. Click Send test event in one browser and see how the number of received events is increased in both.
-
Open
app-core.glevtdemo:type=CoreTester
JMX bean in one browser. InvokesendUiNotificationEvent
operation and see how the number of received events is increased in both browsers. -
Invoke
sendBeanNotificationEvent
operation, then open Entity Inspector for the Event Registration entity and make sure there are three instances with Receiver fields indicating that the event was received by beans of all three blocks:core
,web
andportal
.
-
Start cluster of six Tomcat servers and wait for all servers to load:
./gradlew setupClusterEnv startClusterEnv
In this setup,
web3
andportal6
are connected tocore1
,web4
andweb5
are connected tocore2
. -
Open
http://localhost:8083/app
(web3),http://localhost:8084/app
(web4),http://localhost:8085/app
(web5) in different browsers and send UI events using the screen. -
Open JMX console and select
localhost:7771
orlocalhost:7772
JMX connections (core1
andcore2
respectively). Send UI events and watch the number of received events in all browsers. -
Invoke the
sendBeanNotificationEvent
JMX operation and ensure Event Registration contains a record with the Receiver field showing a bean from theportal
block. -
Stop cluster:
./gradlew stopClusterEnv
-
Download Chrome WebDriver to a local directory.
-
Open terminal in the project root and execute:
./run-system-test.sh /some_path/chromedriver