If I have to debug my unit tests then usually something smells about the test already - normally each test should be rather simple and be stand-alone runnable (i.e. test B should not have to rely upon a run of test A); so in most cases I should end up with some really small piece of code where I can see the error from reading the code without actually having to debug this. Being very verbose in your "test failed" messages helps a lot with this, too.
However, in the (very rare) case of actually having to debug the test I usually explicitely set the test project to be the debuggee. Also, changing the test *and* the code to be tested at the same time is rarely a good idea, as you might not directly know why the test is broken. /Thomas Bravo.Alex schrieb: > If running is part of building, then how do run the test several times (most > likely to step through it with debugger)? Do you also build several times? > > That's one of the reasons building is separate from running - you build once > and then run as many times as you want. > > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Thomas Dähling > Sent: Monday, October 26, 2009 1:21 PM > To: [email protected] > Subject: Re: [Qt-creator] plugin_qtestlib > > I have always considered running the unit tests to be part of the build > process; personally I always set unit tests up in a way that they are > run once I compiled a project. Keeps the turnaround time as short as > possible. > > So, with that background, I am fairly much in favour of using the "build > issues" panel for these kind of things. > > jm2c > > /Thomas > > Bravo.Alex schrieb: >> Adam, >> >>> Build Issues would be a valid output target >> What happens when the test itself has build issues - which is very common >> due to changes in the code being tested? >> Are you saying that running of test can be considered part of building? >> >> Aren't building and running separate things according to Qt Creator design? >> >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Coda Highland >> Sent: Monday, October 26, 2009 12:39 PM >> To: [email protected] >> Subject: Re: [Qt-creator] plugin_qtestlib >> >> Honestly I don't know if I want to set the precedent of allowing >> plugins to just arbitrarily add new tabs there. >> >> I think Build Issues would be a valid output target, though; it's >> already intended for jumping to the relevant places in the code and >> one could argue that failing a unit test is a build issue. >> >> /s/ Adam >> >> On Mon, Oct 26, 2009 at 2:18 PM, Robert Caldecott >> <[email protected]> wrote: >>> I like the idea of a dedicated QTest output pane - will you be able to >>> double-click on failures to jump directly to the code? That would be >>> brilliant. >>> >>> 2009/10/26 Bravo.Alex <[email protected]> >>>>> Plus that it's not so high in the list of things to do. >>>> >>>> If you are talking about qtcrea...@nokia team, it makes a lot of sense. >>>> >>>> But that's why you guys opened development to outside world, right? >>>> >>>> So that we can help you improve already great product. >>>> >>>> >>>> >>>> >>>> >>>> So, back to qtestlibplugin: >>>> >>>> After bringing it back from the dead, I realized that the architecture of >>>> this plugin might need adjustment: >>>> >>>> Right now it has its own type of output "Test Results" (just like "Build >>>> Issues", "Application Output" and 2 more). >>>> >>>> But, as this picture shows, there's not much space for different types of >>>> output: >>>> >>>> >>>> >>>> Besides it doesn't make much sense to "pollute" IDE's screen with "Test >>>> Results" button and list entry >>>> >>>> for applications that have nothing to do with QTestLib. >>>> >>>> >>>> >>>> It looks like there should be as little presence for this plugin as >>>> possible in the IDE's GUI. >>>> >>>> Ideally, this plugin should show itself only if output of a program is in >>>> QTestLib format. >>>> >>>> >>>> >>>> Thus this plugin really provides a different format of "Application >>>> Output", not a different output pane. >>>> >>>> >>>> >>>> So proposed adjustment to this plugin is to be able to have several >>>> formats of "Application Output". >>>> >>>> By default it's "raw" output, with the ability to switch to a different >>>> format. >>>> >>>> In case of qtestlibplugin it can be "test results" and "benchmark results" >>>> formats. >>>> >>>> Other plugins could have/add their own formats. >>>> >>>> >>>> >>>> What do you guys think? >>>> >>>> >>>> >>>> Alex >>>> >>>> >>>> >>>> >>>> >>>> -----Original Message----- >>>> From: [email protected] >>>> [mailto:[email protected]] On Behalf Of Eike Ziller >>>> Sent: Monday, October 26, 2009 4:00 AM >>>> To: [email protected] >>>> Subject: Re: [Qt-creator] plugin_qtestlib >>>> >>>> >>>> >>>> >>>> >>>> On Oct 20, 2009, at 7:24 PM, ext Bravo.Alex wrote: >>>> >>>> >>>> >>>>> Why is it dead: >>>>> a) it's obsolete, we now have a new XYZ plugin supporting >>>>> QTestLib in Qt Creator >>>>> b) the author is working on something else and doesn't have >>>>> time/interest to work on it >>>>> c) it didn't do much, so it's not worth maintaining >>>>> d) nobody needs it, we are satisfied with running tests through >>>>> test.pl >>>> >>>> I suppose it's b) and c). Plus that it's not so high in the list of >>>> >>>> things to do. >>>> >>>> The only "maybe" still useful parts of the code in the plugin is >>>> >>>> probably the interaction/parsing of the QTestLib output. >>>> >>>> >>>> >>>> ++ Eike >>>> >>>> >>>> >>>>> Alex >>>>> On Tuesday 20 October 2009 17:47:42 ext Bravo.Alex wrote: >>>>>> I'm not very successful in finding any info about plugin_qtestlib. >>>>>> There's not many comments in the source code either. >>>>>> plugins.pro says this: >>>>>> plugin_qtestlib \ # this seems to be dead >>>>>> The source tree on gitorious.org is missing >>>>> QTestLibPlugin.pluginspec for >>>>>> it. >>>>>> Does anybody know what it was supposed to do? >>>>> It's dead and the code probably is not very useful anymore either. >>>>> daniel >>>>> <ATT00001..txt> >>>> >>>> -- >>>> >>>> Eike Ziller >>>> >>>> Software Engineer >>>> >>>> Nokia, Qt Development Frameworks >>>> >>>> Phone +49 (0)30 6392 3255 >>>> >>>> Fax +49 (0)30 6392 3256 >>>> >>>> E-mail [email protected] >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> Qt-creator mailing list >>>> >>>> [email protected] >>>> >>>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>>> >>>> _______________________________________________ >>>> Qt-creator mailing list >>>> [email protected] >>>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>>> >>> _______________________________________________ >>> Qt-creator mailing list >>> [email protected] >>> http://lists.trolltech.com/mailman/listinfo/qt-creator >>> >> _______________________________________________ >> Qt-creator mailing list >> [email protected] >> http://lists.trolltech.com/mailman/listinfo/qt-creator >> >> _______________________________________________ >> Qt-creator mailing list >> [email protected] >> http://lists.trolltech.com/mailman/listinfo/qt-creator >> > _______________________________________________ > Qt-creator mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-creator > > _______________________________________________ > Qt-creator mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-creator > _______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
