Anyone using webtest without ant?

2019-07-08 21:41发布

问题:

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.

回答1:

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.



回答2:

I am late into the game.

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