Then, you check out the source code from Subversion:
$ svn checkout https://ng.gnunet.org/svn/gnunet/

Following, install all the dependencies which should be installed before the installation of GNUnet. Now install GNU libextractor 0.6.x. If your distribution includes an recent version of GNU libextractor, you can use the version from your distribution.

The first command installs the required compiler tools. The second one the various dependencies and finally the last line adds (optional) database libraries. For testing, you will additionally need to install and configure the respective database servers (except for sqLite, which does not need one). Once all the dependencies needed are installed, you can just run the bootstrap file:
$ ./bootstrap

After it you can run the coverage.sh shell script from the contrib/ directory to compute information about test coverage:
$ contrib/coverage.sh

At last you can open the HTML file index.html that was created under the doc/coverage/ directory to check the current test coverage for all tested files. For example, using firefox as the browser:
$ firefox doc/coverage/index.html &

Note that, before next time you run the coverage.sh, you should delete all the .gcda files under the directory ../../src/util, simply by
$ rm -f `find -name "*.gcda"`

afterwards, be sure all the old compiled files under ../../gnunet should also be cleaned,
$ make clean