[SOLVED] Unit testing, versioning and books
-
Hi all,
I'm a beginner using Qt.
Until now I've developed using mostly (VB | C#) & .Net Framework.
I'm writing this post to ask for few suggestions.1 Unit tests
I'm trying to realize an example of a c++ library project with the related unit tests.
I'd like to know which is the best way to keep separated the library and the tests?
Is there any good example of unit testing (I mean something more complicated respect the ones in the tutorials)?2 Code versioning for cross-plartrom deploy
I've planed to deploy an application on Windows7 and MacOSx.
My idea is to use svn to keep the source code sincronized on two computers (win & mac) and to deploy the application on each of them.
Is this a good idea?
Are there other ways to deploy on two platforms?- I'm looking for a good book to use as a reference for Qt Libraries.
Can someone suggest me a good book.
Thanks in advance
Boris - I'm looking for a good book to use as a reference for Qt Libraries.
-
Referencing to the points 2 and 3:
-
It's the best idea. I am using a svn server as repository to control versions. As example, I use one laptop with Mandriva, another pc with W7 and a virtual machine with XP for testing.
-
There are two good books for Qt that can be you useful:
- C++ GUI Programming with Qt 4 (2nd Edition) (Jasmin Blanchette & Mark Summerfield)
- Advanced Qt Programming (Mark Summerfield)
-
-
You've problably found this, but I quite like the tutorial from docs: "QTestLib":http://qt-project.org/doc/qt-4.8/qtestlib-tutorial.html.
SVN is ok, although I would recommend git - it's better in almost every way.
Qt Project "books section":https://qt-project.org/books has a nice selection. There are no books on Qt5 and QML currently, all entries there are therefore about Qt < 4.7.0. They are still very good, of course, Qt5 is almost fully source-compatible.
-
Clarification on question 1:
The most important aim is to find a best practice to keep separated the library and the tests?Thanks to francescmm & sierdzio
-
Check out Qt sources: source code and test code are separated and using different QMake subproject trees.
-
Or see my "QtWebService":https://github.com/sierdzio/qtwebservice for a simpler and smaller code ;) Qt sources can be quite overwhelming.
-
I think that is mandatory, since the library could change and I think that the tests can be a separated console app or script.
-
I've downloaded QtWebService,
Now I start to study it ;)
@sierdzio & @francescmm - Thanks again -
[quote author="sierdzio" date="1368791150"]Or see my "QtWebService":https://github.com/sierdzio/qtwebservice for a simpler and smaller code ;) Qt sources can be quite overwhelming.[/quote]
@sierdzio
Great example !
Thanks a lot ;) -
@sierdzio
I'm trying to rebuild QtWebService using Qt 5.0 but I get some issues like "toAscii is not a member of QString"
Is there any workaround to solve this issue?
Thanks in advance
Boris -
I'm not working on this project anymore. toAscii() was removed in Qt5. You can change all occurrences to QString::toLatin1().
-
I've found a good introduction video at "this link":http://qt-project.org/videos/watch/introduction_to_automated_testing_for_qt_applications
Thanks to all
Boris