mockrunner

How do I set up a mock queue using mockrunner to test an xml filter?

橙三吉。 提交于 2019-12-23 12:17:24
问题 I'm using the mockrunner package from http://mockrunner.sourceforge.net/ to set up a mock queue for JUnit testing an XML filter which operates like this: sets recognized properties for an ftp server to put and get xml input and a jms queue server that keeps track of jobs. Remotely there waits a server that actually parses the xml once a queue message is received. creates a remote directory using ftp and starts a queue connection using mqconnectionfactory to the given address of the queue

Servlet unit test

青春壹個敷衍的年華 提交于 2019-11-30 05:42:34
问题 Currently I'm using TestNG framework for testing application business logic, i added some Servlet classes recently. How do I unit test these Servlet classes in TestNg framework? 回答1: Follow skaffman's advice if possible. If not, or if you want to test the behaviour of the servlets as front-end controllers, rather than the business logic inside them, you can use: HtmlUnit Selenium Cactus (but I don't know how whether it supports TestNG already) 回答2: One of the easiest ways is ServletTester