Changeset 846 for trunk/doc/src/development/qtestlib.qdoc
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/doc/src/development/qtestlib.qdoc
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 7 7 ** This file is part of the documentation of the Qt Toolkit. 8 8 ** 9 ** $QT_BEGIN_LICENSE: LGPL$9 ** $QT_BEGIN_LICENSE:FDL$ 10 10 ** Commercial Usage 11 11 ** Licensees holding valid Qt Commercial licenses may use this file in 12 12 ** accordance with the Qt Commercial License Agreement provided with the 13 ** Software or, alternatively, in accordance with the terms contained in 14 ** awritten agreement between you and Nokia.13 ** Software or, alternatively, in accordance with the terms contained in a 14 ** written agreement between you and Nokia. 15 15 ** 16 ** GNU Lesser General Public License Usage 17 ** Alternatively, this file may be used under the terms of the GNU Lesser 18 ** General Public License version 2.1 as published by the Free Software 19 ** Foundation and appearing in the file LICENSE.LGPL included in the 20 ** packaging of this file. Please review the following information to 21 ** ensure the GNU Lesser General Public License version 2.1 requirements 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 ** 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 ** 28 ** GNU General Public License Usage 29 ** Alternatively, this file may be used under the terms of the GNU 30 ** General Public License version 3.0 as published by the Free Software 31 ** Foundation and appearing in the file LICENSE.GPL included in the 32 ** packaging of this file. Please review the following information to 33 ** ensure the GNU General Public License version 3.0 requirements will be 34 ** met: http://www.gnu.org/copyleft/gpl.html. 16 ** GNU Free Documentation License 17 ** Alternatively, this file may be used under the terms of the GNU Free 18 ** Documentation License version 1.3 as published by the Free Software 19 ** Foundation and appearing in the file included in the packaging of this 20 ** file. 35 21 ** 36 22 ** If you have questions regarding the use of this file, please contact … … 46 32 47 33 \ingroup frameworks-technologies 34 \ingroup qt-basic-concepts 35 48 36 \keyword qtestlib 49 37 … … 53 41 well as extensions for testing graphical user interfaces. 54 42 55 Table of contents:56 57 \tableofcontents58 59 43 \section1 QTestLib Features 60 44 … … 101 85 \endtable 102 86 103 Note:For higher-level GUI and application testing needs, please104 see the \l{ Third-Party Tools}{Qt testing products provided by105 Nokia partners }.87 \note For higher-level GUI and application testing needs, please 88 see the \l{Partner Directory} for Qt testing products provided by 89 Nokia partners. 106 90 107 91 … … 230 214 231 215 \section2 Creating a Benchmark 232 233 To create a benchmark, follow the instructions for cr ating a test and then add a216 217 To create a benchmark, follow the instructions for creating a test and then add a 234 218 QBENCHMARK macro to the test function that you want to benchmark. 235 219 236 220 \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 12 237 238 The code ins de the QBENCHMARK macro will be measured, and possibly also repeated221 222 The code inside the QBENCHMARK macro will be measured, and possibly also repeated 239 223 several times in order to get an accurate measurement. This depends on the selected 240 224 measurement back-end. Several back-ends are available. They can be selected on the 241 225 command line: 242 226 243 227 \target testlib-benchmarking-measurement 244 228 … … 260 244 \o All platforms 261 245 \endtable 262 246 263 247 In short, walltime is always available but requires many repetitions to 264 get a useful result. 265 Tick counters are usually available and can provide 266 results with fewer repetitions, but can be susceptible to CPU frequency 267 scaling issues. 248 get a useful result. 249 Tick counters are usually available and can provide 250 results with fewer repetitions, but can be susceptible to CPU frequency 251 scaling issues. 268 252 Valgrind provides exact results, but does not take 269 253 I/O waits into account, and is only available on a limited number of … … 272 256 that were received by the event loop before they are sent to their corresponding 273 257 targets (this might include non-Qt events). 274 258 275 259 \note Depending on the device configuration, Tick counters on the 276 260 Windows CE platform may not be as fine-grained, compared to other platforms. … … 281 265 282 266 \section1 Using QTestLib remotely on Windows CE 283 \c cetest is a convenience application which helps the user to launch an 267 \c cetest is a convenience application which helps the user to launch an 284 268 application remotely on a Windows CE device or emulator. 285 269 … … 337 321 cetest and QtRemote successfully. 338 322 339 Prior to \l{Installing Qt onWindows CE}{installation} of Qt, you need to set your323 Prior to \l{Installing Qt for Windows CE}{installation} of Qt, you need to set your 340 324 \c INCLUDE and \c LIB environment variables properly. 341 325 … … 351 335 The CPU tick counters used for benchmarking is licensed under the following 352 336 license: (from src/testlib/3rdparty/cycle.h) 353 337 354 338 \legalese 355 339 Copyright (c) 2003, 2006 Matteo Frigo\br … … 382 366 \contentspage QTestLib Manual 383 367 \nextpage {Chapter 1: Writing a Unit Test}{Chapter 1} 368 \ingroup best-practices 384 369 385 370 \title QTestLib Tutorial 386 371 387 372 This tutorial gives a short introduction to how to use some of the 388 features of the QTestLib framework. It is divided into f our373 features of the QTestLib framework. It is divided into five 389 374 chapters: 390 375 … … 583 568 \example qtestlib/tutorial3 584 569 585 \previouspage {Chapter 2 Data Driven Testing}{Chapter 2}570 \previouspage {Chapter 2: Data Driven Testing}{Chapter 2} 586 571 \contentspage {QTestLib Tutorial}{Contents} 587 572 \nextpage {Chapter 4: Replaying GUI Events}{Chapter 4} … … 733 718 \section1 Writing a Benchmark 734 719 To create a benchmark we extend a test function with a QBENCHMARK macro. 735 A benchmark test function will then typically consist of setup code and 720 A benchmark test function will then typically consist of setup code and 736 721 a QBENCHMARK macro that contains the code to be measured. This test 737 722 function benchmarks QString::localeAwareCompare(). … … 739 724 \snippet examples/qtestlib/tutorial5/benchmarking.cpp 0 740 725 741 Setup can be done at the beginning of the function, the clock is not 726 Setup can be done at the beginning of the function, the clock is not 742 727 running at this point. The code inside the QBENCHMARK macro will be 743 measured, and possibly repeated several times in order to get an 728 measured, and possibly repeated several times in order to get an 744 729 accurate measurement. 745 730 … … 749 734 \section1 Data Functions 750 735 751 Data functions are useful for creating benchmarks that compare 736 Data functions are useful for creating benchmarks that compare 752 737 multiple data inputs, for example locale aware compare against standard 753 738 compare. … … 759 744 \snippet examples/qtestlib/tutorial5/benchmarking.cpp 2 760 745 761 The "if(useLocaleCompare)" switch is placed outside the QBENCHMARK 746 The "if(useLocaleCompare)" switch is placed outside the QBENCHMARK 762 747 macro to avoid measuring its overhead. Each benchmark test function 763 can have one active QBENCHMARK macro. 748 can have one active QBENCHMARK macro. 764 749 765 750 \section1 External Tools 766 751 767 752 Tools for handling and visualizing test data are available as part of 768 the \l {qtestlib-tools} project on the Qt Labs Web site. These include769 a tool for comparing performance data obtained from test runs and a 770 771 772 See the \l{qtestlib-tools Announcement} for more information on these773 tools and a simple graphing example.753 the \l {qtestlib-tools} project in the \l{Qt Labs} web site. 754 These include a tool for comparing performance data obtained from test 755 runs and a utility to generate Web-based graphs of performance data. 756 757 See the \l{qtestlib-tools Announcement}{qtestlib-tools announcement} 758 for more information on these tools and a simple graphing example. 774 759 775 760 */
Note:
See TracChangeset
for help on using the changeset viewer.