Discussion:
Unit test framework
(too old to reply)
Himanshu Vishwakarma
2018-03-03 21:16:44 UTC
Permalink
Raw Message
Hi,

I am working on the software testing which has lots of files of .qml, .js
and .rcc( including .qrc) and some file of C++.

For the C++, using the QtTest libraries for the unit test and testing is
almost done. But another main part of the software is left which having the
code of QML, JavaScript and rcc( including .qrc). There the lots of GUI
testing the software.

please give me links blogs, tutorial or sample of the project (similar to
my project) where the unit testing is done. So I can learn and apply unit
testing.

Looking for the positive reply!

link to the project: https://github.com/gcompris/GCompris-qt
link to the project idea:
https://community.kde.org/GSoC/2018/Ideas#Project:_Unit_test_framework
--
Regards,
Himanshu Vishwakarma
Jason H
2018-03-04 01:37:21 UTC
Permalink
Raw Message
_______________________________________________
Interest mailing list
***@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
Himanshu Vishwakarma
2018-03-05 20:14:38 UTC
Permalink
Raw Message
I have to test the software, not by GUI I have to test the software have
lots of file qml and js, How I can test the file of js and qml through the
qt.

problem is in the testing of the javascript file.

How we connect them with the QtQuick QuickTest?

Above software is not free charging too much.
http://doc.qt.io/qt-5/qtquick-qtquicktest.html
But for GUI testing, I think FrogLogic has the only product to exerceise a
GUI.
*Sent:* Saturday, March 03, 2018 at 4:16 PM
*Subject:* [Interest] Unit test framework
Hi,
I am working on the software testing which has lots of files of .qml, .js
and .rcc( including .qrc) and some file of C++.
For the C++, using the QtTest libraries for the unit test and testing is
almost done. But another main part of the software is left which having the
code of QML, JavaScript and rcc( including .qrc). There the lots of GUI
testing the software.
please give me links blogs, tutorial or sample of the project (similar to
my project) where the unit testing is done. So I can learn and apply unit
testing.
Looking for the positive reply!
link to the project: https://github.com/gcompris/GCompris-qt
link to the project idea: https://community.kde.org/
GSoC/2018/Ideas#Project:_Unit_test_framework
--
Regards,
Himanshu Vishwakarma
_______________________________________________ Interest mailing list
mailman/listinfo/interest
--
Regards,
Himanshu Vishwakarma
Christian Gagneraud
2018-03-06 03:37:50 UTC
Permalink
Raw Message
Post by Himanshu Vishwakarma
I have to test the software, not by GUI I have to test the software have
lots of file qml and js, How I can test the file of js and qml through the
qt.
problem is in the testing of the javascript file.
How we connect them with the QtQuick QuickTest?
Above software is not free charging too much.
http://doc.qt.io/qt-5/qtquick-qtquicktest.html
But for GUI testing, I think FrogLogic has the only product to exerceise a
GUI.
I'm using squish at work for UI testing of Qt application, it's OK-ish
but not cheap.

You could maybe investigate if you can use part of gammaray for widget
book-keeping, and then use python/nose/behave for the test driving
part.

It is not clear to me what are you trying to achieve exactly, what is
your goal and/or task.

https://community.kde.org/GSoC/2018/Ideas#Project:_Unit_test_framework
is talking about unit tests.

I think it will be difficult to uit test QML+js, maybe you need a mix
of unit and GUI test, eg by creating ad-hoc simple GUI (that use only
one or 2 QML components) and then verified their behavior.

Interesting project BTW.

Chris
Himanshu Vishwakarma
2018-03-09 05:35:50 UTC
Permalink
Raw Message
Hi,

Thanks for your response.

Actually, I am a beginner in the qt and C++.
and I am participating in this GSoC where I have to unit testing of
software GCompris:
https://community.kde.org/GSoC/2018/Ideas#Project:_Unit_test_framework

I have certain question rise after doing much research. please the
clear my confusion.

