diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-09-06 12:43:16 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-09-13 14:40:52 +0000 |
commit | 215c0145be7119a0e885ff95a17ee7aebd17ad12 (patch) | |
tree | b35ca53e4d3792ccb28a80a97ff75a1d41cbc4c8 /src/quick/doc/snippets | |
parent | 7236b0dfdb9ae805f4ba595def2b696859aa3613 (diff) |
qmltest: Enumerate test cases / functions without evaluating QML
Most, if not all, QML tests are written without any sort of dynamic
instantiation of the test data, so doing view.setSource() will evaluate
the whole source file, compute bindings, create items, windows, etc.
This is less then ideal when all you want is to list the test functions
using -functions, or when running a single test from the command line,
as in both cases we'll still actually evaluate every single QML file.
This makes it really hard to evaluate test output, e.g. from the CI,
especially with logging enabled, as even if a single test is requested,
the logs are filled with results from the loading of the other tests.
To improve the situation we use a non-instantiated QML component that
we then inspect its compilation data, looking for test cases and
functions.
In the future the implementation of TestCase's qtest_run* machinery
should be built on top of QTestLib instead of being reimplemented in
JavaScript, but this is left for later.
Change-Id: Ie5448208daf786e335583ab6bdfbc195891ec1f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/doc/snippets')
0 files changed, 0 insertions, 0 deletions