Boost Unit Test Adapter


The Boost Unit Test Adapter extension has been developed for the Visual Studio 2012, Visual Studio 2013 and Visual Studio 2015 Test Explorer window to allow integrated test execution of C++ projects utilizing the Boost Unit Test Framework. In case of any issues please file an...

(14) Review
Visual Studio
2015, 2013, 2012
Download (8,061)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (14)
Q and A (38)
Sign in to write a review
Sort by:

by martin_s42 | September 02 2016

Nice tool, has proven very helpful when categorizing and managing larger Test Suites (C# via NUnit and C++ via this Tool) in the VS 2015 TestExplorer.

by Megaposer | September 08 2015

Very nice, installed without a breeze on VS 2013. Documentation on GitHub a big plus!

by sl42 | September 04 2015

Great extension to run your Boost Tests from within Visual Studio.
We use the Boost Test Library Unit Test Framework for our C++ development and the Boost Unit Test Adapter is really the best available Visual Studio extension to run those tests without the need to leave Visual Studio.
Thanks :-)

by stimme81 | September 03 2015

Great extension for Visual Studio :-)

by Perez Alvaro | August 26 2015

Great integration with VS.

by lord_hamilton | May 12 2015

thank you

2015 pls

by omgallnamesarealreadytaken | January 27 2015

Can run but not debug.
On VS2013, getting - An exception occurred while invoking executor 'executor://boosttestexecutor/v1': Object reference not set to an instance of an object.

Tried to install from file and from the update menu. Doesn't seems to help

ETAS GmbH September 12 2015
| Edit |

Please try again with latest version V1.0.4.

by gelo_mc | January 18 2015

Test discovery and execution no longer working after update to Beta 4. I'm using VS2012

ETAS GmbH February 12 2015
| Edit |

working again with V0.9.4

by OT Chen | March 20 2014

Great Adapter

by Duxiez | December 09 2013

Theres a bug when the '&' sign is used in a literally

Try to use this in a test:
std::cout << "we are having some & issues " <<std::endl;

it won't work. This does work:
std::cout << "we are having some amp issues " <<std::endl;

Please fix this bug. Otherwise, nice software

ETAS GmbH February 04 2014
| Edit |

Fixed in V0.6.2

by Hrayr Babajanyan | September 10 2013

I tried version 0.1 and it didn't even load the test list.
Just downloaded and installed version 0.2, after few attempts it finally loaded the test list, but when I try to run all tests or any selection or debug a test it fails with the following message in output:
------ Run test started ------
An exception occurred while invoking executor 'executor://boosttestexecutor/v1': Object reference not set to an instance of an object.
========== Run test finished: 0 run (0:00:00.3314) ==========

ETAS GmbH November 16 2013
| Edit |

Please try V0.5.

by TGoodhew | August 19 2013

For those suffering from an object reference not set error, you can download this extension via your browser then double click on it to launch the VSIX Installer. The extension will install correctly without error.

To uninstall you can use the Extensions & Updates dialog successfully.

Tony Goodhew, Program Manager, VS Pro

ETAS GmbH May 17 2014
| Edit |

Fixed with V0.2

by Richard Weber CMT | August 13 2013

Worked great for me so far.
Hope for a new release that supports BOOST_FIXTURE_TEST_CASE macro.

ETAS GmbH August 06 2014
| Edit |

BOOST_FIXTURE_TEST_CASE is supported with V0.8 now.

by legalize | July 09 2013

This looked interesting, but I can't evaluate it fully because it crashed during installation. I then uninstalled it.

"Object reference not set to an instance of an object."

ETAS GmbH August 27 2013
| Edit |

Issue is fixed in V0.2 now

