-
Sep 16th, 2009, 11:55 AM
#1
Testing SkipListeners
Hello,
Can anyone recommend a decent way to test Skip Listeners? I'd like to test my processors and writers and include skip logic as part of my testing.
Thanks,
Alejandro
-
Sep 29th, 2009, 11:53 AM
#2
Bump...
Just bumping this topic... If there is no real way to do this outside of the framework, I guess I could just call onSkipInXXX() inside of a try catch within a junit.
But I'd like to hear if there is a better way.
-
Sep 29th, 2009, 08:03 PM
#3
As a "component test", you should just call onSkipInX() directly within the test method. Then you can verify that the method does what you want.
As a "functional test", to test the interaction between your components, you can set up a sort of dummy job or dummy step and inject the things you want to test. Then you can set up a condition that throws an exception from your processor/writer and check that the skiplistener is called. To get some ideas of ways to do this, you might want to take a look at the junit tests in spring-batch-core.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules