mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Working on updating test results.
This commit is contained in:
parent
e61a686923
commit
e5c0fa0af9
1 changed files with 14 additions and 3 deletions
|
@ -548,6 +548,10 @@ void TestRailInterface::updateRunWithResults() {
|
||||||
|
|
||||||
stream << "\tfailed_tests.add(failed_test)\n\n";
|
stream << "\tfailed_tests.add(failed_test)\n\n";
|
||||||
|
|
||||||
|
// Initialize the array of results that will be eventually used to update TestRail
|
||||||
|
stream << "status_ids = []\n";
|
||||||
|
stream << "case_ids = []\n";
|
||||||
|
|
||||||
int runID = _runIDs[_testRailResultsSelectorWindow.getRunID()];
|
int runID = _runIDs[_testRailResultsSelectorWindow.getRunID()];
|
||||||
stream << "tests = client.send_get('get_tests/" + QString::number(runID) + "')\n\n";
|
stream << "tests = client.send_get('get_tests/" + QString::number(runID) + "')\n\n";
|
||||||
stream << "for test in tests:\n";
|
stream << "for test in tests:\n";
|
||||||
|
@ -560,6 +564,10 @@ void TestRailInterface::updateRunWithResults() {
|
||||||
stream << "\tstatus_id = 1\n";
|
stream << "\tstatus_id = 1\n";
|
||||||
stream << "\tif test['title'] in failed_tests:\n";
|
stream << "\tif test['title'] in failed_tests:\n";
|
||||||
stream << "\t\tstatus_id = 5\n";
|
stream << "\t\tstatus_id = 5\n";
|
||||||
|
stream << "\tcase_id.append(test['case_id'])\n";
|
||||||
|
stream << "\tstatus_ids.append(status_id)\n";
|
||||||
|
|
||||||
|
// We can now update the test (note that all tests need to be updated
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
|
@ -1125,12 +1133,15 @@ void TestRailInterface::updateTestRailRunResults(const QString& testResults, con
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail will be updated after the process initiated by getTestRunFromTestRail has completed
|
// This is needed to access TestRail
|
||||||
getRunsFromTestRail();
|
createTestRailDotPyScript();
|
||||||
|
|
||||||
// Extract test failures from zipped folder
|
// Extract test failures from zipped folder
|
||||||
QString tempSubDirectory = tempDirectory + "/" + tempName;
|
QString tempSubDirectory = tempDirectory + "/" + tempName;
|
||||||
QDir dir = tempSubDirectory;
|
QDir dir = tempSubDirectory;
|
||||||
dir.mkdir(tempSubDirectory);
|
dir.mkdir(tempSubDirectory);
|
||||||
JlCompress::extractDir(testResults, tempSubDirectory);
|
JlCompress::extractDir(testResults, tempSubDirectory);
|
||||||
|
|
||||||
|
// TestRail will be updated after the process initiated by getTestRunFromTestRail has completed
|
||||||
|
getRunsFromTestRail();
|
||||||
}
|
}
|
Loading…
Reference in a new issue