WebSlug - What is it?
Usually slow responding web applications, webservices and non functional performance issues are the nightmare of every solution architect and implementation team. Not for WebSlug's developpers, whose sole purpose was to develop a tool to slow down responses of your application servers.
So... why would you want to use WebSlug?
Sometimes while executing functional testing of applications consuming external network based webservices, you might want to test scenarios where the consumed service responds slowly. Doing so would allow testers to verify correct functionality of error handling code that has been implemented to handle situations where dependant services respond slowly.
To better target the use cases to be tested, it might be desirable to slow down some specific requests only, based on occurrence of specific strings in the request's payload (body).
WebSlug flashes to your help!
That's were WebSlug comes to your assistance. It allows you to:
- configure the "delay" in milliseconds when responding to incoming requests
- optionally apply the response delay only to incoming requests that match a configureable regular expression
Supported and tested platforms
Tomcat 7 (... might work on other versions at well) on JRE 7+
WebSlug is currently delivered as a jar file that you can download here.
- Copy the webslug.jar file to Tomcat's lib folder.
- Edit the "web.xml" file in Tomcat's "conf" folder and add the following lines to it:
<filter> <filter-name>WebSlugFilter</filter-name> <filter-class>com.au.safearea.webslug.tomcat.DelayFilter</filter-class> <init-param> <param-name>delayInMilliSecond</param-name> <param-value>10000</param-value> </init-param> <init-param> <param-name>keywordRegex</param-name> <param-value>test</param-value> </init-param> </filter> <filter-mapping> <filter-name>WebSlugFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
- keywordRegex - If this regex matches the body of an incoming request, the delay will be applied.
- delayInMilliSecond - Represents the delay in milliseconds to apply.
Personal, educational and evaluation usage
You can use the filter for free, no fee applies.
If using for evaluation purposes in a commercial environment you're only allowed to evaluate for a week. Please note that the evaluation period will immediately end if you start using the tool for actual testing.
If WebSlug is used in a commercial environment (... as you'd expect, as I can't see much use or fun from using it for "personal" purposes...), a licensing fee applies. We'll offer an option to purchase a license online in the near future, please contact us for pricing information.
As a guideline, licensing starts at 20 AUD/week for each application server the filter is deployed on. We'll offer discounts for long term usage or if deploying on a large number of servers. If you need a license please contact us via the "Contact Us" tab.