I'll keep it short, I've got a rails app which communicate with other apps, some using SOAP (non-rails apps of course...) and others with REST. I'm making integration tests to ensure that my endpoint wrapper classes have correct mappings and setup. However, they are executed by default by rake test
which makes it slow and fragile. I wish to run unit tests frequently and integration tests "on-demand" only. How do you do that?
What're your preferences wrt such integration testing?
- How deep do you unit test and/or mock?
- Do you replicate whole SOAP or REST xml responses in stubs?
- Do you create "external endpoint" integration tests at all?
Update Q: How to exclude a test-dir while running rake test
?