JavaScript testing

This post about JavaScript testing is part of the Setting up a full stack for web testing series. Introduction JavaScript tests are sufficiently special to deserve a post outside of unit and functional testing. You need a special set of tools to write these tests. But then again for JavaScript the usual split between unit and functional tests is still applicable. So what I wrote about those two topics is also relevant here. ...

February 10, 2010 · Patrice Neff

Pot: WSGI

This Python on the Toilet issue is also available as PDF. WSGI is a Python standard for how web servers can interact with web frameworks. It’s one of my favorite standards: it’s simple yet very powerful. To write a WSGI web application you only need to create one function. def my_app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return repr(environ) The function receives a environ argument - a dictionary with all the environment variables. The start_response function can be called with the status line and a list of headers as soon as you’re ready to send output. ...

November 13, 2009 · Patrice Neff

Functional testing

This post about unit testing is part of the Setting up a full stack for web testing series. Introduction In functional testing, also referred to system testing or blackbox testing, you don’t just test the individual units but the whole application. So you’re testing if all of the small units you built and tested actually work together. For functional testing a web site I talk to the application in HTTP. As mentioned already in Unit testing, an example for an address book would be to create an address using the provided web form, then check that the detail page renders and that it shows up in a list or search result. ...

October 30, 2009 · Patrice Neff

Setting up a full stack for web testing

Many developers see the value in getting started with testing their web applications, but don’t know how to actually start using it. I’ll write about a variety of products and processes which cover the whole range of testing web applications. The posts in this series will be published in the coming weeks. You can find a rough table of contents below but the list may get modified or extended. Approach Initially you must spend some thoughts on how you want to approach testing. The main obstacle is that almost always you start with an existing project that already has a big code base. It seems impossible to ever get enough testing in place to be meaningful. But my experience shows that even very little coverage can already improve quality of your system a lot. ...

September 10, 2009 · Patrice Neff

Autofill birthday fields in Safari

The Safari web browser can autofill form fields from your personal address book card. I’ve had very good experiences with this feature. But today I was creeped out a little on my brightkite profile as I saw my birthday even though I had not provided it anywhere. It took me a moment to realize that Safari had autofilled my birthday. So I quickly came up with an evil idea. Would it be possible to abuse that feature to automatically collect birthdays from users on say a signup form? ...

April 9, 2009 · Patrice Neff

Firebug 1.0 Beta

The new version of Firebug is now available. It’s the 1.0 beta release. It contains some great new features and I’d advise you to try it out if you develop web sites. Joe was pondering to make the new version a commercial release. Instead he has now decided to leave it Open Source but asks for donations.

December 4, 2006 · Patrice Neff

HTTP debugging

As a web developer I often have to debug HTTP problems. At local.ch we also do the frontend/backend communication using the HTTP protocol, so sometimes I also have to debug that. So over the whole time I’ve been doing that, some tips have accumulated. LiveHTTPHeaders LiveHTTPHeaders is a Firefox extension that allows to see the headers exchanged between the browser and server. It adds a “Headers” tab in the page information. This window can be accessed with Apple+I on the Mac or Ctrl+I on Linux and Windows. The headers tab shows a list of the headers that Firefox sent to the server and a separate list of the response headers sent by the server. ...

November 20, 2006 · Patrice Neff

Testing with Selenium

I spent Friday and Saturday at the T.Camp of the Swiss Web consultancy namics. That’s a yearly conference for the namics techies. As a member of the namics sister company local.ch I was also allowed to participate. And like every year for the past five years I held a presentation again. This time I talked about testing. Specifically Selenium. It’s much the same as I’ll talk about on September 12 at the Webtuesday event. You can download the presentation. ...

September 2, 2006 · Patrice Neff