3 ms·
How do you test something which requires browser interaction like oauth authentication? Edit: I know this may not be applicable in transloadit's case. I'm aski
by boundlessdreamz 16y ago
How do you test something which requires browser interaction like oauth authentication?
Edit: I know this may not be applicable in transloadit's case. I'm asking for a general strategy
- felixge 16y agoThe core of our service is a REST API, so we don't have to deal with that much. For browser interaction we would probably use a combination of Selenium (for system tests), and maybe qunit for the frontend testing. But anyway, I am no expert on this so I can't give you solid advice.
- johnwatson11218 16y agoI have used canoo webtest to test browser interaction that involved a log in to a deployed server.
- knuckle_cake 16y agoOne method I've used (with Ruby) is use of FakeWeb, and collecting the various responses from oauth providers to test against. It's the closest I've seen to hitting the real services. If you're testing javascript, you'll need to use Selenium or something similar.
- ollysb 16y agoWebmock is an excellent ruby framework for solving this problem. My current app intereracts with both github and heroku and it's come in very handing for filling in what would otherwise be gaps. It's newer than fakeweb and is much better at letting you specify interactions on a per test basis rather than the entire suite.