Q1. A squish is a software by which we can test the software
graphically i.e. in GUI mode ?? please comments...

Q2. If yes, there must be alternative by we can test the software in
non-GUI mode also. If yes, then what are the methods??

Q4. One commit is done by me to my KDE project(same)
https://github.com/gcompris/GCompris-qt/commit/ed5237519dd0d9ee90828e6daa60b633bf1360d4
it is based on the QtTest of C++ part, same way can I write more test
by Qt Quick Test of qml/js part of my project. please comments...


Q3. There are some projects where the unit testing is happening. can
these things can I apply to our project also. What are your
suggestions??
Project1: https://github.com/papyros/qml-material
Project2: https://github.com/yunit-io/yunit-old


--
Regards,
Himanshu Vishwakarma
Post by Christian Gagneraud
Post by Himanshu Vishwakarma
I have to test the software, not by GUI I have to test the software have
lots of file qml and js, How I can test the file of js and qml through the
qt.
problem is in the testing of the javascript file.
How we connect them with the QtQuick QuickTest?
Above software is not free charging too much.
http://doc.qt.io/qt-5/qtquick-qtquicktest.html
But for GUI testing, I think FrogLogic has the only product to exerceise a
GUI.
I'm using squish at work for UI testing of Qt application, it's OK-ish
but not cheap.
You could maybe investigate if you can use part of gammaray for widget
book-keeping, and then use python/nose/behave for the test driving
part.
It is not clear to me what are you trying to achieve exactly, what is
your goal and/or task.
https://community.kde.org/GSoC/2018/Ideas#Project:_Unit_test_framework
is talking about unit tests.
I think it will be difficult to uit test QML+js, maybe you need a mix
of unit and GUI test, eg by creating ad-hoc simple GUI (that use only
one or 2 QML components) and then verified their behavior.
Interesting project BTW.
Chris
Christian Gagneraud
2018-03-09 10:33:18 UTC
Permalink
Raw Message
Post by Himanshu Vishwakarma
Hi,
Thanks for your response.
Actually, I am a beginner in the qt and C++.
and I am participating in this GSoC where I have to unit testing of
https://community.kde.org/GSoC/2018/Ideas#Project:_Unit_test_framework
I have certain question rise after doing much research. please the
clear my confusion.
Q1. A squish is a software by which we can test the software
graphically i.e. in GUI mode ?? please comments...
Squish is a GUI testing framework, it allows you to write BDD
(Behaviour driven development) tests.

Random example:

Given a brand new install of gcompris
When a user runs gcompris
Then the user should see a 'whatever' dialog
When the user selects 'answer' in the 'whatever' dropbox
And the user clicks 'Next'
Then the user should see the 'home' activity screen

This is not something invented by Squish, they just provide an
implementation of a well known methodology.
Post by Himanshu Vishwakarma
Q2. If yes, there must be alternative by we can test the software in
non-GUI mode also. If yes, then what are the methods??
Please specify what you mean by GUI vs non-GUI, you do not need a
physical screen to test a GUI.
Similar thing are done with Selenium for testing web apps for example.
Post by Himanshu Vishwakarma
Q4. One commit is done by me to my KDE project(same)
https://github.com/gcompris/GCompris-qt/commit/ed5237519dd0d9ee90828e6daa60b633bf1360d4
it is based on the QtTest of C++ part, same way can I write more test
by Qt Quick Test of qml/js part of my project. please comments...
Not sure to understand what's the goal of this test, but it looks like
a unit test, as you're testing an Application Programming Interface
(API), not a Graphical User interface (GUI)
Post by Himanshu Vishwakarma
Q3. There are some projects where the unit testing is happening. can
these things can I apply to our project also. What are your
suggestions??
Project1: https://github.com/papyros/qml-material
Project2: https://github.com/yunit-io/yunit-old
Don't know, please express your problem/question in more than a line.
It is OK to write 20 lines before asking a question as it gives
readers a context on what you're trying to achieve.


