D
D
Dmitry2013-04-14 10:42:38
Programming
Dmitry, 2013-04-14 10:42:38

Who sets up unit tests in C++ projects and how?

Please share your experience in setting up unit tests in C++?
Now I'm doing this:
Using MSVS 2012 created a project with Boost.Test written unit tests are included in it. When I want to test, I compile this project and run the resulting exe file with --report_log=short parameters.
I would like to get faster feedback from unit tests. So far, only the creation of a new configuration in the main project comes to mind. Name this configuration UnitTests.
I would like to listen to other guys, how they use and how they have a process for using unit tests?
interested in:
1) What test framework
2) how it is configured
3) What is the usual use case

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
BaJlepa, 2013-04-14
@BaJlepa

1) VS 2012 Unit tests
2) several test playlists are created, which are run manually or during build
3) usually the main test playlist is run during build,
see these two videos with a more detailed story
channel9.msdn.com/Events/TechEd/Europe/ 2012/DEV214
channel9.msdn.com/Series/Visual-Studio-2012-Premium-and-Ultimate-Overview/Microsoft-VisualStudio-Ultimate-2012Improve-unit-testing-workflow-with-these-Test-Explorer-improveme

T
Trrrrr, 2014-01-02
@Trrrrr

It's strange that googletest doesn't offer.
code.google.com/p/googletest

S
silvansky, 2013-04-15
@silvansky

CxxTest - I liked it.
github.com/silvansky/DateFormatter - here I dealt with it, there are tests for each class.
I run it like this:

make tests

or
make tests-verbose

If included in the project, then you can add an additional buils-step. It already depends on the IDE.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question