Using Selenium and Rspec to test any web application

Recently I set up selenium and rspec to test a single-page javascript application. While building that test suite and teaching the other developers on my team how to use it, I grew frustrated with the minimal documentation for selenium. So today I put together a simple web application and test suite you can use to learn how selenium works. It is fully functional and should allow you to quickly get up to speed.

I kept the web app and the test suite separate to show that one can use rspec and selenium-webdriver to test any kind of web app. Simply start the web app in one terminal and go run the test suite in another terminal. You can even run the test suite against your production system to make sure there were no problems with your last deploy.

Later I will write up how to use Selenium Grid combined with a VirtualBox VM to run your tests against a browser in a different operating system. [Edit: I have now written the post, here it is.] Let me know what you find confusing about selenium and maybe I’ll blog about the answer! Check out the sample app here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: