José Dapena blog

Just another Igalia Blogs site

Developer! Testing is good for you.

Once Build brigade puts in production the Buildbots for projects, with testing support, we’ll get an automated way to run unit tests of all projects in Gnome umbrella. And you, developer, will love to know when your tests fail to get them fixed asap.

But, to do this, you should implement good tests. How to do these tests? A good unit testing framework is Check.

If you need an example: currently, Iago Toral is developing unit tests for gtk+ with it. You can browse his work or read his post to know about them or ask him at #build-brigade. It’s an interesting work, and accepting and extending these unit tests in mainstream gtk+ would be great for gtk+ quality.

Two main goals in your tests:

Wouldn’t it be great that you know your new features don’t break other code behaviour before committing? Just run make check and you’ll begin to be more confident about that.

Of course, these notes apply directly only to C projects. But  replace Check with your favourite test framework for your language ;).