← Back to team overview

elementary-dev-community team mailing list archive

Re: Testing Round 2

 

Hey,

I do not really have the time to read the whole conversation, but a few points:

An unfinished article on the subject (lack of time, etc...): http://xapantu.wordpress.com/2013/04/07/writing-tests-using-ldtp-for-elementary/


I have already implented a few tests in the past (unfortunately, due to lack of time there is nearly nothing), for instance for scratch: http://bazaar.launchpad.net/~elementary-apps/scratch/scratch/view/head:/scratchcore/core-tests/main.vala <http://bazaar.launchpad.net/%7Eelementary-apps/scratch/scratch/view/head:/scratchcore/core-tests/main.vala> (and more generally all the scratchcore/ folder) I think there were a few things for marlin/pantheon files too, but I cannot remember wether it has been erased by some crazy merges or not.

You can use accessibility features to do efficient testing, see mago, ldtp, at-spi:
https://live.gnome.org/DesktopTesting
http://ldtp.freedesktop.org/ (it looks like it is down at this moment but this is the most interesting one).

I recommend you to not sart with Noise, it has a complex UI (code side), and it does some weird things when you try to do automation with it (I tested, at-spi was not strong enough to work with Noise if I recall correctly). Marlin/pantheon-files seems a better target for an experiment (the widgets are simplier).

Inline replies below:

On 06/04/2013 19:56, Craig wrote:
Alright guys,

I think it would be a good start to select an application and try to start writing tests with it. It seems like GLib's testing environment should be satisfactory (see this: http://blog.remysaissy.com/2012/11/setting-up-unit-tests-in-vala-project.html); however, Vala's development environment is too complicated for me (a Vala noob) to get a project set up for tests.
See scratch build systems and our custom cmake modules, it should be sufficient to do everything you want, and quite easily I think ;) (for someone who knows CMake reasonably).
If someone would be willing to volunteer to get GLib's testing set up for Noise (or something else if they so desire) including a quick example test (so those of us with testing--but not Vala--experience can have a starting point), I would be willing to start writing tests and working with the project's primary developer(s) to get them started toward Test Driven Development (other developers with TDD experience also expressed interest).
Unfortunately, starting unit testing means a lot of code reorganization, so this is actually the point that someone needs to work on. Writing tests once the API is clear is the easiest part -.-

[...]

My "vision" for this experiment is that someone can set up Noise (or some other project) for testing, and then I (and/or other volunteers) can start writing a few tests for it and sort of coach the developers in TDD for the purpose of getting the developers to a self-sufficient state before potentially moving onto another project and doing the same.

Thoughts?
In my opinion, writing a few blog posts would be also an interesting thing, there are very few good articles about GUI testing for Vala/GTK/CMake.

Lucas


References