Black-box testing of Cognos using HtmlUnit

Building a report in Cognos is one thing, testing of both correctness and performance is another.
It is possible to use HtmlUnit to do black-box testing. The process is pretty easy as HtmlUnit is just another HttpClient, like a browser. The annoying thing is JavaScript. Cognos uses JavaScript extensively and HtmlUnit’s support of JavaScript is spotty. I actually disabled JavaScript altogether and build my own custom Java code to emulate JavaScript. The key is to set values for all those elements in the formWarpRequest form correctly. Coupled with Congos tracing and DB tracing(Oracle for me), it’s possible to get a complete picture of a report run.
There are tons of similar packages available like HttpUnit or WebTest. Actually, WebTest looks very flexible and possibly no coding at all.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: