Unit test on Amora Server

0 views
Skip to first unread message

Thiago Marcos P. Santos

unread,
Jan 18, 2008, 7:44:04 PM1/18/08
to amora...@googlegroups.com
Hi guys,

I'm planning to introduce unit tests in Amora Server. This should be
the first step do start the server modularization. Since the beginning
our build system has check (http://check.sourceforge.net/) and lcov
support. Working together, this both tools are very powerful. I'm
happy to know that the current unit test system still working (at
least on debian etch).

The patch attached is just a prof-of-concept to test if the unit test
system is working on your system. You must have the lcov and check
installed at your distro. Apply the patch and then, run the
./configure script with --enable-check and --enable-lcov parameters.
"make check" will run the test and "make lcov" will generate the
coverage report inside ./docs directory. (remember to rerun
autoreconf!)

Again, the unit test in this sample is just a dummy and isn't using
none of the check features/functions.

Best regards,

utest_testing.patch

caval...@gmail.com

unread,
Jan 19, 2008, 12:46:47 AM1/19/08
to Amora Developers
Thiago

The buildsystem seems to work in Ubuntu 7.10 amd64 too (and probably
in 32bits too, I will test and report later).

What kind of utests are you planning? I can say that the following
areas of amora server
are easy to write utests:
- BT SDP: just to test if the 'Amora service' was created and
exported (sdtptool can list the available services);
- socket data transfer: read/write, the utest can start the amorad
server and exchange commands/data (this would be more of 'gray' box
kind of test...);
- protocol processing: parsing and correct function calling (more
subtle to implement);

But this one is more tricky to run automated tests:
- screen capture: how to know if the captured image makes sense? This
can degenerate to a CV (Computer Vision) problem... and even besides I
love this kind of problem, I think is too bloated to introduce in
utests.
- X event sending: this can degenerate to a XTest kind of testing...

But yes, I think that creating utest is a *necessary* requisite to
make the design changes planned for the 'pluggable server', and this
is the way to go.


Best regards


Adenilson

Thiago Marcos P. Santos

unread,
Jan 20, 2008, 10:49:18 PM1/20/08
to amora...@googlegroups.com

Hi all,

As attachment a patch of the new utest infra mockup.

A utest unique entry point, called utest.c that will create a test
suit for each server part: core functions, backend, frontend, etc and
a separated file for each source file/library.

Suggestions, critics and comments are welcome!

BR,

utest_mockup.patch
Reply all
Reply to author
Forward
0 new messages