I am working in an Apache sling based environment. Much of my code-base can be unit tested "normally" at compile using Junit tests.
There is a subset of functionality that requires the context of a HTTP request being passed in through the Framework to work properly, and the effort for Mock all the Framework provided objects that i rely on is far too difficult.
My current approach during my test build cycle is: 1) Junit test everything I can using standard JUnit tests 2) Compile and deploy the code to my local instance 3) Make HTTP requests to specific "test" resources on my local instance that run a "test" and return some value 4) Check the return value against the expected value (repeat 3-4)
I am trying to figure out how to most effectively define my tests outside the platform (from where I am issuing the HTTP requests) and execute them from the context of my local instance.
Thoughts on the best way to structure and execute a test suite give these requirements?