mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-14 11:46:56 +02:00
WIP - add results to runs.
This commit is contained in:
parent
c8eca5e308
commit
66391c2d64
7 changed files with 53 additions and 8 deletions
|
@ -132,9 +132,7 @@ void Test::appendTestResultsToFile(const QString& _testResultsFolderPath, TestFa
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
QString err = QString::number(testFailure._error).left(6);
|
||||
|
||||
QString failureFolderPath { _testResultsFolderPath + "/" + err + "-Failure_" + QString::number(_index) + "--" + testFailure._actualImageFilename.left(testFailure._actualImageFilename.length() - 4) };
|
||||
QString failureFolderPath { _testResultsFolderPath + "/Failure_" + QString::number(_index) + "--" + testFailure._actualImageFilename.left(testFailure._actualImageFilename.length() - 4) };
|
||||
if (!QDir().mkdir(failureFolderPath)) {
|
||||
QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), "Failed to create folder " + failureFolderPath);
|
||||
exit(-1);
|
||||
|
@ -860,6 +858,16 @@ void Test::createTestRailRun() {
|
|||
_testRailInterface.createTestRailRun(outputDirectory);
|
||||
}
|
||||
|
||||
void Test::updateTestRailRunResult() {
|
||||
QString testResults = QFileDialog::getOpenFileName(nullptr, "Please select the zipped test results to update from", nullptr,
|
||||
"Zipped Test Results (*.zip)");
|
||||
|
||||
QString tempDirectory = QFileDialog::getExistingDirectory(nullptr, "Please select a folder to store temporary files in",
|
||||
nullptr, QFileDialog::ShowDirsOnly);
|
||||
|
||||
_testRailInterface.updateTestRailRunResults(testResults, tempDirectory);
|
||||
}
|
||||
|
||||
QStringList Test::createListOfAll_imagesInDirectory(const QString& imageFormat, const QString& pathToImageDirectory) {
|
||||
_imageDirectory = QDir(pathToImageDirectory);
|
||||
QStringList nameFilters;
|
||||
|
|
|
@ -51,14 +51,16 @@ public:
|
|||
void createRecursiveScript(const QString& topLevelDirectory, bool interactiveMode);
|
||||
|
||||
void createTests();
|
||||
|
||||
void createTestsOutline();
|
||||
|
||||
void createMDFile();
|
||||
void createAllMDFiles();
|
||||
void createMDFile(const QString& topLevelDirectory);
|
||||
|
||||
void createTestsOutline();
|
||||
|
||||
void createTestRailTestCases();
|
||||
void createTestRailRun();
|
||||
void updateTestRailRunResult();
|
||||
|
||||
bool compareImageLists(bool isInteractiveMode, QProgressBar* progressBar);
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
#include "TestRailInterface.h"
|
||||
#include "Test.h"
|
||||
|
||||
#include <quazip5/quazip.h>
|
||||
#include <quazip5/JlCompress.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
|
@ -919,4 +922,12 @@ void TestRailInterface::createTestRailRun(const QString& outputDirectory) {
|
|||
|
||||
// TestRail will be updated after the process initiated by getTestCasesFromTestRail has completed
|
||||
getTestSectionsFromTestRail();
|
||||
}
|
||||
|
||||
|
||||
void TestRailInterface::updateTestRailRunResults(const QString& testResults, const QString& tempDirectory) {
|
||||
QString tempSubDirectory = tempDirectory + "/" + tempName;
|
||||
QDir dir = tempSubDirectory;
|
||||
dir.mkdir(tempSubDirectory);
|
||||
JlCompress::extractDir(testResults, tempSubDirectory);
|
||||
}
|
|
@ -79,6 +79,7 @@ public:
|
|||
void updateSectionsComboData(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
|
||||
void createTestRailRun(const QString& outputDirectory);
|
||||
void updateTestRailRunResults(const QString& testResults, const QString& tempDirectory);
|
||||
|
||||
void addRun();
|
||||
|
||||
|
@ -115,6 +116,8 @@ private:
|
|||
|
||||
QStringList _sectionNames;
|
||||
std::vector<int> _sectionIDs;
|
||||
|
||||
QString tempName{ "fgadhcUDHSFaidsfh3478JJJFSDFIUSOEIrf" };
|
||||
};
|
||||
|
||||
#endif
|
|
@ -76,6 +76,10 @@ void AutoTester::on_createTestRailRunButton_clicked() {
|
|||
_test->createTestRailRun();
|
||||
}
|
||||
|
||||
void AutoTester::on_updateTestRailRunResultsButton_clicked() {
|
||||
_test->updateTestRailRunResult();
|
||||
}
|
||||
|
||||
// To toggle between show and hide
|
||||
// if (uState & ABS_AUTOHIDE) on_showTaskbarButton_clicked();
|
||||
// else on_hideTaskbarButton_clicked();
|
||||
|
|
|
@ -42,11 +42,15 @@ private slots:
|
|||
void on_createRecursiveScriptButton_clicked();
|
||||
void on_createAllRecursiveScriptsButton_clicked();
|
||||
void on_createTestsButton_clicked();
|
||||
|
||||
void on_createMDFileButton_clicked();
|
||||
void on_createAllMDFilesButton_clicked();
|
||||
|
||||
void on_createTestsOutlineButton_clicked();
|
||||
|
||||
void on_createTestRailTestCasesButton_clicked();
|
||||
void on_createTestRailRunButton_clicked();
|
||||
void on_updateTestRailRunResultsButton_clicked();
|
||||
|
||||
void on_hideTaskbarButton_clicked();
|
||||
void on_showTaskbarButton_clicked();
|
||||
|
|
|
@ -234,7 +234,7 @@
|
|||
<rect>
|
||||
<x>410</x>
|
||||
<y>100</y>
|
||||
<width>140</width>
|
||||
<width>161</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -275,8 +275,8 @@
|
|||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>180</y>
|
||||
<width>140</width>
|
||||
<y>160</y>
|
||||
<width>161</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -284,6 +284,19 @@
|
|||
<string>Create TestRail Run</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="updateTestRailRunResultsButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>220</y>
|
||||
<width>161</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Update TestRail Run Results</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
|
|
Loading…
Reference in a new issue