# Run tests for single modules

**URL:** https://discourse.itk.org/t/run-tests-for-single-modules/2636
**Category:** Engineering
**Tags:** module-test
**Created:** [January 18, 2020, 10:36am UTC](https://discourse.itk.org/t/run-tests-for-single-modules/2636 "2020-01-18T10:36:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Gordian](https://discourse.itk.org/user_avatar/discourse.itk.org/gordian/32/335_2.png) [@Gordian](https://discourse.itk.org/u/Gordian)
#### Post date: [January 18, 2020, 10:36am UTC](https://discourse.itk.org/t/run-tests-for-single-modules/2636/1 "2020-01-18T10:36:45Z")

</div>

Hello again,

**is there an option to turn on/off only some module tests?**

Example: I would like to test itkOptimizer and nothing else but the CMake option `BUILD_TESTING` turn on all tests of all modules. Therefore, I have many new projects in the solution which slows the IDE down.

**If the test creation behavior different in remote modules?**

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [January 18, 2020, 9:03pm UTC](https://discourse.itk.org/t/run-tests-for-single-modules/2636/2 "2020-01-18T21:03:47Z")

</div>

Hello @Gordian

To run tests just for the _ITKOptimizer_ module, specify the _ITKOptimizer_ label to ctest:

```auto
ctest -L ITKOptimizer

```

The same can be done for remote modules. Or, a remote module can be built outside the build tree (externally), in which case only its tests will be available.

HTH,  
Matt

---

<div class="post-metadata">

### Author: ![Gordian](https://discourse.itk.org/user_avatar/discourse.itk.org/gordian/32/335_2.png) [@Gordian](https://discourse.itk.org/u/Gordian)
#### Post date: [January 19, 2020, 12:48am UTC](https://discourse.itk.org/t/run-tests-for-single-modules/2636/3 "2020-01-19T00:48:00Z")

</div>

Hello @matt.mccormick,

Thank you for your help.

Considering this and the other question I had about updating remote modules, I decided to make RTK an external module for easier building and testing.

One question remain about the visibility of header in a VS solution (This seems to be the same for ITK and RTK since the later is an remote module of the former). For RTK there is another project called RTK-all that contains the header fiiles. The header files for the ITKCudaCommon project are hidden.

**How do I put the ITKCudaCommon headers in such a project?**

I guess there is a cmake option but I havent figured out which one.

With kind regards,  
Gordian

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [January 20, 2020, 3:01pm UTC](https://discourse.itk.org/t/run-tests-for-single-modules/2636/4 "2020-01-20T15:01:06Z")

</div>

To make a list of headers visible in Visual Studio IDE, the headers need to be added to some target in the same way as sources. I guess that’s not done for `ITKCudaCommon`. To accomplish that, you will need to modify `ITKCudaCommon`'s CMake code.
