16

Google's answers (hear! hear!) and Eclipse Market Place search results on this topic simply drive me crazy! And apparently the proposed SO answers aren't really helpful either.

I'm looking for an Eclipse plugin, that allows me to browse a JUnit report XML compliant unit test report produced from a google test runner.

Nice to have features:

  • jump to the source from failure reports
  • run the tests automatically after building.

I'm pretty sure a (free) plugin suitable for Eclipse CDT exists, that realizes these requirements, I'm just too stupid to find it :-). May be any smarter guy/gal here?

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
  • Since JUNO there is a C++ Unit testing support package. It is package of the CDT. I only used it with boost test, but AFAIK it also supports googletest. – mkaes May 24 '13 at 19:23
  • @mkaes I'm using Juno actually, can you give me some pointers for installation/activation, or how to make use of it? – πάντα ῥεῖ May 24 '13 at 19:34
  • Just go to Help->Install Software->CDT->Optional Featues. There should be the feature C++ Unit testing support. At least in my version it is there. – mkaes May 24 '13 at 19:40
  • @mkaes THX a lot! Finding another [resource](http://feelings-erased.blogspot.de/2012/07/eclipse-juno-has-landed-with-unit.html) I've got it set up for my test project within 5 minutes and it works like a charm. – πάντα ῥεῖ May 25 '13 at 10:56

1 Answers1

30

Since JUNO there is a C++ Unit testing support package. It is package of the CDT. I only used it with boost test, but AFAIK it also supports googletest.

@mkaes comment pushed me to it!

  1. Install the CDT (Help->Install Software->CDT) optional C/C++ Unit Test support
  2. Create a new Runner using 'Run As -> Run Configurations -> C/C++ Unit Test
  3. Choose 'Google Tests Runner' for 'Tests Runner' in the 'C/C++ Testing' tab
  4. Choose your testing project executable in the 'Main' tab
  5. Run it, and the 'C/C++ Unit' view shows up after (rebuild and) execution

Look here for more illustrated and detailed instructions: Eclipse Juno has landed with unit testing support for C++

user2040502
  • 68
  • 1
  • 4
πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190