MaxQ: HttpUnit Testing made mindnumbingly easy

In the spirit of Atrox's EMMA post, I wanted to point out one of my new favorite tools: MaxQ. This is, really, a "generator" for HttpUnit (and therefore JUnit) tests for web applications, but it functions like WAST and other tools.

Basically, you run it as a proxy server, and it will create an HttpUnit test case that invokes down into Jython (Python interpreter for Java), and records actions from your browser as a Python test script. You can then integrate it into your standard test script.

I am not a big fan of Python at all, really, but this is EXACTLY the kind of functionality I always wished HttpUnit had built it. It gives you WAST-easy testing, but will integrate nicely into the rest of your build system. You gotta learn a little bit of Python if you want to do dynamic data validation. It also includes a simple JDBC utility that you can use to make sure that data moves from your web actions into your database properly too.

Comments

RE: MaxQ: HttpUnit Testing made mindnumbingly easy

One of my co-workers had this to say when I mentioned MaxQ (thought it was apt and very insightful):


I did play some with maxq, and found it inferior to TestMaker http://www.pushtotest.com/ , which does basically the same thing.

Script recorders have their place, but in general they are stupid/brute-force about how they record. What you end up doing (should end up doing, at least), is
manually refactoring all the scripts they generate. Otherwise you end up with a bunch of very fragile scripts with minimal reuse. JMeter suffers from the same flaw.
The reliance on recorded test scripts is one of my main peaves with our current QA setup.

I do very much like the fact that maxq generates jython. Jython if extremely useful for scripting in a java environment - any self-respecting java
developer will have some JVM scripting language in their toolbox. The Grinder is another similar testing tool that generates jython. You can't throw a
cat through a java user group meeting without hitting a jython enthusiast.

If you want to play with such a tool, first look into TestMaker fully.
TestMaker has a good load testing capability, but weaker support for regression testing. I have found that once you get the hang of using such
a tool, you rarely need to record unless you are trying to reverse engineer the site a bit. Instead, I end up writing the full scripts directly,
in jython, using either the TestMaker libraries or jwebunit directly. I really think jython+jwebunit is the sweet spot, with the TestMaker framework
thrown in when you need it, such as for load testing. A programmer working on a small number of sites/applications will quickly get beyond the advantages
that the recorder provides for their apps.

Oh, and did I mention that jython by itself, distinct from the issue of testing, is just dynamite? I should.

RE: MaxQ: HttpUnit Testing made mindnumbingly easy

As someone who has just used HttpUnit in the past, and who really doesn't care for Python in any of it's forms, I really would have preferred if MaxQ had just generated Java classes, rather than "HttpUnitish python" scripts.

Frankly I *like* the recorder because it really does save you having to monkey with a whole lot of stuff to get task-oriented tests done. You can have a "log in and do this" test, "a log in and do that" test, and so forth. If you are every so slightly clever, and wrap all your data outputs in class'ed or id'ed HTML tags, it is really easy to go back and hack in the output validation into your tests without caring about LAF issues.

I will check out TestMaker though.

RE: MaxQ: HttpUnit Testing made mindnumbingly easy

Yeah, that seems pretty nice. I guess I am not really a fan of the "Run your JUnit Tests inside our tool" rather than the "Our Tool Generates JUnit tests" model, either. I have really gotten used to setting up "ant test" and that is really easy to put on a "svn update . ; ant test" chron job.

RE: MaxQ: HttpUnit Testing made mindnumbingly easy

And I still hate python.

Why Jython is popular and Rhino isn't is beyond me.

RE: MaxQ: HttpUnit Testing made mindnumbingly easy

TestMaker is very cool, and the new version supports JUnit scripts. If you have problems with 4.3 try version 4.1. It works better for me. BTW, jython makes java fun. And python developers are generally superior to java developers. I always look for python skills on a resume. Its a good sign.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.