Testing jQuery plugins with Jasmine

JasmineSince I started working at Globo.com, I developed some jQuery plugins (for internal use) with my team, and we are starting to test these plugins using Jasmine, “a behavior-driven development framework for testing your JavaScript code”. In this post, I’ll show how to develop a very simple jQuery plugin (based on an example that I learned with Ricard D. Worth): zebrafy. This plugin “zebrafies” a table, applying different classes to odd and even lines. Let’s start setting up a Jasmine environment… Continue reading

Using an exclusive Firefox profile for Selenium WebDriver

One of stuffs that I really hate when working with Selenium and Ubuntu is that sometimes Selenium just starts Firefox in offline mode (or something like that). I used to create an exclusive Firefox profile for Selenium when working with Selenium RC, and just started Selenium with the -firefoxProfileTemplate parameter, but now I am almost free of Selenium 1.x, and enjoying Selenium 2 with Firefox WebDriver. The question is: how can I specify the Firefox profile to be used in a WebDriver execution? That is really easy… Continue reading

Seleniumless Django applications: using the test client

Some people waste a lot of time testing Django applications only with Selenium. No, I don’t think that you should not use Selenium to test Django applications, I just wanna show that nobody needs to use Selenium for all webtests in Django.

Selenium drives a browser, so you can have true test results on navigation, but Selenium is not needed to test a page title or a response status code, for example. Selenium tests are powerful, but slow, so you can preserve them to use when you really need, and use more simple and fast tools to more simple and fast tests. Continue reading

Making development with Django more fun with BDD using Freshen

Freshen is an acceptance testing framework for Python, inspired by Cucumber and has the same goal: make BDD fun, but using Python instead of Ruby. Freshen uses the same syntax of Cucumber (Gherkin Syntax) and runs as a plugin of Nose, a powerful Python tool for using daily when you with TDD =) Continue reading

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.