onemoregres / qtc-gtest Goto Github PK
View Code? Open in Web Editor NEWQt Creator Google Test framework integration plugin [deprecated]
License: MIT License
Qt Creator Google Test framework integration plugin [deprecated]
License: MIT License
Could be nice to have install instructions on the README file
Hi,
thanks for this plug-in, I like it very much.
My issue is: it does not show results of Value Parameterized Tests ( https://code.google.com/p/googletest/wiki/AdvancedGuide#Value_Parameterized_Tests ).
It would be cool, if this could be added.
I've got one particular situation in which the QtCreator in Linux only... This is with the latest Qt 3.4.0 Gtest build that you provided in issue #10.
The strange thing is, however, is that I can only reproduce this in a very particular failure (see below). To make it stranger, the bug won't trigger when I only have the tsplib-parser project loaded. It needs to be inside the other project (which I can't share yet right now), for the problem to manifest. Could it have to do with the fact that I have two separate instances of gtest in that project. There is one gtest executable for the project itself, the other one is inherited from tsplib-parser (which is in the parser subdir).
Starting /home/jvpinxten/build-cph-tsp-Desktop_Qt_5_3_GCC_64bit-Debug/parser/tests/tests...
Running main() from gtest_main.cc
[==========] Running 18 tests from 5 test cases.
[----------] Global test environment set-up.
[----------] 5 tests from Basic_ParserTest
[ RUN ] Basic_ParserTest.Name
[ OK ] Basic_ParserTest.Name (0 ms)
[ RUN ] Basic_ParserTest.NameKeywordInField
[ OK ] Basic_ParserTest.NameKeywordInField (0 ms)
[ RUN ] Basic_ParserTest.CommentKeywordInField
[ OK ] Basic_ParserTest.CommentKeywordInField (0 ms)
[ RUN ] Basic_ParserTest.FloatingPointExponent
[ OK ] Basic_ParserTest.FloatingPointExponent (0 ms)
[ RUN ] Basic_ParserTest.DataAfterSection
[ OK ] Basic_ParserTest.DataAfterSection (0 ms)
[----------] 5 tests from Basic_ParserTest (0 ms total)
[----------] 2 tests from Parser_TourTest
[ RUN ] Parser_TourTest.Basic
[ OK ] Parser_TourTest.Basic (0 ms)
[ RUN ] Parser_TourTest.IncorrectType
[ OK ] Parser_TourTest.IncorrectType (1 ms)
[----------] 2 tests from Parser_TourTest (1 ms total)
[----------] 6 tests from Parser_TSPTest
[ RUN ] Parser_TSPTest.IntegerArray1
[ OK ] Parser_TSPTest.IntegerArray1 (0 ms)
[ RUN ] Parser_TSPTest.IntegerArray2
[ OK ] Parser_TSPTest.IntegerArray2 (0 ms)
[ RUN ] Parser_TSPTest.IntegerArray3
[ OK ] Parser_TSPTest.IntegerArray3 (0 ms)
[ RUN ] Parser_TSPTest.RealArray1
[ OK ] Parser_TSPTest.RealArray1 (0 ms)
[ RUN ] Parser_TSPTest.MixedArray1
[ OK ] Parser_TSPTest.MixedArray1 (0 ms)
[ RUN ] Parser_TSPTest.IncorrectType
[ OK ] Parser_TSPTest.IncorrectType (0 ms)
[----------] 6 tests from Parser_TSPTest (0 ms total)
[----------] 3 tests from Parser_TSPEdgeTest
[ RUN ] Parser_TSPEdgeTest.EUC_2D
[ OK ] Parser_TSPEdgeTest.EUC_2D (0 ms)
[ RUN ] Parser_TSPEdgeTest.EXPLICIT_FULL_MATRIX_WRONG_DIMENSION
[ OK ] Parser_TSPEdgeTest.EXPLICIT_FULL_MATRIX_WRONG_DIMENSION (0 ms)
[ RUN ] Parser_TSPEdgeTest.EXPLICIT_FULL_MATRIX
[ OK ] Parser_TSPEdgeTest.EXPLICIT_FULL_MATRIX (0 ms)
[----------] 3 tests from Parser_TSPEdgeTest (0 ms total)
[----------] 2 tests from GTSP
[ RUN ] GTSP.Basic_instance
[ OK ] GTSP.Basic_instance (0 ms)
[ RUN ] GTSP.AGTSP_4br17
../../../cph-tsp/parser/tests/gtsptests.cpp:82: Failure
Value of: clusters.size()
Actual: 17
Expected: 4u
Which is: 4
../../../cph-tsp/parser/tests/gtsptests.cpp:83: Failure
Value of: clusters[0].size()
Actual: 1
Expected: 2u
Which is: 2
[ FAILED ] GTSP.AGTSP_4br17 (1 ms)
[----------] 2 tests from GTSP (1 ms total)
[----------] Global test environment tear-down
[==========] 18 tests from 5 test cases ran. (2 ms total)
[ PASSED ] 17 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] GTSP.AGTSP_4br17
1 FAILED TEST
/home/jvpinxten/build-cph-tsp-Desktop_Qt_5_3_GCC_64bit-Debug/parser/tests/tests exited with code 1```
The Alt + T
in both the Windows and Ubuntu Qt Creator is bound to the Tools menu; therefore, I cannot access the Google Test submenu through these key bindings.
Thank you for this really great plugin.
One thing that would be great is if the plugin would mention test marked with DISABLED_ like the output prints in yellow:
and activated filter like --gtest_filter=StackTest.* which the output also prints in yellow:
Otherwise you can quickly forget that you disalbed some tests or added a filter and you are actually not running all your test without being aware of it :)
Results of a test are only shown in "Application Output" and not in "Google Test".
Output begins with that:
&"warning: GDB: Failed to set controlling terminal: \320\235\320\265\320\277\321\200\320\270\320\274\320\265\320\275\320\270\320\274\321\213\320\271 \320\272 \320\264\320\260\320\275\320\275\320\276\320\274\321\203 \321\203\321\201\321\202\321\200\320\276\320\271\321\201\321\202\320\262\321\203 ioctl\n"
After this tests run but the Google Test panel shows nothing. (In fact, Qt Autotest plugin doesn't show anything, too.)
Using Ubuntu 16.04, Qt Creator v4.4.0, version of plugin the same. Project is CMake-based, can give a link to repo if necessary.
The marks does not get cleared correctly between test runs if an error gets resolved.
Also when an error occurs again, a new mark is added on top of the old mark.
Looking at the code through GitHub it seems like nobody is calling "OutputPane::clearContents()", but I might overlook something.
I am using Qt Creator 4.0.3 on Ubuntu 16.04.
Related but not sure if by design: When clicking the mark your output pane is not set to focus. It does select the correct issue in your pane but if another pane is shown (for example Application Output) then you need to manually open the Google Test pane.
PS: Awesome plugin
Hello Sergey --
I am having difficulty compiling this plugin for QT Creator 3.3.2 (opensource). In QtcGtestPlugin.cpp, the line that begins with "connect (DocumentModel::model ()," throws the compile error "'model' is not a member of 'Core::DocumentModel'".
I tried commenting out those signal/slot setup lines just to see if I could compile things, but ran into another error in PaneWidget.cpp, on the "#include "ui_PaneWidget.h"" line ("ui_PaneWidget.h: No such file or directory"). It doesn't appear that ui_PaneWidget.h is in this Git project.
I'm running Ubuntu 14.04 LTS. I'd really like to run this on Qt Creator 3.3.2, but it doesn't appear possible to do so at the moment. Any help you could provide would be greatly appreciated. Thanks!
I've got some shared objects that are picked up when launching the full test suite, but when run through the menu (say: Tools -> Google Test -> Check Project)
Starting Debug/tests/tests... Debug/tests/tests: error while loading shared libraries: libcommon.so.1: cannot open shared object file: No such file or directory Debug/tests/tests exited with code 127
I can work around it by launching it the normal way, but then I can't use the awesome feature that only a part of my test set is being run.
I'm assuming that some part of the run configuration isn't setup completely, or not completely copied from the others.
BTW: On the whole, it's working great under both Windows and Linux; I also like the easy installation :-)
If I run this test:
// Function under test...
bool acceptAtoC(char name) {
if(name == 'b')
return false;
return true;
}
class MyStringTest : public testing::TestWithParam<char> {};
INSTANTIATE_TEST_CASE_P(InstantiationName,
MyStringTest,
::testing::Values('a', 'b', 'c'));
TEST_P(MyStringTest, testCase) {
ASSERT_TRUE(acceptAtoC(GetParam()));
}
case b should fail and marked as red. But it isn't and the sum of failing tests is 0 instead of 1.
It this a bug, or am I doing something wrong here?
Hello!
Thank you for this great plugin! To simplify maintenance and help advance the QtCreator platform as a whole, would you be willing to submit this plugin for integration into the QtCreator source tree?
Thanks!
I tried to use it with the 3.3 branch and it is not anymore compiling.
On Mint 18, calling a menu entry crashes qtcreator, the same is true for clicking on check current ,etc in the Google Test pane. The Google Test panes remains empty when CTRL+R running tests.
When using the latest plugin with Qt Creator 4.2 I get the following issue when clicking a failed test in the output pane:
File Error:
Could not open "..\TestGtest\main.cpp" for reading. Either the file does not exist or you do not have the permissions to open it.
Is this a bug or is there something that I have not configured?
System:
Windows 7
Qt Creator: 4.2.1
QtcGtest Plugin: 4.2.0_1
Where are the installation instructions, particularly for Linux?
I'm new to Google's C++ testing framework, although I have got experience with JUnit and PyUnit.
I'm a fan of Qt Creator so I was pleasantly surprised that a plugin exists for this.
However, it would be a very nice kick-start if there would just be a simple example/tutorial to get started. It would greatly ease the adoption for me! I could not find any documentation on how to set up the Google Test library with your plugin and how it understands where it should start.
Any plans to add such documentation/tutorial/examples?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.