Can i make unit testing using cxxtest with visual studio 2010 professional?
Of course! I've done that.
Just create a vcproj template where the UnitTest.h file has a custom build step which run the test generation code (cxxtestgen.py) which will generate UnitTest.cpp.
Now you can create new projects from that template and it will work like a charm.
Related
Are there any plugins for visual studio 2017 which enable to calculate unit test code coverage with C++?
I only found
OpenCppCoverage:
https://marketplace.visualstudio.com/items?itemName=OpenCppCoverage.OpenCppCoveragePlugin
but it seems to be outdated / not working.
Other than that it seems like there are only Code coverage plugins for .Net-Languages but not C++
Are there any other options (besides upgrading to MSVC Enterprise)
I recently tested CPPCoverage, an open source and free extension that works perfectly to perform code coverage of native Visual C++ unit tests.
It is a visual extension (VSIX) and provide details reports. Once installed, Right-click in solution explorer on the test or application project and click "Run code coverage".
I'm currently trying to build OOLua in Visual Studio 2013. I have run the "premake4 vs2013" command and got a oolua.sln which looks like this:
http://imgur.com/jwP39pv
If I only build the oolua project is succeeds, but whenever I try to build the solution, I get a lot of errors everywhere. Am I supposed to build the whole solution or just the oolua project? How do I build the whole solution if that's what I have to do?
You have built the static library and that is all that is required. The solution includes all the tests, which if you want to run them requires Gmock and CppUnit.
How I can get PEX to auto-generate unit tests in Visual Studio 2013?
I can auto-generate unit tests with PEX in visual studio 2010 and the menu was found by right clicking in the function body.
We did not release a version for Visual Studio 2013.
The good news is that you can now do that same auto-generation of unit tests in Visual Studio 2015 using the "Smart Unit Tests" feature.
For Visual Studio 2013, they do provide PEX framework (lightweight version) named as CodeDigger.
But CodeDigger is limited that it just generates a table of all the possible combinations of inputs and output.
No options to copy that table or Save any of the test suites.
CodeDigger gives a minimal help. Not so great
I am moving from 2008 to 2010 to try out some of the C++0x features but I noticed that there are test projects in 2010, what are these and how can I use them in my environments?
These are projects that define the Unit Test code for the other projects in your solution.
T4 did not work for C++ projects in Visual Studio 2008 since it did not use msbuild for C++ projects. (Yes there were workarounds) In Visual Studio 2010, C++ projects uses MsBuild, so do anyone know if C++ projects can use T4 in the same way as C# or VB?
The main integration mechanism for T4 in C# and Visual Basic projects is the TextTemplatingFileGenerator custom tool. Although in Visual Studio 2010 C++ projects now use MSBuild, they still don't support custom tools. As a workaround, you could use T4 Toolbox, which allows you to put a .tt file in a C# or Visual Basic project and have the files it generates added to your C++ project automatically.
I was interested in finding a way of using C++ with the T4 Templating myself and ended up just using the command line and the TextTransform.exe tool directly. You can then write a batch file that will call the TextTransform.exe against all your individual template.tt files, then just call the Batch file as part of your build in visual studio.
As I was learning it I decided to write up my findings in a tutorial which can be found here... http://www.gamelogicdesign.com/2012/04/12/c-code-generation-using-t4-templates/
Maybe this will be of use to people who would like to do something similar.