Tags

,


What is synthetic transaction? Simply speaking, it is a way to check the availability of an application across network. By definition, a synthetic transaction continues an automated, self-contained set of user operations that can be excuted against a service in the same way of a real cosumer of the service operates an application. For example, synthetic transaction can emulate a user requests the stock quote, or buys a book online.

Nagios can monitor the synthetic transcation against a web site by utilizing the component ‘webinject’. webinject is a free tool for automated testing of web applications and web services.

webinject_arch

As the diagram shows, the  webinject architecture is clear. The two major configuration files are config.xml and testcase.xml. config.xml includes the general configuration information, like the URL of the web application, the proxy server (if applicable) and which test cases. testcase.xml specifies the services that you want to check. It uses http method ‘get’/ ‘post’ to retrieve/ send information from/to the web server, then compare the results to the pre-defined value to determin whether the services are running OK or not.

The syntax is simple, and the manual can be found here. Understanding how the web serivces really work behind is the key to write good test cases.

Advertisements