Tech Tip 3 - Synthetic transactions with Casperjs

Version 3 by Bren Eckles
on Apr 15, 2019 09:56.

compared with
Current by Bren Eckles
on Apr 15, 2019 10:47.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (12)

View Page History
h4. Tech Tip #3 3 (02/2016) --- - Monitoring synthetic transactions with Casperjs in GroundWork

{note}This Tech Tip applies to versions of GroundWork prior to 7.1.1.{note}

While the native Nagios plugins are powerful, they are limited when it comes to testing the end-user experience. There are ways to use open source tools like Selenium to measure and test web site performance, but these can be complex to set up, and may be too powerful for some users needs. There are also commercial solutions which are good, but can get expensive if leveraged in a regular monitoring context. Fortunately, however, advances in "headless" or "phantom" browsers have made it pretty easy to record simple tests in a browser and play them back using plugins that call the headless browsers.
In this tech tip will take a look at using Casperjs and Phantomjs, which can play back actions you record using Resurrectio, a plugin for the Chrome browser.

Requirements:
h5. Requirements:

- Any reasonable Linux system or VM. This would probably work on a Raspberry Pi running Raspbian Linux, with some modifications.
- A Chrome browser (for running Resurrectio and recording the actions to test).

h5. How do you do it?

# Install Phantomjs
# Install Casperjs
{attachments:patterns=service-profile-web_transactions_casperjs.xml}

References:
h5. References

* Resurrectio: [https://chrome.google.com/webstore/detail/resurrectio/kicncbplfjgjlliddogifpohdhkbjogm?hl=en]
* Plugin development and documentation: [https://git.netways.org/plugins/check_casperjs]
* Phantomjs development: [http://phantomjs.org]
* Casperjs development: [http://casperjs.org]