Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Arrange >> Act >> Assert with Valadate

For Vala developers who need to test their code, Valadate is a powerful testing framework that provides behavioral, functional and unit testing features to help them write great Open Source software. Unlike other testing frameworks, Valadate is designed especially for Vala while integrating seamlessly into existing toolchains.

Real example


Valadate is undergoing active development, the current stable version is 1.0.0.

Platform Status
Ubuntu 15.04 Build Status
Ubuntu 15.10 Build Status
Fedora 23 Build Status
Mac OS X Build Status

Current Features (Version 1.0)

  • Automatic test discovery like JUnit or .NET testing framework.

  • Utility functions for waiting in a main loop until specified event or timeout occurs.

  • Support for asynchronous tests.

  • Utility functions providing temporary directory to tests.

  • Skipped tests and expected failures.

Planned Features (Version 1.1)

  • Gherkin/Cucumber integration

  • GUI and CLI Test Runner

  • IDE Plugins

  • Events and notifications

  • Project Wizard


From Source

# as root
make install


Add the repository's key

curl | sudo apt-key add -

Add the following repository to your software sources:

deb valadate main

Then you can install with:

apt-get update
apt-get install valadate

Fedora 23

Add the following to /etc/yum.repos.d/valadate.repo


Then run with root privileges:

dnf update
dnf install valadate


Once correctly installed and configured, Valadate makes writing tests as simple as:

public class BookTest : Valadate.Framework.TestCase {

	public void test_construct_book() {
		// Arrange ...
		// Act ...
		// Assert ...

$ valac --library mytest-0 --gir mytest-0.gir --pkg valadate-1.0 -X -pie -X -fPIE mytest-0.vala

$ ./mtest-0

/LibraryBookTest/test_construct_book: OK

To run with TAP output:

$ ./mtest-0 --tap

# random seed: R02Sddf35dad90ff6d1b6603ccb68028a4f0


# Start of LibraryBookTest tests

ok 1 /LibraryBookTest/test_construct_book

# End of LibraryBookTest tests

The [Test] annotation and parameters are also available for giving test classes and methods more readable names and for supporting asynchronous tests.

[Test (name="Annotated TestCase with name")]
public class MyTest : Valadate.Framework.TestCase {

	[Test (name="Annotated Method With Name")]
	public void annotated_test_with_name () {

	[Test (name="Asynchronous Test", timeout=1000)]
	public async void test_async () {

	[Test (skip="yes")]
	public void skip_test () {


# Start of Annotated TestCase with name tests
ok 1 /Annotated TestCase with name/Annotated Method With Name
ok 2 /Annotated TestCase with name/Asynchronous Test
ok 3 /Annotated TestCase with name/skip_test # SKIP Skipping Test skip_test
# End of Annotated TestCase with name tests


See the Wiki for detailed instructions on installing and setting up your toolchain with Valadate.

There are a number of sample projects available here which showcase Valadate's features and how to use it with different toolchains and platforms. More information can be found on the relevant Wiki page.

The Valadoc Reference Manual for the Vala API can be found here.

The Gtk-Doc Reference Manual for the C API can be found here.


  • Blog
  • Waffle backlog - Stories in Ready
  • GitHub Issues - for bug/feature requests
  • IRC - #vala on GIMPnet ( - look for @bizarro

Code of Conduct

This project adheres to the [Open Code of Conduct][code-of-conduct]. By participating, you are expected to honor this code. [code-of-conduct]:


Valadate was originally developed by Jan Hudec with significant contributions from Julien Peeters and Simon Busch and was most recently maintained by the Yorba Foundation.

Special thanks to Al Thomas and Mario Daniel Ruiz Saavedra for feedback and inspiration, the Vala mailing list and IRC channel for help and advice and the Vala developers and maintainers for their fantastic work. Oh and to you, for reading this far and for taking an interest in our little project. I hope you find it useful!

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program in the file COPYING. You should have received a copy of the GNU General Public License refered therein along with this program in the file GPL-3. If not, see <>.