diff --git a/tools/auto-tester/src/TestRailInterface.cpp b/tools/auto-tester/src/TestRailInterface.cpp index 8081b68f78..bedc8d2138 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -926,6 +926,7 @@ void TestRailInterface::createTestRailRun(const QString& outputDirectory) { void TestRailInterface::updateTestRailRunResults(const QString& testResults, const QString& tempDirectory) { + // Extract test failures from zipped folder QString tempSubDirectory = tempDirectory + "/" + tempName; QDir dir = tempSubDirectory; dir.mkdir(tempSubDirectory); diff --git a/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.cpp b/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.cpp new file mode 100644 index 0000000000..65a136d13f --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.cpp @@ -0,0 +1,104 @@ +// +// TestRailResultsSelectorWindow.cpp +// +// Created by Nissim Hadar on 2 Aug 2017. +// Copyright 2013 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +#include "TestRailResultsSelectorWindow.h" + +#include + +#include + +TestRailResultsSelectorWindow::TestRailResultsSelectorWindow(QWidget *parent) { + setupUi(this); + + projectIDLineEdit->setValidator(new QIntValidator(1, 999, this)); +} + + +void TestRailResultsSelectorWindow::reset() { + urlLineEdit->setDisabled(false); + userLineEdit->setDisabled(false); + passwordLineEdit->setDisabled(false); + projectIDLineEdit->setDisabled(false); + + OKButton->setDisabled(true); + + releasesLabel->setDisabled(true); + releasesComboBox->setDisabled(true); +} + +void TestRailResultsSelectorWindow::on_acceptButton_clicked() { + urlLineEdit->setDisabled(true); + userLineEdit->setDisabled(true); + passwordLineEdit->setDisabled(true); + projectIDLineEdit->setDisabled(true); + + OKButton->setDisabled(false); + + releasesLabel->setDisabled(false); + releasesComboBox->setDisabled(false); + close(); +} + +void TestRailResultsSelectorWindow::on_OKButton_clicked() { + userCancelled = false; + close(); +} + +void TestRailResultsSelectorWindow::on_cancelButton_clicked() { + userCancelled = true; + close(); +} + +bool TestRailResultsSelectorWindow::getUserCancelled() { + return userCancelled; +} + +void TestRailResultsSelectorWindow::setURL(const QString& user) { + urlLineEdit->setText(user); +} + +QString TestRailResultsSelectorWindow::getURL() { + return urlLineEdit->text(); +} + +void TestRailResultsSelectorWindow::setUser(const QString& user) { + userLineEdit->setText(user); +} + +QString TestRailResultsSelectorWindow::getUser() { + return userLineEdit->text(); +} + +QString TestRailResultsSelectorWindow::getPassword() { + return passwordLineEdit->text(); +} + +void TestRailResultsSelectorWindow::setProjectID(const int project) { + projectIDLineEdit->setText(QString::number(project)); +} + +int TestRailResultsSelectorWindow::getProjectID() { + return projectIDLineEdit->text().toInt(); +} + +void TestRailResultsSelectorWindow::setSuiteID(const int project) { + suiteIDLineEdit->setText(QString::number(project)); +} + +int TestRailResultsSelectorWindow::getSuiteID() { + return suiteIDLineEdit->text().toInt(); +} + +void TestRailResultsSelectorWindow::updateReleasesComboBoxData(QStringList data) { + releasesComboBox->insertItems(0, data); +} + +int TestRailResultsSelectorWindow::getReleaseID() { + return releasesComboBox->currentIndex(); +} \ No newline at end of file diff --git a/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.h b/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.h new file mode 100644 index 0000000000..2c8f18034a --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.h @@ -0,0 +1,50 @@ +// +// TestRailResultsSelectorWindow.h +// +// Created by Nissim Hadar on 2 Aug 2017. +// Copyright 2013 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +#ifndef hifi_TestRailResultsSelectorWindow_h +#define hifi_TestRailResultsSelectorWindow_h + +#include "ui_TestRailResultsSelectorWindow.h" + +class TestRailResultsSelectorWindow : public QDialog, public Ui::TestRailResultsSelectorWindow { + Q_OBJECT + +public: + TestRailResultsSelectorWindow(QWidget* parent = Q_NULLPTR); + + void reset(); + + bool getUserCancelled(); + + void setURL(const QString& user); + QString getURL(); + + void setUser(const QString& user); + QString getUser(); + + QString getPassword(); + + void setProjectID(const int project); + int getProjectID(); + + void setSuiteID(const int project); + int getSuiteID(); + + bool userCancelled{ false }; + + void updateReleasesComboBoxData(QStringList data); + int getReleaseID(); + +private slots: + void on_acceptButton_clicked(); + void on_OKButton_clicked(); + void on_cancelButton_clicked(); +}; + +#endif \ No newline at end of file diff --git a/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.ui b/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.ui new file mode 100644 index 0000000000..c7664518b0 --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailResultsSelectorWindow.ui @@ -0,0 +1,280 @@ + + + TestRailResultsSelectorWindow + + + + 0 + 0 + 489 + 474 + + + + TestRail Test Case Selector Window + + + + + 30 + 850 + 500 + 28 + + + + + 12 + + + + similarity + + + + + + 70 + 125 + 121 + 20 + + + + + 10 + + + + TestRail Password + + + + + + 70 + 25 + 121 + 20 + + + + + 10 + + + + TestRail URL + + + + + false + + + + 120 + 420 + 93 + 28 + + + + OK + + + + + + 280 + 420 + 93 + 28 + + + + Cancel + + + + + + 200 + 120 + 231 + 24 + + + + QLineEdit::Password + + + + + + 70 + 75 + 121 + 20 + + + + + 10 + + + + TestRail User + + + + + + 200 + 170 + 231 + 24 + + + + QLineEdit::Normal + + + + + + 70 + 175 + 121 + 20 + + + + + 10 + + + + TestRail Project ID + + + + + + 200 + 270 + 231 + 28 + + + + Accept + + + + + false + + + + 270 + 350 + 161 + 22 + + + + + + true + + + + 80 + 350 + 181 + 20 + + + + + 10 + + + + TestRail Added for release + + + + + + 200 + 20 + 231 + 24 + + + + QLineEdit::Normal + + + + + + 200 + 70 + 231 + 24 + + + + QLineEdit::Normal + + + + + + 200 + 215 + 231 + 24 + + + + QLineEdit::Normal + + + + + + 70 + 220 + 121 + 20 + + + + + 10 + + + + TestRail Suite ID + + + + + + urlLineEdit + userLineEdit + passwordLineEdit + projectIDLineEdit + suiteIDLineEdit + acceptButton + releasesComboBox + OKButton + cancelButton + + + +