| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| README.txt | 2021-09-05 | 2.7 kB | |
| vau-1.1.tar.xz | 2021-08-16 | 13.0 kB | |
| vau-code-1.0.zip | 2021-04-10 | 77.3 kB | |
| Totals: 3 Items | 93.0 kB | 0 |
Vau - Vala Unit Test
Table of Contents
* What is Vau
* Installation
* Downloading
* Building
* Usage
* Add it as dependency
* Test cases
* Reporting
* Future plans
What is Vau
Vau is a Unit test framework for the Vala programming language.
Installation
This project uses make and meson as build tools and Mercurial as version
control. You can do the following steps to make it work:
Downloading
1. From the home page as zip:
https://sourceforge.net/p/vau/code/ci/default/tree/
Here press on the Download snapshot link.
2. By Mercurial:
hg clone http://hg.code.sf.net/p/vau/code vau-code
Building
In the root folder you can easily build the project by:
make clean build compile
If you want to create a package from the program you can install it first
into a directory:
DESTDIR=/your/temporary/path meson install -C build
If you want to try out the unit tests you can build them by make:
Change the is_test flag in the meson_options.txt to true and:
make clean build compile run
Usage
The program contains two main classes. With the Vau you can check create
assertions. With the VauReporter you can create then reports (currently a
colored output to the screen).
Add it as dependency
If you use Meson you can simply add this library as a dependency:
dependency('vau-1.0')
Test cases
Assertion (string)
using Vau;
VauResult test1 = new VauTestCase()
.assert("can do a success test (string)")
.as_string("c")
.is("c")
.test_it();
Assertion (bool)
using Vau;
VauResult test2 = new VauTestCase()
.assert("a bool test")
.is_true(2 > 3)
.test_it();
Reporting
To create reports is also very simple. You can create test suites. However
it’s not mandatory. The default test suite is default.
If you want to organize your test in different test suites you can create
them and add test cases to it:
Test suites and test cases
using Vau;
new VauReporter()
.test_suite("Suite 1")
.test_case(vau_result1)
.test_case(vau_result2)
.test_suite("Suite 2")
.test_case(vau_result3)
.create_report()
.print_colored();
Future plans
1. More test types
Currently boolean and string are supported.
2. Extensions
Especially to be able to create more output formats, such as json or
csv.
Last updated 2021-08-08 03:47:39 UTC