[Interest] Unit test framework

Christian Gagneraud chgans at gmail.com
Fri Mar 9 11:33:18 CET 2018

On 9 March 2018 at 18:35, Himanshu Vishwakarma <himvish997 at gmail.com> wrote:
> 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...

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.

> 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.

> 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)

> 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.


More information about the Interest mailing list