diff options
author | Robert Loehning <robert.loehning@digia.com> | 2013-09-09 12:34:00 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@digia.com> | 2013-09-09 13:50:01 +0200 |
commit | a22e2caadff90c73cd088d8f418987db75e9636a (patch) | |
tree | 3348737d84efd32f8ce5fd7a29b7ad33d3f240da /tests | |
parent | e8f5502b78d516b7b4bc47a53d21759416e318b2 (diff) | |
download | qt-creator-a22e2caadff90c73cd088d8f418987db75e9636a.tar.gz |
Squish: Added further sanity checks to tst_simple_analyze
Change-Id: I40adc90d4cb73ef4ba3d7c723953d272116e193a
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/suite_debugger/tst_simple_analyze/test.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index 2ffe25022a..6ebee1a1d3 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -89,6 +89,7 @@ def main(): "Internal::QV8ProfilerEventsMainView").model() test.compare(model.rowCount(), 0) if safeClickTab("Events"): + colPercent, colTotal, colCalls, colMean, colMedian, colLongest, colShortest = range(2, 9) model = waitForObject(":Events.QmlProfilerEventsTable_QmlProfiler::" "Internal::QmlProfilerEventsMainView").model() if qtVersion.startswith("5."): @@ -100,10 +101,18 @@ def main(): else: compareEventsTab(model, "events_qt47.tsv") numberOfMsRows = 2 - test.compare(dumpItems(model, column=2)[0], '100.00 %') - for i in [3, 5, 6, 7, 8]: + test.compare(dumpItems(model, column=colPercent)[0], '100.00 %') + for i in [colTotal, colMean, colMedian, colLongest, colShortest]: for item in dumpItems(model, column=i)[:numberOfMsRows]: test.verify(item.endswith(' ms')) + for row in range(model.rowCount()): + if str(model.index(row, colCalls).data()) == "1": + for col in [colMedian, colLongest, colShortest]: + test.compare(model.index(row, colMean).data(), model.index(row, col).data(), + "For just one call, no differences in execution time may be shown.") + elif str(model.index(row, colCalls).data()) == "2": + test.compare(model.index(row, colMedian).data(), model.index(row, colLongest).data(), + "For two calls, median and longest time must be the same.") deleteAppFromWinFW(workingDir, projectName, False) invokeMenuItem("File", "Exit") |