1
#include "tst_manualtestcase.h"
3
#include "testcaseexecutiondialog.h"
4
#include <QDialogButtonBox>
6
tst_manualtestcase::tst_manualtestcase(QObject *parent) :
12
void tst_manualtestcase::run() {
13
foreach (QString testcase, m_testCases) {
14
qDebug() << "Starting" << testcase;
15
qDebug() << "Loading data to QDeclarativeView";
16
QString testfile = testcase.split("_").takeAt(1) + ".qml";
18
if (test.open(QIODevice::ReadOnly)) {
19
QString testdata = test.readAll();
21
runTest(testcase,testdata,testfile);
26
void tst_manualtestcase::list() {
27
QDir currentDirectory = QDir::currentPath();
28
m_testCases = currentDirectory.entryList(QStringList() << "tst*.txt");
29
qDebug() << m_testCases;
32
void tst_manualtestcase::runTest(QString testcase, QString testdata, QString qmlFile) {
34
TestCaseExecutionDialog testcaseExecutor(testcase,testdata,QUrl::fromLocalFile(qmlFile));
36
int result = testcaseExecutor.exec();
39
qDebug() << testcase << "was PASSED";
43
qDebug() << testcase << "was FAILED!";
50
QTEST_MAIN(tst_manualtestcase)