3

I'd like to try using WebTest, preferably from Clojure, but I can only find its functionality exposed as Ant tasks. There seems to be some sort of Groovy interface, which implies that it's possible to use from any JVM language outside of Ant, but I can't figure it out.

I'm hoping to use WebTest as a "scriptable browser" to load up someone else's page and see if it does various unpleasant things, rather than test my own page with every build, so Ant doesn't really seem like an appropriate solution if I can avoid it.

amalloy
  • 89,153
  • 8
  • 140
  • 205
  • Have you considered [Selenium](http://seleniumhq.org/)? It looks more flexible than WebTest. – Damien Mar 08 '11 at 22:34
  • Thanks. I did look at Selenium, but at the time it looked like it didn't have the features I wanted. Looking back it seems like it might; I'm not sure what bad-documentation page I stumbled upon at first. – amalloy Mar 26 '11 at 00:06

2 Answers2

2

It is often the case that useful Java functionality is hidden behind Ant tasks. I hit the issue when writing the book (pre-leiningen et al), and wrote lancet to let you call Ant tasks as clojure functions.

Lancet would probably need to be extended to handle arbitrary Ant tasks, but since it is now being maintained (as a dependency of leiningen) you might find other people willing to help out.

Stuart Dabbs Halloway
  • 1,658
  • 12
  • 10
1

I am late into the game.

What about directly using the underlying httpunit java library straight from clojure ?

Nicolas Modrzyk
  • 13,961
  • 2
  • 36
  • 40