← Back to team overview

deja-dup-hackers team mailing list archive

Re: QA

 

On Thu, Feb 5, 2009 at 11:03 PM, Michael Terry <mike@xxxxxxxxxxx> wrote:
> 3) I think we need some automated tests to cover common UI paths and
> make the job of testing the various backends easier.

As promised, 8.0 development has been very slow in terms of features.
I've been doing lots of 'maintainer' stuff to lay the groundwork for
future improvements.  Notably, I've just finished adding a testing
framework.

I'm pretty excited about it.  I ended up using the ldtp python
libraries (they seem to be all the rage, between GNOME and Ubuntu
adopting it).  However, a bug in GtkAssistant accessibility [1]
prevents me from adding tests for most of the Deja Dup UI (as most of
it is assistant-driven).  If anyone knows how to fix that, I'd love to
hear ideas.

But what you can do already is pretty amazing.  First, it creates its
own fake gconf environment, so it doesn't use or pollute your own
settings.  So no more logging in as a different user to play with Deja
Dup safely.

I also added support for testing against any version of duplicity by
just setting an environment variable.  The test will download and
install it into a temporary directory (or just use the
already-downloaded-and-installed version if it's there).  That means
super-trivial testing of old duplicity versions and what happens when
a user upgrades.

A test can even create a loopback mount of particular size and format.
 So it should be very easy to test against vfat filesystems without
actually having a thumbdrive floating around.  And to test running out
of space.

And of course, the tests use the executables you have built in the
source directories, so you don't have to install any bits of Deja Dup
to test.

In addition to the couple trivial automated tests I already wrote (run
'make test' to try them), I added a test called 'interactive' which
basically just sets you up in the test environment and lets you play
with the UI.  So you can easily test a new feature without screwing up
your own gconf settings or against an older duplicity.

See the file 'tests/README' for a small FAQ.  Enjoy!

If anyone has good ideas for tests that don't require backing up or
restoring (as they use the broken GtkAssistant dialogs), please write
them and let me know!  :)

[1] http://bugzilla.gnome.org/show_bug.cgi?id=575319

-mt



References