Smoke testing openshift with ansible-galaxy

The ansible-galaxy ioggstream.ocp_health role can run a smoke test on openshift in minutes:

– etcd consistency
– rhn subscriptions
– master status
– registry, ipfailover and router instances

NOTE: it’s not a replacement of oadm diagnostics 😉


ansible-galaxy install ioggstream.ocp_health
# eventually tweak parameters
# vi /root/.ansible/roles/ioggstream.ocp_health/tests/ocp_health.yml
ansible-playbook --check /root/.ansible/roles/ioggstream.ocp_health/tests/ocp_health.yml

If you want to create a test project with two apps, one with a PVC and one with an ephemeral, set create_test_project.


ansible-playbook -v -e create_test_project=yes /root/.ansible/roles/ioggstream.ocp_health/tests/ocp_health.yml

Cure insanity with Selenium!

“insanity is to keep repeating the same thing and expecting different results”

This Einstein quote comes to my mind each time I’ve to face functional testing (aka repetitive clicking on each webapp link). SeleniumHQ is a framework that automatize this job. It’s based on 2 components:

  1. Selenium IDE: a firefox plugin that “record” the test to be done, and save it as a java/python/perl program;
  2. Selenium RC: a java (no tomcat) server which helps to execute the script.

Example: let’s create a test to verify our login application

  1. download/unzip the framework in you PC and run the server
  2. run firefox selenium plugin
  3. click on the “record” red button (similar to the MSOffice one for recording macros)
  4. go to our webapp url, and submit login form, then click on “check mail”
  5. click on “save” button, choosing your file format (eg. python)
  6. save the file in the server folder as testWebmailLogin.py
  7. edit testWebmailLogin.py and change the basic url (eg. webmail.example.com)
  8. run testWebmailLogin.py
  9. check output

Selenium will run a firefox instance for you, and you’ll see the browser repeating the action you recorded!

Obviously you can use selenium to stress your webapp too!!! A quickstart is here..