public
Description: A tool to generate autotest stubs for QTestLib and Qt classes
Homepage:
Clone URL: git://github.com/icefox/qautotestgenerator.git
name age message
file .gitignore Wed Jul 08 10:51:09 -0700 2009 Added submodule for rpp [AlekSi]
file .gitmodules Wed Jul 08 10:51:09 -0700 2009 Added submodule for rpp [AlekSi]
file README Wed Jul 08 10:56:19 -0700 2009 Update BUILDING section in README. [AlekSi]
directory example/ Thu Nov 08 07:48:10 -0800 2007 Add example class that can be used to generate ... [Benjamin Meyer]
file qautotestgenerator.pro Thu Nov 08 06:48:21 -0800 2007 Initial Commit [Benjamin Meyer]
submodule rpp - ddb4d26 Wed Jul 08 10:51:09 -0700 2009 Added submodule for rpp [AlekSi]
directory src/ Thu May 14 20:41:13 -0700 2009 Remove copyright stub as it will always be repl... [icefox]
README
qautotestgenerator is a tool to generate stub tests for a C++ class.  When writing tests for new code one of the more 
annoying parts is getting the initial file up and running.  qautotestgenerator helps by automatically creating quite a 
bit of stub code after which you just go through the file filling it in with the actual tests.

Some features include:
- Creates a stub tests for each non private function in the class.
- Creates a subclass for the class to expose any protected functions for testing.
- Creates a basic sanity test that just calls each function.
- Creates a _data() function for each test.
- Populates the _data() functions with columns for each argument and the return value.
- Adds QFETCH stub code that matches the generated _data function as a place to start from.
- Adds the four init and cleanup functions with documentation so you don't have to look up what does what.
- Adds signal spys to each tests if the class contains any signals.

To find out more about QTestLib check out its documentation at http://doc.trolltech.com/4.3/qtestlib-manual.html

========
BUILDING
========

git submodule init
git submodule update
qmake
make

=======
EXAMPLE
=======

In the example directory is a file example.h that contains a little class.  Execute the following to generate and build 
a test.

./qautotestgenerator example/example.h Example > example/tst_example.cpp
cd example
qmake -project
echo "CONFIG += qtestlib" >> example.pro
qmake
make