https://github.com/cuba-platform/global-events-demo
Global Events add-on demo project
https://github.com/cuba-platform/global-events-demo
Last synced: over 1 year ago
JSON representation
Global Events add-on demo project
- Host: GitHub
- URL: https://github.com/cuba-platform/global-events-demo
- Owner: cuba-platform
- Created: 2018-05-11T08:09:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-11T14:21:30.000Z (over 6 years ago)
- Last Synced: 2025-01-23T08:19:41.142Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 121 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Global Events Demo
This project is designed for testing the CUBA [Global Events add-on](https://github.com/cuba-platform/global-events-addon).
## System Requirements
* 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
## Manual Testing
First, create local PostgreSQL database which will be used by all configurations below:
./gradlew createDb
### Local System
* Start Tomcat with `core`, `web` and `portal` 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. Invoke `sendUiNotificationEvent` 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` and `portal`.
### Cluster
* Start cluster of six Tomcat servers and wait for all servers to load:
./gradlew setupClusterEnv startClusterEnv
In this setup, `web3` and `portal6` are connected to `core1`, `web4` and `web5` are connected to `core2`.
* 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` or `localhost:7772` JMX connections (`core1` and `core2` 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 the `portal` block.
* Stop cluster:
./gradlew stopClusterEnv
## Automatic Tests
* Download [Chrome WebDriver](http://chromedriver.chromium.org/downloads) to a local directory.
* Open terminal in the project root and execute:
./run-system-test.sh /some_path/chromedriver