Sign in to start a discussion

  • Visual Studio Code
    2 Posts | Last post September 09, 2016
    • Any chance that this adapter will be ported to Visual Studio Code ??
    • Hi Serup and thank you for your interest in the project.
      I do not think that the test infrastructure used in Visual Studio is the same as Visual Studio Code so I do not think that this can be simply used as-is for Code.
      As to whether something similar will be made available, I do not think I am in a position to comment on that at this time.
  • Features not supported: - If the projects are set to be built as a DLL (.dll), the plugin won’t work.
    3 Posts | Last post June 02, 2016
    • You should consider removing or reducing this caveat.  The plugin will work if the projects are set to be built as a DLL, it just takes a bit of manual configuration - notably an external test runner (such as ETAS' BoostExternalTestRunner) and a custom .runsettings file.
    • Hi Stewart and many thanks you for your feedback. 
      Thanks for your feedback. For traceability purposes, kindly report your concerns directly to the GitHub repository for open discussion.
    • Hello Stewart,
      Thanks for your feedback.
      Up to now there was less need for this. Typically the unit tests and the to be tested code are clearly separated. But I agree with netspiri that it would be a good idea to add your issue to our GitHub page If you already have a solution you can forward also a PR to us.
      Looking forward to hear on GitHub from you gain.
  • Boost Test 1.59 Error
    3 Posts | Last post November 26, 2015
    • First of all many thanks for your incredible extension.
      In the last boost test issue many enhancements were made. One of them is preconditions. One of macro in  BOOST_FIXTURE_TEST_CASE() family has 3 parameters now and looks like BOOST_FIXTURE_TEST_CASE(name, fixture, precondition). There is an error occurred during test case discovery and discovery process interrupted when such test case was met. The output is: "Exception raised while discovering tests from "..." of project "...", (Index was outside the bounds of the array.)
         at BoostTestAdapter.BoostTestDiscovererInternal.DiscoverBoostTests(CppSourceFile cppSourceFile, String source, ITestCaseDiscoverySink discoverySink)
         at BoostTestAdapter.BoostTestDiscovererInternal.GetBoostTests(IDictionary`2 solutionInfo, ITestCaseDiscoverySink discoverySink)".
      I'm using the following construction as workaround:
      #define CONDITIONAL_FIXTURE fixture, precondition
      Thank you for your attention.
    • With next version we like to use the command line parameter --list_content to get the list of unit test and do no more parse the source code. This should also solve this problem (needs Boost 1.59). 
    • I didn't even know that source code is open. While your new version doesn't issued, I'd made several fixes in the old one:
      - relax current Visual Studio version dependency during development;
      - fix multiline BOOST_TEST_ ... macros support. The limitation is annotated in the code, but it doesn't reflected in help;
      - fix support new style test macros with depends_on() decorator producing extended xml log output.
      I can share my fixes with you if you wish.
  • Set working directory
    3 Posts | Last post November 09, 2015
    • Hi,
      Is there a way to set the working directory when running tests? My test application needs several dll's and test data to be present in the current working directory. I had a look at the code and it seems that the working directory is always set to the directory of the test executable. Any chance you could add an option to change to another directory? I can't quite figure out what I need to compile and install an extension, it seems that adding the option shouldn't be very hard... Thanks a bunch for this extension by the way, if I can only get this one thing working, it's going to be very useful...
      (I asked a question about this on stackexchange as well ( but I figured I'd have better luck here...)
    • Hi Roel,
      Why do you not set paths in your tests?
    • Hi Roel,
      Thanks for your comment. Issue has been noted in GitHub - Currently flagged for discussion for further design deliberation. Feel free to comment and suggest on the GitHub issue.
  • Detect memory leaks in vs 2015
    4 Posts | Last post November 02, 2015
    • Hi,
      first of all congrats for this nice tool!
      I would like to have memory leak detection from VS2015. I have added the .runsettings file however the tool says:
      An error occurred while initializing the settings provider named 'MSTest'. Error: MSTestAdapter encountered an unexpected element 'FailTestOnMemoryLeak' in its settings 'MSTest'. Remove this element and try again.
      Is this feature not supported for VS2015?
      One more thing. Is it possible to automatically Run all the test after a successful build and see the red/green bar?
      Thank you
    • > Run tests after every build
      Running unit tests after every build is supported in Visual Studio Enterprise. To run your unit tests after each local build, choose Test on the standard menu, and then choose Run Tests After Build on the Test Explorer toolbar.
    • > runsettings
      Maybe it is better to ask in a Visual Studio forum. MSDN:
    • @vfederico Your issue could be a result of incorrect configuration. For your use case, the following .runsettings file should suffice:
      <?xml version="1.0" encoding="utf-8"?>
      For more information, please refer to the user manual or the sample available at:
  • Each TEST_CASE runs in own process
    3 Posts | Last post November 01, 2015
    • Scenario: Every test case is run in a new process
      Given the Boost Unit Test Adapter version is installed in Visual Studio 2013 or 2015
      And a C++ executable project which contains several Boost.Test test suites exists
      When I run one, several or all test suites via the Test Explorer
      Then every test case is run in a new process
      Is there a possibility to change this behaviour such that, all test suites and all test cases are run in the same process? I understand that this is (sometimes) a useful feature, but in my current project the test suites have expensive setup and teardown procedures which I would like to avoid running for EVERY test case. Thanks a lot!
    • Hi Paul,
      Thanks for your feedback. For traceability purposes, kindly report any issues and/or enhancement suggestions directly to the GitHub repository.
    • Hi Paul,
      It is important to understand that our plugin is only a wrapper on top of the boost test framework. First step is always to setup a test project with unit tests which results in a binary (exe = test runner). We call this exe and display the results with the help of a unit test adapter in VS. So it's mainly up to you how you distribute your tests to test projects. If you want to to run only one process you have to move all unit test into one test project. 
    2 Posts | Last post September 12, 2015
    • Hi,
      this is an awesome extension - thank you so much!
      I am struggling with a tiny detail in debug builds, so that debug code assertions can coexist with the Boost UTF. Our code is interspersed with a lot of FOO_ASSERT macros which, basically call _ASSERTE if _DEBUG is defined, otherwise evaluates to ((void)0). Nothing fancy.
      So basically something like ...
      FOO_ASSERT(nullptr != ptr);
      if(nullptr == ptr) throw std::invalid_argument(...);
      Within the unit test I want to catch the "invalid_argument" exception, but because of the FOO_ASSERT, the UTF catches a system error. On command line this can be circumvented with "--catch_system_errors=no". Using the adapter via the Test Explorer, one cannot pass the required parameter though (.runsettings does not support it) and using it as environment variable "BOOST_TEST_CATCH_SYSTEM_ERRORS=no" somehow failed.
      So, it would be great to have a way to add this to the config options. Or would there be another/better way to achieve this? I don't want to recompile the debug code just because of unit testing.
    • Having an option to forward additional command line parameters sounds very useful. Could you copy this request to our issue tracker please:
  • Visual Studio 15
    15 Posts | Last post September 04, 2015
    • It's a really nice and helpful plugin. I'm planning to migrate to Visual Studio 15. Will be new studio version support expected? 
    • Hi,
      after Visual Studio 2015 is released, we will discuss internally and decide whether we will support Visual Studio 2015 or not. But the chances are quite good ;-)
    • Some extensions like Git Tools, Visual Assist are already working on alpha. I think it will be a good idea to adapt adapter to new VS branch, if extension API isn't changed dramatically.
    • This is a fantastic plugin and I was using it heavily on Visual Studio 2013. Now I have moved to 2014 for the support of C++14 and other stuff. It will be really really help to evaluate if we get this plugin support for evaluating.
    • After the Christmas break we will decide how to proceed and when we plan to support Visual Studio 2015.
    • Hello, Is there any momentum on supporting Visual Studio 2015? Having this plug-in will help in evaluating Visual Studio 2015 for my company's use. I am fine to take a developer release to test as well. Please let me know.
    • So, how about 15 version support? Have you any progress?
    • Not yet, sorry. We will wait until Visual Studio 2015 is released in the final (not preview) version.
    • Ok. Will wait final release.
    • VS2015 support is available now. 
    • It took me a while to get it to run on Visual Studio 2015 Community Edition. Not sure if I missed something obvious. I shared my steps here in case they're of use:
      Is there a way to get it to run using Platform Toolset v140? (i.e. Visual Studio 2015)
    • For Visual Studio 2015 you need to use the Boost libraries created for Visual Studio 2015 (libboost_unit_test_framework-vc140-mt-1_55 instead of  libboost_unit_test_framework-vc120-mt-1_55).
      - vc140 = Visual Studio 2015 (Platform Toolset v140)
      - vc120 = Visual Studio 2013 (Platform Toolset v120)
      Download the Boost sources and compile them for Visual Studio 2015. Then you can use the Boost Unit Test extension also with the Visual Studio 2015 compiler.
      The versioning of Visual Studio (2015 = v140, 2013 = v120) is very confusing, I know ;-)
    • Hi, thanks for replying.
      I tried to produce the binaries myself to get the v140 (visual studio 2015) but for some reason the files produced had no version associated with them (e.g. libboost_unit_test_framework-vc-mt-1_57), and I couldn't find precompiled binaries using version v140. 
      Will I encounter problems if my project is v140 but my boost test project is v120?
    • The binaries for Boost 1.59 are available for Visual Studio 2015:
      Here is a short description (for 64-bit) how to build the binaries for boost 1.xx for a certain Visual Studio version:
      Download the sources of the desired boost version, unzip the file and go to the root folder where bootstrap.bat is located.
      Run the following commands from command line:
      1.) bootstrap.bat
      2.) "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 [64-bit]
      3.) "bjam --clean"
      5.) "bjam -j4 --debug-symbols=on --build-type=complete toolset=msvc-14.0 threading=multi runtime-link=shared address-model=64"
      to 5.) msvc-14.0        : defines the Visual Studio 2015 version
             address-model=64 : defines the platform (32/64)
      I hope this helps.
    • This solved my problem. I am now able to use my desired boost version with my choice of platform. Thank you very much for your help. 
  • Does this project have a homepage, issue tracker, or source code available?
    4 Posts | Last post August 28, 2015
    • I've been enjoying this extension and it was key in my decision to use Boost.Test and TurtleMock at my company. I have an interest in ensuring this is a reliable and sustained project but unfortunately I haven't been able find any kind of publicly available homepage, issue tracker, or source code. Does any of this exist or is this page the only public resource?
      That said, I do have an issue to report, fortunately it is easy to fix. The problem is that after creating a new Boost Unit Test Project the project fails to build. The problem appears to be an unset Platform Toolset.
      Thank you for this extension, since we started with boost.test I've been using it almost every day.
      Visual Studio 2013
      Boost 1.53.0
      Boost Test Runner Adapater 0.9.4
    • I just wanted to add that if I change the Project template file Boost Unit Test Project.vcxproj and remove the lines containing <PlatformToolset></PlatformToolset> the problem goes away.
    • Source code is published on GitHub now. 
    • This is awesome and good news, thank you !
  • TFS Integration
    1 Posts | Last post August 26, 2015
    • First of all, great extensions, it is really useful.
      I am trying to integrate the boost test adapter to our build system. The unit tests are running fine in our developers machines. 
      The issue is when i follow ( to add the adapter to the build system I get an 'Object reference not set to an instance of an object'. My assembly file specification points to the .exe generated by the boost test project. Does anyone has gone trough the process of integrating with TFS? Any thoughts?
1 - 10 of 38 Items