Skip to content
Henning Bredel edited this page Feb 21, 2014 · 17 revisions

Introduction

The IlwisTests module contains all c++ tests for the Ilwis project. The module runs either all test cases availale or some subset of them. Therefore every test case registers itself and declares a parent test suite under which it can be invoked via command line argument.

  • ()[Good Practice]

Project Setup

Once imported into QtCreator you have to add some project settings so that tests can be run:

  • Deploy simple test files
  • Supply which tests to run
  • Where to find bigger test files, i.e. raster images, etc.

Some tests read single files containing some textual data, e.g. service reponse data to avoid establishing remote connection when testing. This ensures that tests can be run also without network connection. To deploy these files a deploy phase has to be configured in the project settings. Add a Make deploy step and add the install argument.

To supply the test application which tests to run and where the test data is stored you have to add the following arguments under the projects Run section:

all D:\data\coding\ilwis\testdata

all will run all tests registered at the test suite and D:\data\coding\ilwis\testdata points to the folder where Ilwis test data is stored.

Introduction TODOs

  • Drop some words about the test data ... where to download it, etc.

Working on Test Cases

Currently all tests are bundled in one module. Therefore each developer has to make sure it stays compilable when working on a different module. So keep in mind to only push changes to the test module when the module you are working on is also in sync with the code others can checkout too!

Clone this wiki locally