Hi Félix,
right now I’m not sure how external users are supposed to add test data in
their own application. I think the “Data” directory in the “Testing” folder
including mitkStandardFileLocations is rather deprecated. I can just tell you
how we currently add test data to MITK, but I think this should also do the job
for you (at least on your local build). I guess you want to run a dartclient
which runs your test every night?
This is how we add test data:
- We have an extra git repository for data. It is located in:
“PathToYourBinary/CMakeExternals/Source/MITK-Data/”
- Example tests which make use of this data can be found in:
Source/Core/Code/Testing/
- You have to add custom tests to cmake in the CMakeLists.txt via
“mitkAddCustomModuleTest” (e.g. Source/Core/Code/Testing/CMakeLists.txt) and
pass the path to the data via the command line argument.
- There we use the ${MITK_DATA_DIR} variable to specify the path to
the data. I know that there also other variables which point to other
directories (e.g. your module or the binary directory).
- We have a new helper class mitkIOUtil which allows you to load your
data with just one line of code.
If it is not an option for you to add local data to the ${MITK_DATA_DIR}, let
us know. I’m sure there is another solution for external data.
Regards
Thomas
From: Félix C. Morency [mailto:[email protected]]
Sent: Donnerstag, 15. November 2012 17:37
To: [email protected]
Subject: [mitk-users] Add files to tests in custom application
Hi list,
I wrote a custom module that I placed in the Modules directory of my custom
application. I wrote a test for my module that I placed in
MyApp/Modules/MyModule/Testing. I added some custom data (xml file) in the
MyApp/Modules/MyModule/Testing/Data directory for the test to read. I tried to
use mitkStandardFileLocations to get the path to my data from my test but it
doesn't work. None of the path added to the search list is relative to my
project root directory. Is there a mechanism already built-in to add custom
data to tests that are located in a custom MITK-based application?
Regards,
--
Félix C. Morency, M.Sc.
Plateforme d’analyse et de visualisation d’images
Centre Hospitalier Universitaire de Sherbrooke
Centre de recherche clinique Étienne-Le Bel
Local Z5-3031 | 819.346.1110 ext 16634
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users