Chris
Konrad Rosenbaum
2018-03-09 13:25:43 UTC
Permalink
Raw Message
Hi,
Post by Himanshu Vishwakarma
I have certain question rise after doing much research. please the
clear my confusion.
I can clearly see the confusion...

..let's see whether we can clear some things up! ;-)
Post by Himanshu Vishwakarma
Q1. A squish is a software by which we can test the software
graphically i.e. in GUI mode ?? please comments...
You misunderstand "GUI Test" - it's not a (unit) test framework displaying
results in a GUI, but rather it is a framework that is supposed to test
the GUI of the application under test. Squish can actually run automated
without its own GUI and use a virtual (invisible) screen/terminal to
"display" the application being tested.

Please try to read up on the many different kinds of tests that exist in
the software engineering field. Just to give you some key words you can
type into Google/Wikipedia/whatever:

* white box vs. black box tests
* unit tests
* integration tests
* system tests
* GUI tests
* manual vs. automated tests
* data driven tests
* behavior driven tests
* usability tests
* A/B tests
* test driven development
etc.

Once you've gotten an overview of the width and breadth of testing you may
be better able to discern where in this spectrum your project lies.
Post by Himanshu Vishwakarma
Q2. If yes, there must be alternative by we can test the software in
non-GUI mode also. If yes, then what are the methods??
There are dozens, if not hundreds of test frameworks out there. Just for
GUI Test frameworks see (1).

(1) https://en.wikipedia.org/wiki/Comparison_of_GUI_testing_tools

Most of them have at least an automatable non-GUI mode and some have an
additional GUI mode.

For Qt based applications/libraries the most commonly used tools are the
built in QtTest module for unit tests and Squish for GUI tests.

There are of course others, but those are the two most of us "senior Qt
citizens" are familiar with and both of them are conveniently automatable.



Konrad
Himanshu Vishwakarma
2018-03-20 18:28:22 UTC
Permalink
Raw Message
Hi,

Thanks to all for helping. : )

On Tue, Mar 20, 2018 at 6:16 PM, Himanshu Vishwakarma
Hi,
Thanks to all for helping. : )
Post by Konrad Rosenbaum
Hi,
Post by Himanshu Vishwakarma
I have certain question rise after doing much research. please the
clear my confusion.
I can clearly see the confusion...
..let's see whether we can clear some things up! ;-)
Post by Himanshu Vishwakarma
Q1. A squish is a software by which we can test the software
graphically i.e. in GUI mode ?? please comments...
You misunderstand "GUI Test" - it's not a (unit) test framework displaying
results in a GUI, but rather it is a framework that is supposed to test
the GUI of the application under test. Squish can actually run automated
without its own GUI and use a virtual (invisible) screen/terminal to
"display" the application being tested.
Please try to read up on the many different kinds of tests that exist in
the software engineering field. Just to give you some key words you can
* white box vs. black box tests
* unit tests
* integration tests
* system tests
* GUI tests
* manual vs. automated tests
* data driven tests
* behavior driven tests
* usability tests
* A/B tests
* test driven development
etc.
Once you've gotten an overview of the width and breadth of testing you may
be better able to discern where in this spectrum your project lies.
Post by Himanshu Vishwakarma
Q2. If yes, there must be alternative by we can test the software in
non-GUI mode also. If yes, then what are the methods??
There are dozens, if not hundreds of test frameworks out there. Just for
GUI Test frameworks see (1).
(1) https://en.wikipedia.org/wiki/Comparison_of_GUI_testing_tools
Most of them have at least an automatable non-GUI mode and some have an
additional GUI mode.
For Qt based applications/libraries the most commonly used tools are the
built in QtTest module for unit tests and Squish for GUI tests.
There are of course others, but those are the two most of us "senior Qt
citizens" are familiar with and both of them are conveniently automatable.
Konrad
_______________________________________________
Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
--
Regards,
Himanshu Vishwakarma
--
Regards,
Himanshu Vishwakarma
Loading...