The Generic HTTP Stub Server (a.k.a. 'Stubby') is a protocol and server implementation for stubbing HTTP interactions, mainly aimed at automated acceptance testing. There's also some example client code in various languages.
This an implementation of the original Java version in Scala with Unfiltered.
It currently passes the full functional test suite included as part of the original Java implementation.
Some documentation to get started:
- Install SBT
- Start the standalone server:
$ sbt "project standalone" "run 8080"
Initial release.
All tests in original test suite (from the Java version) are now passing.
There seems to be problems with Java 7 and the Rhino JavaScript engine not being found in some circumstances, possibly in combination with a recent change to sbt.
A work-around is adding the following file to your project:
META-INF/services/javax.script.ScriptEngineFactory
with the single line contents:
com.sun.script.javascript.RhinoScriptEngineFactory
Hopefully this will be resolved more elegantly in the future.