[Insight-users] Unit Testing
Matt Kelsey
mkelsey at gmail.com
Fri May 18 10:27:17 EDT 2007
Hello again,
I have a couple of additional questions about unit testing in ITK if
you have a moment.
I see from the example that:
ADD_TEST(SimpleTest ${EXECUTABLE_OUTPUT_PATH}/SimpleTest Hello)
SimpleTest is the test name,
${EXECUTABLE_OUTPUT_PATH}/SimpleTest is the test executable,
and Hello is a command line parameter.
I take it from this that the "SimpleTest" executable has to be
generated from some other command within the CMakeLists file. Is the
way to do this simply to add another "ADD_EXECUTABLE" with all of the
necessary files for each test? In this scenario, it seems that each
SimpleTestN.cpp would contain a main() and be used to create a
separate executable.
Am I off base here or is that pretty much how it goes?
Thanks for your insight,
Matt
On 5/16/07, Matt Kelsey <mkelsey at gmail.com> wrote:
> Thanks Luis, I think that will be very helpful.
>
> Matt
>
> On 5/16/07, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> >
> > Hi Matt,
> >
> > You may want to look also at:
> >
> > http://www.cmake.org/Wiki/CMake_Testing_With_CTest
> >
> >
> > Please let us know if you have further questions,
> >
> >
> > Thanks
> >
> >
> >
> > -----------------------
> > Dan Mueller wrote:
> > > Hi Matt,
> > >
> > > I'm not an expert regarding the testing system used by ITK, but
> > > hopefully I can at least help point you in the right direction.
> > >
> > > ITK uses CMake to generate tests covering different aspects of the code,
> > > including: unit tests, blackbox tests, and regression tests. Have a
> > > browse of Testing/Code/BasicFilters/CMakeLists.txt to see examples of
> > > how to use CMake to add unit and regression tests. The CMake
> > > documentation may also be useful:
> > > http://www.cmake.org/HTML/Documentation.html (particularly the ADD_TEST
> > > command). Obviously you can use the CMake ADD_TEST command in your own
> > > projects as well.
> > >
> > > Maybe check out the following pages:
> > > http://www.itk.org/Wiki/Itk_FAQ#Testing
> > > http://www.itk.org/HTML/Testing.htm
> > >
> > > HTH
> > >
> > > Cheers, Dan
> > >
> > > Matt Kelsey wrote:
> > >
> > >> Does anyone know of a document or tutorial that details the ITK
> > >> testing structure. Does it support something in the way of Unit
> > >> Tests? I'd like to have a structured way of testing all of my modules
> > >> and would be happy to use a built in feature if it's there.
> > >>
> > >> Thanks for any thoughts.
> > >>
> > >> Matt
> > >> _______________________________________________
> > >> Insight-users mailing list
> > >> Insight-users at itk.org
> > >> http://www.itk.org/mailman/listinfo/insight-users
> > >
> > >
> > > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Insight-users mailing list
> > > Insight-users at itk.org
> > > http://www.itk.org/mailman/listinfo/insight-users
> >
>
More information about the Insight-users
mailing list