From 0377be2d0de7c75c423ca17f2a13d5050a40849e Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Mon, 6 Aug 2018 10:21:33 -0700 Subject: [PATCH] Can update test results in TestRail. --- tools/auto-tester/src/TestRailInterface.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/auto-tester/src/TestRailInterface.cpp b/tools/auto-tester/src/TestRailInterface.cpp index 53688187ac..93559490e5 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -583,6 +583,20 @@ void TestRailInterface::updateRunWithResults() { stream << "section = client.send_post('add_results_for_cases/' + str(" << runID << "), data)\n"; file.close(); + + if (QMessageBox::Yes == QMessageBox(QMessageBox::Information, "Python script has been created", + "Do you want to run the script and update TestRail?", + QMessageBox::Yes | QMessageBox::No).exec() + ) { + QProcess* process = new QProcess(); + connect(process, &QProcess::started, this, [=]() { _busyWindow.exec(); }); + + connect(process, static_cast(&QProcess::finished), this, + [=](int exitCode, QProcess::ExitStatus exitStatus) { _busyWindow.hide(); }); + + QStringList parameters = QStringList() << _outputDirectory + "/updateRunWithResults.py"; + process->start(_pythonCommand, parameters); + } } void TestRailInterface::updateSectionsComboData(int exitCode, QProcess::ExitStatus exitStatus) {