According to http://jersey.java.net/nonav/apidocs/latest/jersey/jersey-test-framework/jersey-test-framework-core/com/sun/jersey/test/framework/JerseyTest.html users may choose between two kinds of test containers:
I have the following questions:
UPDATE :
Upon further research I discovered that low-level containers are faster but they really run without servlets. When clients make requests,a the appropriate Resources are constructed and the response is passed back to the client, all in-memory. This is similar to running an embedded database versus a conventional network-based JDBC connection.
There is no mechanism to supply a ServletContextListener, register servlets or filters. I'm guessing the request scope isn't supported either.
My question is, can you really test anything meaningful under these restrictions?
"... can you really test anything meaningful under these restrictions..."
You can test your business logic, and do it quicker.
(Would like to see this fixed though: JERSEY-622 . The in-memory test container doesn't support Jackson, ie the POJO-mapping feature of Jersey.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.