Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit and integration testing in C++ [closed]

I'm going to write a quite large application for school project in C++. So far I'm quite used to TDD in Java and Ruby using JUnit and RSpec.

But as far as my experience goes, I've never seen any C/C++ project with any test suite.

What library do you recommend for testing in C++?
Are there any good mocking/stubbing frameworks for C++?

Actually I'm using NetBeans IDE and there seems to be no support for testing whatsoever.
What tool would you recommend for TDD in C++?

Is TDD even possible with C++? The compile time seems to me like a big drawback.

like image 954
Jakub Arnold Avatar asked Sep 23 '09 23:09

Jakub Arnold


People also ask

What is difference between unit testing and integration testing?

Unit Testing is a kind of white box testing, whereas Integration Testing is a kind of black-box testing. For Unit Testing, accessibility of code is required, as it tests the written code, while for Integration Testing, access to code is not required, since it tests the interactions and interfaces between modules.

What is the difference between unit testing and integration testing and end to end testing?

End to End: A helper robot that behaves like a user to click around the app and verify that it functions correctly. Sometimes called "functional testing" or e2e. Integration: Verify that several units work together in harmony. Unit: Verify that individual, isolated parts work as expected.

What is unit & integration testing?

Unit Testing is typically performed by the developer. It is a testing method using which every independent module are tested to determine if there is any issue by the developer himself. Integration Testing: Integration testing is the process of testing the interface between two software units or modules.


2 Answers

The Boost Test Library gives you unit tests etc.

like image 120
Georg Fritzsche Avatar answered Oct 02 '22 06:10

Georg Fritzsche


We use Google Test Framework. And we don't run tests on every compile on the developers machines. This is a job for a build server.

like image 21
Sergey Podobry Avatar answered Oct 02 '22 07:10

Sergey Podobry