[Qt-interest] [slightly OT] Test Driven Development
Srdjan Todorovic
todorovic.s at googlemail.com
Mon Feb 8 10:32:36 CET 2010
Hi,
On 08/02/2010, Dave Smith <dave at thesmithfam.org> wrote:
> Are you using test driven development in your Qt projects? If so, have
> you found that it benefits your project or not?
I have used TDD + Qt in the past, and found it very useful. I find that it makes
me think about the class a little bit more and the test-first workflow almost
forces you to decide upon the method responsibilities before you even write it.
> If you are not using TDD, why not? All details are welcome. I am
> trying to form an opinion of my own.
I have had the best success with TDD when using vim + (q)make + g++.
I use KDevelop3 now and setting up unit tests and in general management of
the source is fiddly and makes me resist doing TDD.
I'm not sure if QtCreator would work better here - trialled it a little over the
weekend and did like how easy it was to clone the Release profile and make
a Debug profile (adding -g g++ option). Perhaps if I use QtCreator more I
would discover that unit testing is easy with that IDE and resume coding
in TDD style.
> Have you found that TDD works better for certain areas within your
> projects and not others? For example, the back-end vs. the GUI?
One thing I'm not sure exactly how to test is the asynchronous nature of
GUIs and Signals and Slots. Does anyone have any special techniques
that don't involve QTest?
Hope that answers some of your questions.
Regards,
Srdjan
More information about the Qt-interest-old
mailing list