I should say first, that I’m not very well-versed in testing my code, and I didn’t do it at all until recently.
So I have this rails app. It’s basically an API endpoint. It takes requests and spits JSON. There’s good (I hope) test coverage that should test most of the functionality.
Now we’re deploying a staging env and want to let load testing guys (independent department) to “play” with it. I want to be super sure that we deployed it correctly.
Can I run RSpec’s request specs against this staging deployment? Do people do this kind of testing at all? What are best practices? What should I read?
Yes you can test deployed site using Rspec and Capybara. You need change configuration like this:
Change driver to
:webkit,:seleniumor:poltergeist, because the default driver (:rack_test) does not support running against a remote server.Set app_host.
Turn off local server.
After that you can create test for deployed server using Capybara DSL.