Splinter: Python tool for acceptance tests on web applications

Capybara and Webrat are great Ruby tools for acceptance tests. A few months ago, we started a great tool for acceptance testsSplinter on Python web applications, called Splinter. There are many acceptance test tools on Python world: Selenium, Alfajor, Windmill, Mechanize, zope.testbrowser, etc. Splinter was not created to be another acceptance tool, but an abstract layer over other tools, its goal is provide a unique API that make acceptance testing easier and funnier :)

In this post, I will show some basic usage of Splinter for simple web application tests. Splinter is a tool useful on tests of any web application. You can even test a Java web application using Splinter. This post example is a “test” of a Facebook feature, just because I want to focus on how to use Splinter, not on how to write a web application. The feature to be tested is the creation of an event (the Splinter sprint), following all the flow: first the user will login on Facebook, then click on “Events” menu item, then click on “Create an Event button”, enter all event informations and click on “Create event” button. So, let’s do it… 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

High level acceptance testing in your PHP applications using Python, Lettuce and Selenium

Usually, in PHP applications, I don’t run acceptance tests. Lately, I have been thinking about how can I change this. I am a little experienced with others acceptance tests frameworks, for Python (Lettuce) and Ruby (Cucumber), but there is nothing like Lettuce and/or Cucumber in PHP world. So, what can I do? I can just use Lettuce or Cucumber to test any application, including PHP or Java application. In this blog post, I will show how to use behaviour-driven development (BDD) behind Lettuce to write acceptance tests for PHP applications. Continue reading

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.