Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/doc/src/development/qtestlib.qdoc

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    77** This file is part of the documentation of the Qt Toolkit.
    88**
    9 ** $QT_BEGIN_LICENSE:LGPL$
     9** $QT_BEGIN_LICENSE:FDL$
    1010** Commercial Usage
    1111** Licensees holding valid Qt Commercial licenses may use this file in
    1212** accordance with the Qt Commercial License Agreement provided with the
    13 ** Software or, alternatively, in accordance with the terms contained in
    14 ** a written agreement between you and Nokia.
     13** Software or, alternatively, in accordance with the terms contained in a
     14** written agreement between you and Nokia.
    1515**
    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.
    3521**
    3622** If you have questions regarding the use of this file, please contact
     
    4632
    4733    \ingroup frameworks-technologies
     34    \ingroup qt-basic-concepts
     35
    4836    \keyword qtestlib
    4937
     
    5341    well as extensions for testing graphical user interfaces.
    5442
    55     Table of contents:
    56 
    57     \tableofcontents
    58 
    5943    \section1 QTestLib Features
    6044
     
    10185    \endtable
    10286
    103     Note: For higher-level GUI and application testing needs, please
    104     see the \l{Third-Party Tools}{Qt testing products provided by
    105     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.
    10690
    10791
     
    230214
    231215    \section2 Creating a Benchmark
    232    
    233     To create a benchmark, follow the instructions for crating a test and then add a
     216
     217    To create a benchmark, follow the instructions for creating a test and then add a
    234218    QBENCHMARK macro to the test function that you want to benchmark.
    235    
     219
    236220    \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 12
    237    
    238     The code insde the QBENCHMARK macro will be measured, and possibly also repeated
     221
     222    The code inside the QBENCHMARK macro will be measured, and possibly also repeated
    239223    several times in order to get an accurate measurement. This depends on the selected
    240224    measurement back-end. Several back-ends are available. They can be selected on the
    241225    command line:
    242    
     226
    243227    \target testlib-benchmarking-measurement
    244228
     
    260244         \o All platforms
    261245    \endtable
    262    
     246
    263247    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.
    268252    Valgrind provides exact results, but does not take
    269253    I/O waits into account, and is only available on a limited number of
     
    272256    that were received by the event loop before they are sent to their corresponding
    273257    targets (this might include non-Qt events).
    274        
     258
    275259    \note Depending on the device configuration, Tick counters on the
    276260     Windows CE platform may not be as fine-grained, compared to other platforms.
     
    281265
    282266    \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
    284268    application remotely on a Windows CE device or emulator.
    285269
     
    337321    cetest and QtRemote successfully.
    338322
    339     Prior to \l{Installing Qt on Windows CE}{installation} of Qt, you need to set your
     323    Prior to \l{Installing Qt for Windows CE}{installation} of Qt, you need to set your
    340324    \c INCLUDE and \c LIB environment variables properly.
    341325
     
    351335    The CPU tick counters used for benchmarking is licensed under the following
    352336    license: (from src/testlib/3rdparty/cycle.h)
    353                    
     337
    354338    \legalese
    355339    Copyright (c) 2003, 2006 Matteo Frigo\br
     
    382366    \contentspage QTestLib Manual
    383367    \nextpage {Chapter 1: Writing a Unit Test}{Chapter 1}
     368    \ingroup best-practices
    384369
    385370    \title QTestLib Tutorial
    386371
    387372    This tutorial gives a short introduction to how to use some of the
    388     features of the QTestLib framework. It is divided into four
     373    features of the QTestLib framework. It is divided into five
    389374    chapters:
    390375
     
    583568    \example qtestlib/tutorial3
    584569
    585     \previouspage {Chapter 2 Data Driven Testing}{Chapter 2}
     570    \previouspage {Chapter 2: Data Driven Testing}{Chapter 2}
    586571    \contentspage {QTestLib Tutorial}{Contents}
    587572    \nextpage {Chapter 4: Replaying GUI Events}{Chapter 4}
     
    733718    \section1 Writing a Benchmark
    734719    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
    736721    a QBENCHMARK macro that contains the code to be measured. This test
    737722    function benchmarks QString::localeAwareCompare().
     
    739724    \snippet examples/qtestlib/tutorial5/benchmarking.cpp 0
    740725
    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
    742727    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
    744729    accurate measurement.
    745730
     
    749734    \section1 Data Functions
    750735
    751     Data functions are useful for creating benchmarks that compare 
     736    Data functions are useful for creating benchmarks that compare
    752737    multiple data inputs, for example locale aware compare against standard
    753738    compare.
     
    759744    \snippet examples/qtestlib/tutorial5/benchmarking.cpp 2
    760745
    761     The "if(useLocaleCompare)" switch is placed outside the QBENCHMARK 
     746    The "if(useLocaleCompare)" switch is placed outside the QBENCHMARK
    762747    macro to avoid measuring its overhead. Each benchmark test function
    763     can have one active QBENCHMARK macro. 
     748    can have one active QBENCHMARK macro.
    764749
    765750    \section1 External Tools
    766751
    767752    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 include
    769     a tool for comparing performance data obtained from test runs and a
    770     utility to generate Web-based graphs of performance data.
    771 
    772     See the \l{qtestlib-tools Announcement} for more information on these
    773     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.
    774759
    775760*/
Note: See TracChangeset for help on using the changeset viewer.