Skip to content

cuba-platform/global-events-demo

Repository files navigation

Global Events Demo

This project is designed for testing the CUBA Global Events add-on.

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 to a local directory.

  • Open terminal in the project root and execute:

      ./run-system-test.sh /some_path/chromedriver
    

About

Global Events add-on demo project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published