Hello there!
I'm starting a new learning journey about quality assurance of C/C++ applications.
What framework do you use for testing c/c++ applications? Why?
Thanks in advance, community :)
Hello there!
I'm starting a new learning journey about quality assurance of C/C++ applications.
What framework do you use for testing c/c++ applications? Why?
Thanks in advance, community :)
For further actions, you may consider blocking this person and/or reporting abuse
Aqeel Akbari -
OLALEKAN john Ayansola -
Bartek Wilczek -
Pranav Bakare -
Top comments (11)
Add this one to your arsenal of tools.
godbolt.org/
Really useful.
I wish I knew this when I took compilers.
Excellent name "godbolt" :-D
It is the last name of the creator "Matt Godbolt".
The Bolt of God :-D
Gtest is the optimal test framework for c\c++, it has everything you need and for free.
For mocking I use Isolator++, it is not cheap but very powerful and unique:\
It can mock almost any type of behavior in any kind of code.
I find accessing private modules in your code and faking static methods super important and that makes my life so much easier.
TBH i haven't found any other tool that is as much powerful as that one, all mocking frameworks these days demand refactoring of your code and that always causes tons of new errors.
Good Luck!
Thank you! I also found Google Mock. Do you have any experience (good or bad) about GMock?
I use cpputest for my personal projects to ensure that every time that I build, any new changes made to the code won't cause something to happen unexpectedly.
cpputest.github.io/
For everything debugging I will launch QT creator and attach my process to it. QT creator's debugger is awesome, and your project doesn't have to be a QT one or involve any of the QT libraries to use it.
doc.qt.io/qtcreator/creator-debugg...
Curiously, these for "really bad days" are the only I'm used to =P, thanks to the CTFs.
I have used Valgrind but these days I mostly use -fsanitize gcc/clang switches since they don't cause such a major slowdown and memory consumption.
Great article. I spent the last 8 years doing only c++ network programming. Then after thinking things through, I thought to myself that this is overly complex for what I'm doing and OOP is something I can live without. Also, I can easily replicate it with function pointers which I also use in C++ anyway.
This was just a quick intro, you should stick with C++ if you like it; you wrote a great post about it anyway. Now, here's the reason I'm writing this comment; there's an alternative to Valgrind which you could consider using once you get more acquainted with C++. Valgrind incurrs 20x slowdon or was 10x I don't rememeber honestly, but it can get quite slow and eat up a huge amount of memory. The other alternative that doesn't cause any noticeable slowdown are gcc/clang fsanitize methods
When I first started coding in C++ I also usw Valgrind; not even sure if fsanitize methods were available back then.
Happy programming and congrats on this great post.
DF
My brain, vim, gcc, stdlib and gdb is enough for me through lifetime.