Can testNG be used to automate testing a Qt Application - qt

I have a Qt Application. I want to know whether or not i can automate the testing using TestNG.
Do suggest, if there are any open source Automation tool available.(pls dont mention squish).
Thanks in advance.

You should use the test module provided by Qt proper to test Qt applications, really. It integrates well with the QObject hierarchy like signals, slots, et al, for which you would not have tight integration with TestNG.
Please see the official documentation for further details.

Related

Google Testing Framework and Qt

I want to start using the Google C++ Testing Framework, but I don't understand how it use with Qt?
What should I do to start? How to link GTF to my project and use it? If possible, I'd like a detailed guide.
There is nothing special about testing Qt in particular, just familiarize yourself with google testing and Qt, then write your test cases. You'd test Qt code like you'd test anything else.
Good places to start:
A quick introduction to the Google C++ Testing Framework courtesy of IBM
Getting Started with Qt
The one thing to keep in mind is that a significant part of Qt is event driven, which requires a running event loop.
Additional resources:
Running Autotests in Creator - setting up google test
the Qt Creator Google Test plugin
Edit:
To elaborate on Gluttton's comment, as evidently, other users share the sentiment:
The clarification about the design particularities of Qt should imply two things:
1 - in many cases, individual tests will require an above trivial setup, that is still standard Qt and C++, set up event loops and connections and whatnot - nothing special whatsoever.
2 - in some cases, there is only so much that unit testing can do. Some functionality requires larger and more complicated runtime setups, that are impractical or even impossible in the context of unit testing, thus falling outside of the scope of the google testing framework.

QtWebDriver for automation testing of Qt application

I faced with task to write test automation framework for Qt desktop application. I found one interesting open source solution - QtWebDriver.
Did some from you work with this tool?
What can you say about it? Or it'll be better to use commercial solution (e.g. Squish or Testcomplete)
One thing to take into account besides free/commercial aspects is integration with existing (open source) tools.
QtWebdriver integrates with Selenium, which is the de-facto standard for web automation.
This means:
If you have existing selenium tests you should be able to reuse them
You can also use selenium+QtWebdriver tests to automate qml/qwidgets
apps
You can benefit support from online selenium community as well

SQLite+ Embedded linux + Pygtk or QT/c++

I'm trying to build an application in my ARM9 (Freindly ARM) board that will get data via serial port and update the database.
Now I need to port SQLite in my embedded linux and write an application to store my values.
How to port SQLite to Embedded linux
Pygtk or Qt? Which is easy for a newbie ?
P.S: I know I'm asking a lot of questions in a single post, but I just thought giving the complete picture will help to give a better suggestion. If not personalized opinions, I'll be grateful if you guys can give me pointers to good links/tutorials. :) Thanks.
1.
You don't need to port sqlite to the your Freindly ARM ARMv9 board.(as Mat has already mentioned)
I am going to assume that you have a mini2440 or
a micro2440.
Either way it is a Samsung S3C2440 chip.
sqlite works on this board as per the following thread.
Sumeet's post has cross compliation instructions.
Qt cross compliation works as per the following thread
So does Python and Gtk.
You have 2 options when it comes to cross-compliation,
Cross compile yourself
Use a tool like buildroot or openembedded's bitbake
For further resources on cross-compliation and building packages for this board
see the following resources.
mini2440 Google Code Project, specifically see the wiki and download sections
FriendlyArm Forum
FriendlyArm Downloads
linuxmce mini2440 wiki page
HOWTO-Getting-Started-With-OpenEmbedded for mini2440
Further HOWTOs
2.
PyGTK and PyQt are both relatively easy to learn in comparison to learning and debugging cross compilation on embedded architectures. If by Qt you didn't mean PyQt but instead meant C++ and Qt, then it not only becomes a choice of GUI toolkit, but also of language. I don't know your familiarity with Python or with C++, so I don't know which would be easier for you.
Which one you want to use is up to you.
Resources for both are linked to below
PyQt4 Tutorial
PyGTK Tutorial

Guidance required for code generation tool

I am interested to write a GUI based tool which would generate code in return. Something similar to VB GUI interface or Xcode's Interface Builder. I am going to use QT tookkit which is cross platform.
Can you help me to point out some resources which could be helpful to make such tools?
Thanks
Qt creator comes with an integrated UI Designer. The designer can be used stand alone or integrated into Visual Studio as well.

What's the best agile toolchain for Qt?

I'm curious if anyone else has a good recommendation for a Qt friendly toolchain.
We're currently evaluating using The following:
Bug/Issue Tracking - Atlassian JIRA (already in use)
IDE - Qt Creator (already in use)
Code Coverage - gcov (are there easy ways to integrate this into the dev/CI environment?)
Unit Testing - QTestLib and Boost Test
Code Review - Either Atlassian Crucible (expensive) or ReviewBoard (free)
Nightly build/check-in build - Hudson, CruisControl or Atlassian Bamboo. Any advice?
Code Analysis/Style Checker - Vera++? CppCheck? Any suggestions?
Source Code monitoring - Atlassian Fisheye (only if we go with Crucible), ViewVC. Any advice?
Are there any other tools I should take a look at?
Thanks!
Bugs: Bugzilla
IDE: QtCreator but many people will hate you if you enforce the use of one ide over the other, specially if you have opensource developers.
Code Coverage: In order to use gcov for code coverage, your ci environment needs to build the software with appropriate set of flags and execute the code. Also do note that gcov itself does not do any reporting, you need something like lcov to then actually generate the statistics from gcov generated files.
NightlyBuilds: TeamCity, but if you have time to invest and you do want flexbility: BuildBot.
CodeReview: Review board is quite good.
A .pro based build framework will allow your developers to use their own preferred IDE
AQtime is a decent profiler and leak checker
SourceMonitor provides some nice metrics

Resources