Skip to content

miguelmoraperea/guide_setup_cpputest_eclipse_win_7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Guide to setup CppUTest for Eclipse in Windows 7

The purpose of this repository is to help to setup CppUTest using Eclipse in a Windows 7 machine.

Steps

  1. Download the 32-bit version of Cygwin and run the installation package.

  2. Install the Devel category packages:

  3. Add your new Cygwin bin directory to the Path variable:

  4. Download the latest package of CppUTest from CppUTest Github Page using the following command:

    git clone git://github.com/cpputest/cpputest.git.

    If you do not have git installed in your machine, download it from this page Downloading Git and run the installation.

  5. Open Cygwin and go to the folder cpputest/cpputest_build

  6. Enter the following commands:

    cmake ..

  7. A confirmation will show in the Cygwin console:

    -- Configuring done

    -- Generating done

    -- Build files have been written to: /cygdrive/c/users/.../cpputest/cpputest_build

  8. Run the make command in the same folder

    make

  9. A confirmation will show in the Cygwin console:

    [100%] Built target CppUTestExtTests

  10. Run the make install command in the same folder:

make install

  1. After completing the porject installation, a new folder will be created in the location of your Cygwin directory under

cygwin\usr\local\lib

  1. Copy this lib folder and it's contents and paste it on the CppUTest folder.

  2. Add CPPUTEST_HOME to your systems variables using the cpputest folder

  3. Download and Install Java Development Kit

  4. Add the JDK bin folder to the Path variable

  5. Download and install Eclipse IDE. Select Eclipse IDE for C/C++ Developers during installation.

  6. Install the C/C++Unit plugin Open Eclipse. Accept the default workspace for now (you may want to set a more appropriate workspace location later on). Then install the "C/C++ Unit Test" plugin: "Help"->"Install New Software"-> work with "Kepler - http://download.eclipse.org/releases/kepler". You will find the plugin under:

    [ ] Programming Languages

     [x] C/C++ Unit Testing Support.
    

    Also install:

    [ ] Linux Tools

     [x] Gcov Integration
    
  7. Clone the CppUTest Eclipse Test Runner and add it to Eclipse following the instructions below:

    Create directory "<YOUR_PATH_TO_ECLIPSE>/eclipse/dropins/CppUTest".

    In this repository, change into the directory "org.eclipse.cdt.testrunner.cpputest".

    Copy the following artifacts from there to "<YOUR_PATH_TO_ECLIPSE>/eclipse/dropins/CppUTest":

    bin/org/ --> org/
    META-INF/
    plugin.properties
    plugin.xml
    

    You must copy "bin/org/" to "org/" and not to "bin/org/" !

    Close Eclipse. Start Eclipse from a command shell with the following command:

    Eclipse -clean -console -consoleLog

    "CppUTest Tests Runner" should now be selectable as a test runner within Eclipse and successfully run a CppUTest test project.

  8. Clone the sample project from this repository

  9. Add the sample project to Eclipse

  10. Add the path to the CppUTest folder in the settings of the Cywin C Compiler and Cygwin C++ Compiler in Eclipse:

  11. Add the CppUTest library to the Cygwin C++ Linker settings in Eclipse:

  12. Build the project

  13. In Eclipse go to New Launch Configuration and select C/C++ Unit:

  14. Under Test Runner select CppUTest Tests Runner:

  15. Run the project

  16. The tests should run and show passed:

About

Guide to setup CppUTest in Eclipse for Windows 7

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages