Skip to content

Latest commit

 

History

History
70 lines (54 loc) · 3.83 KB

README.md

File metadata and controls

70 lines (54 loc) · 3.83 KB

CE-Testsuite - Webserver

There are two tomcat (JWS 3.0 and JWS 3.1) versions that will be tested by this testsuite:

  • tomcat 7
  • tomcat 8

This testsuite will test all WebServer S2I application templates which are:

For all tests, on this case we are using:

How the Quickstarts applications works:

  • Todo list:

    • This application only have a home page with a little form with the TODO's summary and description. The tests against this application consists in add a todo list, and, for persistent databases, make sure that added items remains there after restarting/redeploying the pods (Database and Application). Source code
  • Web Socket:

    • This application is a websocket chat application which, every message sent is broadcasted for all connected clients. To test it there is 2 clients, a sender and a recevier, the message sent by sender should be successfully received by the receiver. Source code

How to run the tests

The Ce-Testsuite uses the ce-arq which is a API that allow us to test our application templates in a running OpenshiftV3 instance. To run the tests you need:

  • Maven 3 or higher
  • Java 7 or higher
  • Openshift V3 or higher

The CE-Testsuite is divided by profiles, to enable the WebServer profile all you need to do is to use the following maven parameter:

-Pwebserver
Required parameters
  • -Dkubernetes.master=address of your running OSE instance (master note)
  • -Drouter.hostIP=The Openshift router IP
    • -Drouter.hostIP=192.168.1.254
      • You can change this parameter name in the pom.xml
Optional ce-arq parameters
  • -Dtest=The test class name, if you want to run only one test, otherwise all tests will be executed
    • -Dtest=WebServerTomcat7BasicTest

Running all tests

For this example we'll consider the IP address 192.168.1.254 for required parameters, Example:

$ mvn clean test -pl webserver/jws31 -Dkubernetes.master=https://192.168.1.254:8443 -Drouter.hostIP=192.168.1.254

What this tests cover?

This test covers all basic operations to make sure the docker image generated by the used application templates will work as expected, it will do basic operations against the deployed quickstart application, which is:

  • Todo list (Non persistent)
    • Add items in the todo list then verifies if the added items were successfully added.
  • Todo list (Persistent)
    • Add items in the todo list, restart do pods (scale up and scale down) and then check if the added itens remains there as expected.
  • Websocket chat
    • Just send a message and check if it was received by the client.

All tests above are executed using HTTP, HTTPS, WS and WSS protocols.

Found an issue?

Please, feel free to report the issue that you found here.

For feedback please send us an email (cloud-enablement-feedback@redhat.com) and let us know what you are thinking.