[Development] Breaking QtQuickControls tests

Van Looy Detlev detlev.vanlooy at student.uantwerpen.be
Sun May 31 14:08:22 CEST 2015


Hello.

For a project I am doing I need a repository which has .qml tests, it seems that (from the Qt sources) QtQuickControls should fit my needs. When running tst_controls (/Qt5.4.1/5.4/Src/qtquickcontrols/tests/auto/controls), all 501 test cases pass.

What I want to do now is break (make fail) some of these test cases by changing some source .qml files in /Qt5.4.1/5.4/Src/qtquickcontrols/src/controls. So for example break tst_Slider.qml by changing some code from Slider.qml. However it seems no matter what I do to these source files, the tests always continue to pass unaffected.

After some examination I found that no calls are actually ever being made to these source files, but rather they are being made to /Qt5.4.1/5.4/gcc/qml/QtQuick/Controls.

So my question is: Is it possible to make these tests fail by changing the source files I mentioned? How are the source files used in the tests?

I have had some success by forcing the use of the source files, so for example changing:

from:
var slider = Qt.createQmlObject('import QtQuick.Controls 1.2; Slider { }', container, '');

to:
var component = Qt.createComponent("../../../../src/controls/Slider.qml");
var slider = component.createObject(container, {});

And I was planning on using this fix for every test case, however this does not work for certain cases. I am also unable to just use:
var slider = Qt.createQmlObject('import QtQuick.Controls 1.2; import "../../../../src/controls/" Slider { }', container, '');

because this gives me errors:
qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
Qt.createQmlObject(): Component is not ready

If you can tell me what I am doing wrong in my createQmlObject statement, that would be helpful as well!

Regards,
Detlev

PS: If anyone knows about any other (OS) projects which have an amount of .qml tests please let me know!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150531/660628c2/attachment.html>


More information about the Development mailing list