[go: up one dir, main page]

Menu

Tree [80c337] master / tests / qstestlib /
 History

HTTPS access


File Date Author Commit
 README 2013-06-12 Nathan Carter Nathan Carter [e53d11] Moving contents of Lurch subfolder out to main ...
 README_LURCH 2013-06-12 Nathan Carter Nathan Carter [e53d11] Moving contents of Lurch subfolder out to main ...
 mytest.html 2013-06-12 Nathan Carter Nathan Carter [e53d11] Moving contents of Lurch subfolder out to main ...
 mytest.js 2013-06-12 Nathan Carter Nathan Carter [e53d11] Moving contents of Lurch subfolder out to main ...
 qstestlib.js 2013-06-12 Nathan Carter Nathan Carter [e53d11] Moving contents of Lurch subfolder out to main ...
 run-tests.sh 2013-06-12 Nathan Carter Nathan Carter [e53d11] Moving contents of Lurch subfolder out to main ...
 testexec.js 2013-06-12 Nathan Carter Nathan Carter [e53d11] Moving contents of Lurch subfolder out to main ...

Read Me

QSTestLib, a tool for unit testing using Qt Script

Running a test with the stand-alone QtScript interpreter:

$QTDIR/examples/script/qscript/qscript qstestlib.js mytest.js testexec.js

Just replace "mytest.js" with your test script.

If you want to use QSTestLib from within your application,
pass the contents of qstestlib.js to QScriptEngine::evaluate(),
then prepare your test object and pass it as argument to the
script function QTest.exec().

The Firefox JS interpreter (SpiderMonkey) is also supported.
It should also work with other interpreters, but you might not
get location information (QSTestLib relies on parsing a non-standard
"stack" property of error objects, to figure out where e.g. qCompare()
was called from).

For usage and examples, see the documentation embedded in qstestlib.js