# How to run Unit Test for roofit

**URL:** <https://root-forum.cern.ch/t/how-to-run-unit-test-for-roofit/48969>\
**Category:** Newbie\
**Created:** [February 28, 2022, 3:00am UTC](https://root-forum.cern.ch/t/how-to-run-unit-test-for-roofit/48969 "2022-02-28T03:00:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![subham73](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/subham73/32/28839_2.png) [@subham73](https://root-forum.cern.ch/u/subham73)\
**Post date:** [February 28, 2022, 3:00am UTC](https://root-forum.cern.ch/t/how-to-run-unit-test-for-roofit/48969/1 "2022-02-28T03:00:57Z")

</div>

I have build root from source with the `testing `. Im not able to know how to run unit test for RooFit alone.  
Now i am just using ctest -j4 , which is running all the tests.

* * *

_ROOT Version:_ Not Provided  
_Platform:_ Ubuntu  
_Compiler:_ Not Provided

* * *

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [February 28, 2022, 7:07am UTC](https://root-forum.cern.ch/t/how-to-run-unit-test-for-roofit/48969/2 "2022-02-28T07:07:57Z")

</div>

Try: `ctest -j4 -R "roofit"`

See [Testing With CMake and CTest](https://cmake.org/cmake/help/book/mastering-cmake/chapter/Testing%20With%20CMake%20and%20CTest.html)

> ` -R <regex> Run tests matching regular expression`
