mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:28:03 +02:00
Ready to update the run with the test results.
This commit is contained in:
parent
7ef3b27490
commit
dfa461b4f6
2 changed files with 20 additions and 11 deletions
|
@ -511,8 +511,10 @@ void TestRailInterface::addRun() {
|
||||||
process->start(_pythonCommand, parameters);
|
process->start(_pythonCommand, parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void TestRailInterface::updateRunWithResults() {
|
||||||
|
}
|
||||||
|
|
||||||
void TestRailInterface::updateSectionsComboData(int exitCode, QProcess::ExitStatus exitStatus) {
|
void TestRailInterface::updateSectionsComboData(int exitCode, QProcess::ExitStatus exitStatus) {(
|
||||||
// Quit if user has previously cancelled
|
// Quit if user has previously cancelled
|
||||||
if (_testRailRunSelectorWindow.getUserCancelled()) {
|
if (_testRailRunSelectorWindow.getUserCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
@ -619,7 +621,7 @@ void TestRailInterface::updateRunsComboData(int exitCode, QProcess::ExitStatus e
|
||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
// Update the combo
|
// Update the combo
|
||||||
_testRailResultsSelectorWindow.updateRunsComboBoxData(_sectionNames);
|
_testRailResultsSelectorWindow.updateRunsComboBoxData(_runNames);
|
||||||
|
|
||||||
_testRailResultsSelectorWindow.exec();
|
_testRailResultsSelectorWindow.exec();
|
||||||
|
|
||||||
|
@ -628,9 +630,8 @@ void TestRailInterface::updateRunsComboData(int exitCode, QProcess::ExitStatus e
|
||||||
}
|
}
|
||||||
|
|
||||||
// The test cases are now read from TestRail
|
// The test cases are now read from TestRail
|
||||||
// When this is complete, the Run can be created
|
// When this is complete, the Run can be updated
|
||||||
int sfg = 456;
|
updateRunWithResults();
|
||||||
//addRun();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestRailInterface::getReleasesFromTestRail() {
|
void TestRailInterface::getReleasesFromTestRail() {
|
||||||
|
@ -1006,8 +1007,8 @@ void TestRailInterface::getTestSectionsFromTestRail() {
|
||||||
process->start(_pythonCommand, parameters);
|
process->start(_pythonCommand, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestRailInterface::getRunFromTestRail() {
|
void TestRailInterface::getRunsFromTestRail() {
|
||||||
QString filename = _outputDirectory + "/getRun.py";
|
QString filename = _outputDirectory + "/getRuns.py";
|
||||||
if (QFile::exists(filename)) {
|
if (QFile::exists(filename)) {
|
||||||
QFile::remove(filename);
|
QFile::remove(filename);
|
||||||
}
|
}
|
||||||
|
@ -1015,7 +1016,7 @@ void TestRailInterface::getRunFromTestRail() {
|
||||||
|
|
||||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__),
|
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__),
|
||||||
"Could not create 'getRun.py'");
|
"Could not create " + filename);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1041,6 +1042,7 @@ void TestRailInterface::getRunFromTestRail() {
|
||||||
[=](int exitCode, QProcess::ExitStatus exitStatus) { updateRunsComboData(exitCode, exitStatus); });
|
[=](int exitCode, QProcess::ExitStatus exitStatus) { updateRunsComboData(exitCode, exitStatus); });
|
||||||
|
|
||||||
QStringList parameters = QStringList() << filename;
|
QStringList parameters = QStringList() << filename;
|
||||||
|
|
||||||
process->start(_pythonCommand, parameters);
|
process->start(_pythonCommand, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1063,12 +1065,18 @@ void TestRailInterface::createTestRailRun(const QString& outputDirectory) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestRailInterface::updateTestRailRunResults(const QString& testResults, const QString& tempDirectory) {
|
void TestRailInterface::updateTestRailRunResults(const QString& testResults, const QString& tempDirectory) {
|
||||||
if (requestTestRailResultsDataFromUser()) {
|
_outputDirectory = tempDirectory;
|
||||||
|
|
||||||
|
if (!setPythonCommand()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!requestTestRailResultsDataFromUser()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail will be updated after the process initiated by getTestRunFromTestRail has completed
|
// TestRail will be updated after the process initiated by getTestRunFromTestRail has completed
|
||||||
getRunFromTestRail();
|
getRunsFromTestRail();
|
||||||
|
|
||||||
// Extract test failures from zipped folder
|
// Extract test failures from zipped folder
|
||||||
QString tempSubDirectory = tempDirectory + "/" + tempName;
|
QString tempSubDirectory = tempDirectory + "/" + tempName;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
|
|
||||||
void getReleasesFromTestRail();
|
void getReleasesFromTestRail();
|
||||||
void getTestSectionsFromTestRail();
|
void getTestSectionsFromTestRail();
|
||||||
void getRunFromTestRail();
|
void getRunsFromTestRail();
|
||||||
|
|
||||||
void createTestRailDotPyScript();
|
void createTestRailDotPyScript();
|
||||||
void createStackDotPyScript();
|
void createStackDotPyScript();
|
||||||
|
@ -86,6 +86,7 @@ public:
|
||||||
void updateTestRailRunResults(const QString& testResults, const QString& tempDirectory);
|
void updateTestRailRunResults(const QString& testResults, const QString& tempDirectory);
|
||||||
|
|
||||||
void addRun();
|
void addRun();
|
||||||
|
void updateRunWithResults();
|
||||||
|
|
||||||
bool setPythonCommand();
|
bool setPythonCommand();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue