Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Tutorial: How to try C/C++ Tests Runner for Eclipse CDT
C/C++ Tests Runner requires Eclipse Platform (3.6 or higher) and CDT (7 or higher) installed and one of the unit testing libraries (Boost.Test, Qt Test or Google Testing Framework). You also need test modules (executable files that were built with one of the testing frameworks). You can also get a few demo test modules for windows or for linux.
- The easies way is to use project demo Eclipse update site. Copy this link to your Eclipse update manager.
- Otherwise you can go to the project page and download zipped update site (or get it directly).
- Run Eclipse and select a workspace or create a new one.
- Create a new C/C++ Project (if there is no in workspace yet).
- Add a new run configuration "Run C/C++ Tests":
- specify project name on the "Main" tab
- specify binary file which is a test module on the "Main" tab;
- choose the tests runner (Boost or Qt) on the "C/C++ Testing" tab;
- you should also configure sources path if necessary (if you use demo test modules mentioned above you should add a directory with test modules to the source lookup paths).
Now you can run created configuration.
Testing results will be shown in the "C++ Test Results" view. You can view tests hierarchy, tests status and testing errors (if any). You can also go to the error location by clicking (or double clicking) on message (if source lookup was configured correctly).
Test results view for Qt test module:
Test results view for Boost test module:
Test results view for Google test module: