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