On 10/29/2010 10:38 AM, Stefan Dänzer wrote: > Hi all, > Hi Stefan,
> I'm thinking of writing tests for my mitk Modules and Bundles. I'm > wondering what the correct way of implementing, running and sending the > results to a ctest dashboard might be. There are several questions on my > mind: Good idea to write some tests. > > 1. Where should the Tests of a Bundle/Module be located in the mitk > directory structure? For bundles have a look at http://www.mitk.org/wiki/Tutorial_Writing_Unit_Tests_for_Bundles For modules you should put the tests inside of your module: 1. Create a Testing subdirectory 2. Inside the Testing subdirectory create your tests and two files: CMakeLists.txt: MITK_CREATE_MODULE_TESTS() files.cmake: SET(MODULE_TESTS ClassATest.cpp ClassBTest.cpp ) SET(MODULE_IMAGE_TESTS ClassCTest.cpp ) SET(MODULE_TESTIMAGES TestImage1.png TestImage2.jpg ) In your module directory append ADD_SUBDIRECTORY(Testing) to your CMakeLists.txt If you have tests that need a more complex invocation, e.g. more command line parameters, you can specify them as MODULE_CUSTOM_TESTS and add some custom ADD_TEST commands yourself. > 2. How can one disable testing of the existing mitk tests and enable > only the tests for my Bundle/Module (when executing ctest/make -D > Experimental/Nightly/Continuous)? ctest has the -E and -R options to select the tests. > 3. How can I send my test results to my own ctest dashboard location? The dashboard parameters are configured in mitk/DartConfig.cmake . There is currently no mechanism to change these without modifying this file. But you could consider setting up your own project and including MITK as a package. The bundle generator can be used to generate a setup like that. > 4. Is there a way to run my tests in a special, sequential order? > Basically I would have the output of testX assigned as input of testY. > I think they are executed in-order, but better ask this on the CMake users list. Best, Marco > Thanks for any help on this. > > Stefan > > -- > -- > Stefan Daenzer > Körnerplatz 8 > 04107 Leipzig > > Tel.: +49-157-84993879 > > "Work like you don't need the money, love like you've never been hurt > and dance like no one is watching." - Randall G Leighton -- ---------------------------------------------------------------------- Dipl.-Inform. Med. Marco Nolden Deutsches Krebsforschungszentrum (German Cancer Research Center) Div. Medical & Biological Informatics Tel: (+49) 6221-42 2325 Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345 D-69120 Heidelberg eMail: [email protected] ------------------------------------------------------------------------------ Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
