11

It seems like OpenCV has a test framework based on GTest. They use it for their own unit tests, but I can not find documentation, examples or tutorials on how to use it outside of OpenCV.

It would be a perfect fit for the tests I intend to implement on our OpenCV-based library, but I do not really know where to start, as I am not really an expert in CMake (which builds our library).

I would very much appreciate help on the setup of some kind of "Hello ts World", i.e. how to configure the main CMakeList.txt and the one in the test directory in order to run tests like the ones found in the modules's test subdirectoriess (e.g. core's test folder)

5
  • please approve your answer
    – rafee
    Oct 17, 2013 at 16:15
  • You're aware answers.opencv.org too for OpenCV-related questions aren't you?
    – IsaacS
    May 23, 2014 at 1:23
  • @IsaacS: I wasn't sure what was the best fit between answers.opencv.org and SO, given the CMake part of the question. I guess it wouldn't be good practice to duplicate or move the question there right ?
    – user981733
    May 26, 2014 at 13:26
  • I can only speak from an OpenCV user's point of view; I appreciate more if all OpenCV question are gathered in one place (yours still seems to me very OCV specific).
    – IsaacS
    May 26, 2014 at 14:36
  • 1
    I hadn't realized answers.opencv.org was not (apparently) related to StackExchange. I duplicated the question there: answers.opencv.org/question/34203/… and I'll duplicate the answer when it allows me to.
    – user981733
    May 28, 2014 at 10:11

1 Answer 1

11

After some research and tests, I answered my own question in my blog : Using OpenCV's test framework (with CMake)

Again, I'm no CMake expert, so comments are welcome!

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.