diff --git a/tools/auto-tester/src/Test.cpp b/tools/auto-tester/src/Test.cpp index f708137305..93a71d0d28 100644 --- a/tools/auto-tester/src/Test.cpp +++ b/tools/auto-tester/src/Test.cpp @@ -821,7 +821,7 @@ void Test::createTestsOutline() { QMessageBox::information(0, "Success", "Test outline file " + testsOutlineFilename + " has been created"); } -void Test::createTestRailTestSuite() { +void Test::createTestRailTestCases() { QString previousSelection = _testDirectory; QString parent = previousSelection.left(previousSelection.lastIndexOf('/')); if (!parent.isNull() && parent.right(1) != "/") { @@ -854,6 +854,10 @@ void Test::createTestRailTestSuite() { } } +void Test::createTestRailRun() { + _testRailInterface.createTestRailRun(); +} + QStringList Test::createListOfAll_imagesInDirectory(const QString& imageFormat, const QString& pathToImageDirectory) { _imageDirectory = QDir(pathToImageDirectory); QStringList nameFilters; diff --git a/tools/auto-tester/src/Test.h b/tools/auto-tester/src/Test.h index 36b4cdd897..6d7506b738 100644 --- a/tools/auto-tester/src/Test.h +++ b/tools/auto-tester/src/Test.h @@ -57,7 +57,8 @@ public: void createTestsOutline(); - void createTestRailTestSuite(); + void createTestRailTestCases(); + void createTestRailRun(); bool compareImageLists(bool isInteractiveMode, QProgressBar* progressBar); diff --git a/tools/auto-tester/src/TestRailInterface.cpp b/tools/auto-tester/src/TestRailInterface.cpp index 948da59947..3161e4109c 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -11,27 +11,44 @@ #include "TestRailInterface.h" #include "Test.h" -#include "ui/TestRailSelectorWindow.h" - #include #include #include #include TestRailInterface::TestRailInterface() { - _testRailSelectorWindow.setModal(true); + _testRailTestCasesSelectorWindow.setURL("https://highfidelity.testrail.net"); + ////_testRailTestCasesSelectorWindow.setURL("https://nissimhadar.testrail.io"); + _testRailTestCasesSelectorWindow.setUser("@highfidelity.io"); + ////_testRailSelectorWindow.setUser("nissim.hadar@gmail.com"); - _testRailSelectorWindow.setURL("https://highfidelity.testrail.net/"); - _testRailSelectorWindow.setUser("@highfidelity.io"); + _testRailTestCasesSelectorWindow.setProjectID(INTERFACE_PROJECT_ID); + ////_testRailSelectorWindow.setProject(1); + + _testRailTestCasesSelectorWindow.setSuiteID(INTERFACE_SUITE_ID); + + _testRailRunSelectorWindow.setURL("https://highfidelity.testrail.net"); + ////_testRailRunSelectorWindow.setURL("https://nissimhadar.testrail.io"); + _testRailRunSelectorWindow.setUser("@highfidelity.io"); + ////_testRailSelectorWindow.setUser("nissim.hadar@gmail.com"); + + _testRailRunSelectorWindow.setProjectID(INTERFACE_PROJECT_ID); + ////_testRailSelectorWindow.setProject(1); + + _testRailRunSelectorWindow.setSuiteID(INTERFACE_SUITE_ID); } -void TestRailInterface::createTestRailDotPyScript(const QString& outputDirectory) { - // Create the testrail.py script - // This is the file linked to from http://docs.gurock.com/testrail-api2/bindings-python - QFile file(outputDirectory + "/testrail.py"); +QString TestRailInterface::getObject(const QString& path) { + return path.right(path.length() - path.lastIndexOf("/") - 1); +} + +// Creates the testrail.py script +// This is the file linked to from http://docs.gurock.com/testrail-api2/bindings-python +void TestRailInterface::createTestRailDotPyScript() { + QFile file(_outputDirectory + "/testrail.py"); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), - "Could not create \'testrail.py\'"); + "Could not create 'testrail.py'"); exit(-1); } @@ -118,10 +135,10 @@ void TestRailInterface::createTestRailDotPyScript(const QString& outputDirectory stream << "\n"; stream << "\t\tif e != None:\n"; stream << "\t\t\tif result and 'error' in result:\n"; - stream << "\t\t\t\terror = \'\"\' + result[\'error\'] + \'\"\'\n"; + stream << "\t\t\t\terror = '\"' + result['error'] + '\"'\n"; stream << "\t\t\telse:\n"; - stream << "\t\t\t\terror = \'No additional error message received\'\n"; - stream << "\t\t\traise APIError(\'TestRail API returned HTTP %s (%s)\' % \n"; + stream << "\t\t\t\terror = 'No additional error message received'\n"; + stream << "\t\t\traise APIError('TestRail API returned HTTP %s (%s)' % \n"; stream << "\t\t\t\t(e.code, error))\n"; stream << "\n"; stream << "\t\treturn result\n"; @@ -132,23 +149,132 @@ void TestRailInterface::createTestRailDotPyScript(const QString& outputDirectory file.close(); } -void TestRailInterface::requestDataFromUser() { - _testRailSelectorWindow.exec(); +// Creates a Stack class +void TestRailInterface::createStackDotPyScript() { + QString filename = _outputDirectory + "/stack.py"; + if (QFile::exists(filename)) { + QFile::remove(filename); + } + QFile file(filename); - if (_testRailSelectorWindow.getUserCancelled()) { + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), + "Could not create 'stack.py'"); + exit(-1); + } + + QTextStream stream(&file); + + stream << "class Stack:\n"; + + stream << "\tdef __init__(self):\n"; + stream << "\t\tself.items = []\n"; + stream << "\n"; + + stream << "\tdef is_empty(self):\n"; + stream << "\t\treturn self.items == []\n"; + stream << "\n"; + + stream << "\tdef push(self, item):\n"; + stream << "\t\tself.items.append(item)\n"; + stream << "\n"; + + stream << "\tdef pop(self):\n"; + stream << "\t\treturn self.items.pop()\n"; + stream << "\n"; + + stream << "\tdef peek(self):\n"; + stream << "\t\treturn self.items[len(self.items)-1]\n"; + stream << "\n"; + + stream << "\tdef size(self):\n"; + stream << "\t\treturn len(self.items)\n"; + stream << "\n"; + + file.close(); +} + +void TestRailInterface::requestTestRailTestCasesDataFromUser() { + // Make sure correct fields are enabled before calling + _testRailTestCasesSelectorWindow.reset(); + _testRailTestCasesSelectorWindow.exec(); + + if (_testRailTestCasesSelectorWindow.getUserCancelled()) { return; } - _url = _testRailSelectorWindow.getURL(); - _user = _testRailSelectorWindow.getUser(); - _password = _testRailSelectorWindow.getPassword(); + _url = _testRailTestCasesSelectorWindow.getURL() + "/"; + _user = _testRailTestCasesSelectorWindow.getUser(); + _password = _testRailTestCasesSelectorWindow.getPassword(); + ////_password = "tutKA76"; + _projectID = QString::number(_testRailTestCasesSelectorWindow.getProjectID()); + _suiteID = QString::number(_testRailTestCasesSelectorWindow.getSuiteID()); } -void TestRailInterface::createAddSectionsPythonScript(const QString& outputDirectory) { - QFile file(outputDirectory + "/addSections.py"); +bool TestRailInterface::isAValidTestDirectory(const QString& directory) { + if (Test::isAValidDirectory(directory)) { + // Ignore the utils and preformance directories + if (directory.right(QString("utils").length()) == "utils" || + directory.right(QString("performance").length()) == "performance") { + return false; + } + return true; + } + + return false; +} + +void TestRailInterface::processDirectoryPython(const QString& directory, + QTextStream& stream, + const QString& userGitHub, + const QString& branchGitHub +) { + // Loop over all entries in directory + QDirIterator it(directory.toStdString().c_str()); + while (it.hasNext()) { + QString nextDirectory = it.next(); + + QString objectName = getObject(nextDirectory); + + if (isAValidTestDirectory(nextDirectory)) { + // The name of the section is the directory at the end of the path + stream << "parent_id = parent_ids.peek()\n"; + stream << "data = { 'name': '" << objectName << "', 'suite_id': " + _suiteID + ", 'parent_id': parent_id }\n"; + + stream << "section = client.send_post('add_section/' + str(" << _projectID << "), data)\n"; + + // Now we push the parent_id, and recursively process each directory + stream << "parent_ids.push(section['id'])\n\n"; + processDirectoryPython(nextDirectory, stream, userGitHub, branchGitHub); + } else if (objectName == "test.js") { + processTestPython(nextDirectory, stream, userGitHub, branchGitHub); + } + } + + // pop the parent directory before leaving + stream << "parent_ids.pop()\n\n"; +} + + // A suite of TestRail test cases contains trees. +// The nodes of the trees are sections +// The leaves are the test cases +// +// Each node and leaf have an ID and a parent ID. +// Therefore, the tree is built top-down, using a stack to store the IDs of each node +// +void TestRailInterface::createAddTestCasesPythonScript(const QString& testDirectory, + const QString& userGitHub, + const QString& branchGitHub +) { + QString filename = _outputDirectory + "/addTestCases.py"; + if (QFile::exists(filename)) { + QFile::remove(filename); + } + QFile file(filename); + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), - "Could not create \'addSections.py\'"); + "Could not create 'addTestCases.py'"); exit(-1); } @@ -156,31 +282,177 @@ void TestRailInterface::createAddSectionsPythonScript(const QString& outputDirec // Code to access TestRail stream << "from testrail import *\n"; - stream << "client = APIClient(\'" << _url.toStdString().c_str() << "\')\n"; - stream << "client.user = \'" << _user << "\'\n"; - stream << "client.password = \'" << _password << "\'\n\n"; + stream << "client = APIClient('" << _url.toStdString().c_str() << "')\n"; + stream << "client.user = '" << _user << "'\n"; + stream << "client.password = '" << _password << "'\n\n"; + + stream << "from stack import *\n"; + stream << "parent_ids = Stack()\n\n"; // top-level section - stream << "data = { \'name\': \'" - << "Test Suite - " << QDateTime::currentDateTime().toString("yyyy-MM-ddTHH:mm") << "\'}\n"; + stream << "data = { 'name': '" + << "Test Suite - " << QDateTime::currentDateTime().toString("yyyy-MM-ddTHH:mm") + "', " + << "'suite_id': " + _suiteID + "}\n"; + + stream << "section = client.send_post('add_section/' + str(" << _projectID << "), data)\n"; + + // Now we push the parent_id, and recursively process each directory + stream << "parent_ids.push(section['id'])\n\n"; + processDirectoryPython(testDirectory, stream, userGitHub, branchGitHub); 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 + "/addTestCases.py"; + process->start(_pythonCommand, parameters); + } +} + +void TestRailInterface::updateMilestonesComboData(int exitCode, QProcess::ExitStatus exitStatus) { + // Quit if user has previously cancelled + if (_testRailTestCasesSelectorWindow.getUserCancelled()) { + return; + } + + // Check if process completed successfully + if (exitStatus != QProcess::NormalExit) { + QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), + "Could not get milestones from TestRail"); + exit(-1); + } + + // Create map of milestones from the file created by the process + _milestoneNames.clear(); + + QString filename = _outputDirectory + "/milestones.txt"; + if (!QFile::exists(filename)) { + QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), + "Could not find milestones.txt in " + _outputDirectory); + exit(-1); + } + + QFile file(filename); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), + "Could not open " + _outputDirectory + "/milestones.txt"); + exit(-1); + } + + QTextStream in(&file); + QString line = in.readLine(); + while (!line.isNull()) { + QStringList words = line.split(' '); + _milestones[words[0]] = words[1].toInt(); + _milestoneNames << words[0]; + + line = in.readLine(); + } + + file.close(); + + // Update the combo + _testRailTestCasesSelectorWindow.updateMilestoneComboBoxData(_milestoneNames); + + _testRailTestCasesSelectorWindow.exec(); + + if (_testRailTestCasesSelectorWindow.getUserCancelled()) { + return; + } + + createAddTestCasesPythonScript(_testDirectory, _userGitHub, _branchGitHub); +} + +void TestRailInterface::getMilestonesFromTestRail() { + QString filename = _outputDirectory + "/getMilestones.py"; + if (QFile::exists(filename)) { + QFile::remove(filename); + } + QFile file(filename); + + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), + "Could not create 'getMilestones.py'"); + exit(-1); + } + + QTextStream stream(&file); + + // Code to access TestRail + stream << "from testrail import *\n"; + stream << "client = APIClient('" << _url.toStdString().c_str() << "')\n"; + stream << "client.user = '" << _user << "'\n"; + stream << "client.password = '" << _password << "'\n\n"; + + // Print the list of uncompleted milestones + stream << "file = open('" + _outputDirectory + "/milestones.txt', 'w')\n\n"; + stream << "milestones = client.send_get('get_milestones/" + _projectID + "')\n"; + stream << "for milestone in milestones:\n"; + stream << "\tif milestone['is_completed'] == False:\n"; + stream << "\t\tfile.write(milestone['name'] + ' ' + str(milestone['id']) + '\\n')\n\n"; + stream << "file.close()\n"; + + file.close(); + + QProcess* process = new QProcess(); + connect(process, static_cast(&QProcess::finished), this, + [=](int exitCode, QProcess::ExitStatus exitStatus) { + updateMilestonesComboData(exitCode, exitStatus); + } + ); + + QStringList parameters = QStringList() << _outputDirectory + "/getMilestones.py "; + process->start(_pythonCommand, parameters); } void TestRailInterface::createTestSuitePython(const QString& testDirectory, const QString& outputDirectory, - const QString& user, - const QString& branch) { - - createTestRailDotPyScript(outputDirectory); - requestDataFromUser(); - createAddSectionsPythonScript(outputDirectory); - } + const QString& userGitHub, + const QString& branchGitHub) { + + _testDirectory = testDirectory; + _outputDirectory = outputDirectory; + _userGitHub = userGitHub; + _branchGitHub = branchGitHub; + + // First check that Python is available + if (QProcessEnvironment::systemEnvironment().contains("PYTHON_PATH")) { + QString _pythonPath = QProcessEnvironment::systemEnvironment().value("PYTHON_PATH"); + if (!QFile::exists(_pythonPath + "/" + pythonExe)) { + QMessageBox::critical(0, pythonExe, QString("Python executable not found in ") + _pythonPath); + } + _pythonCommand = _pythonPath + "/" + pythonExe; + } else { + QMessageBox::critical(0, "PYTHON_PATH not defined", "Please set PYTHON_PATH to directory containing the Python executable"); + return; + } + + requestTestRailTestCasesDataFromUser(); + createTestRailDotPyScript(); + createStackDotPyScript(); + + // TestRail will be updated after the process initiated by getMilestonesFromTestRail has completed + getMilestonesFromTestRail(); +} void TestRailInterface::createTestSuiteXML(const QString& testDirectory, const QString& outputDirectory, - const QString& user, - const QString& branch) { + const QString& userGitHub, + const QString& branchGitHub) { + + _outputDirectory = outputDirectory; QDomProcessingInstruction instruction = _document.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); _document.appendChild(instruction); @@ -195,14 +467,15 @@ void TestRailInterface::createTestSuitePython(const QString& testDirectory, suiteName.appendChild(_document.createTextNode("Test Suite - " + QDateTime::currentDateTime().toString("yyyy-MM-ddTHH:mm"))); topLevelSection.appendChild(suiteName); + // This is the first call to 'process'. This is then called recursively to build the full XML tree QDomElement secondLevelSections = _document.createElement("sections"); - topLevelSection.appendChild(processDirectory(testDirectory, user, branch, secondLevelSections)); + topLevelSection.appendChild(processDirectoryXML(testDirectory, userGitHub, branchGitHub, secondLevelSections)); topLevelSection.appendChild(secondLevelSections); root.appendChild(topLevelSection); // Write to file - const QString testRailsFilename{ outputDirectory + "/TestRailSuite.xml" }; + const QString testRailsFilename{ _outputDirectory + "/TestRailSuite.xml" }; QFile file(testRailsFilename); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), "Could not create XML file"); @@ -217,7 +490,10 @@ void TestRailInterface::createTestSuitePython(const QString& testDirectory, QMessageBox::information(0, "Success", "TestRail XML file has been created"); } -QDomElement TestRailInterface::processDirectory(const QString& directory, const QString& user, const QString& branch, const QDomElement& element) { +QDomElement TestRailInterface::processDirectoryXML(const QString& directory, + const QString& userGitHub, + const QString& branchGitHub, + const QDomElement& element) { QDomElement result = element; // Loop over all entries in directory @@ -226,17 +502,11 @@ QDomElement TestRailInterface::processDirectory(const QString& directory, const QString nextDirectory = it.next(); // The object name appears after the last slash (we are assured there is at least 1). - QString objectName = nextDirectory.right(nextDirectory.length() - nextDirectory.lastIndexOf("/") - 1); + QString objectName = getObject(nextDirectory); // Only process directories - if (Test::isAValidDirectory(nextDirectory)) { - // Ignore the utils and preformance directories - if (nextDirectory.right(QString("utils").length()) == "utils" || nextDirectory.right(QString("performance").length()) == "performance") { - continue; - } - + if (isAValidTestDirectory(nextDirectory)) { // Create a section and process it - QDomElement sectionElement = _document.createElement("section"); QDomElement sectionElementName = _document.createElement("name"); @@ -244,7 +514,7 @@ QDomElement TestRailInterface::processDirectory(const QString& directory, const sectionElement.appendChild(sectionElementName); QDomElement testsElement = _document.createElement("sections"); - sectionElement.appendChild(processDirectory(nextDirectory, user, branch, testsElement)); + sectionElement.appendChild(processDirectoryXML(nextDirectory, userGitHub, branchGitHub, testsElement)); result.appendChild(sectionElement); } else if (objectName == "test.js" || objectName == "testStory.js") { @@ -252,7 +522,9 @@ QDomElement TestRailInterface::processDirectory(const QString& directory, const QDomElement sectionElementName = _document.createElement("name"); sectionElementName.appendChild(_document.createTextNode("all")); sectionElement.appendChild(sectionElementName); - sectionElement.appendChild(processTest(nextDirectory, objectName, user, branch, _document.createElement("cases"))); + sectionElement.appendChild( + processTestXML(nextDirectory, objectName, userGitHub, branchGitHub, _document.createElement("cases"))); + result.appendChild(sectionElement); } } @@ -260,7 +532,11 @@ QDomElement TestRailInterface::processDirectory(const QString& directory, const return result; } -QDomElement TestRailInterface::processTest(const QString& fullDirectory, const QString& test, const QString& user, const QString& branch, const QDomElement& element) { +QDomElement TestRailInterface::processTestXML(const QString& fullDirectory, + const QString& test, + const QString& userGitHub, + const QString& branchGitHub, + const QDomElement& element) { QDomElement result = element; QDomElement caseElement = _document.createElement("case"); @@ -337,7 +613,7 @@ QDomElement TestRailInterface::processTest(const QString& fullDirectory, const Q added_to_releaseElementId.appendChild(_document.createTextNode("4")); added_to_releaseElement.appendChild(added_to_releaseElementId); QDomElement added_to_releaseElementValue = _document.createElement("value"); - added_to_releaseElementValue.appendChild(_document.createTextNode(branch)); + added_to_releaseElementValue.appendChild(_document.createTextNode(branchGitHub)); added_to_releaseElement.appendChild(added_to_releaseElementValue); customElement.appendChild(added_to_releaseElement); @@ -345,7 +621,8 @@ QDomElement TestRailInterface::processTest(const QString& fullDirectory, const Q precondsElement.appendChild(_document.createTextNode("Tester is in an empty region of a domain in which they have edit rights\n\n*Note: Press 'n' to advance test script")); customElement.appendChild(precondsElement); - QString testMDName = QString("https://github.com/") + user + "/hifi_tests/blob/" + branch + "/tests/content/entity/light/point/create/test.md"; + QString testMDName = QString("https://github.com/") + userGitHub + "/hifi_tests/blob/" + branchGitHub + + "/tests/content/entity/light/point/create/test.md"; QDomElement steps_seperatedElement = _document.createElement("steps_separated"); QDomElement stepElement = _document.createElement("step"); @@ -370,4 +647,72 @@ QDomElement TestRailInterface::processTest(const QString& fullDirectory, const Q result.appendChild(caseElement); return result; +} + +void TestRailInterface::processTestPython(const QString& fullDirectory, + QTextStream& stream, + const QString& userGitHub, + const QString& branchGitHub) { + // The name of the test is derived from the full path. + // The first term is the first word after "tests" + // The last word is the penultimate word + QStringList words = fullDirectory.split('/'); + int i = 0; + while (words[i] != "tests") { + ++i; + if (i >= words.length() - 1) { + QMessageBox::critical(0, "Internal error: " + QString(__FILE__) + ":" + QString::number(__LINE__), + "Folder \"tests\" not found in " + fullDirectory); + exit(-1); + } + } + + ++i; + QString title{ words[i] }; + for (++i; i < words.length() - 1; ++i) { + title += " / " + words[i]; + } + + // To create the path to test.md, prefix by tests, and remove blanks + QString pathToTestMD = QString("/tests/") + title.remove(" "); + + stream << "section_id = parent_ids.peek()\n"; + + QString testMDName = QString("https://github.com/") + userGitHub + "/hifi_tests/blob/" + branchGitHub + + pathToTestMD + "/test.md "; + + QString testContent = QString("Execute instructions in [THIS TEST](") + testMDName + ")"; + QString testExpected = QString("Refer to the expected result in the linked description."); + + int milestone_id = _milestones[_milestoneNames[_testRailTestCasesSelectorWindow.getMilestoneID()]]; + + stream << "data = {\n" + << "\t'title': '" << title << "',\n" + << "\t'template_id': 2,\n" + << "\t'milestone_id': " << milestone_id << ",\n" + << "\t'custom_tester_count': 1,\n" + << "\t'custom_domain_bot_load': 1,\n" + << "\t'custom_added_to_release': 4,\n" + << "\t'custom_preconds': " << "'Tester is in an empty region of a domain in which they have edit rights\\n\\n*Note: Press \\'n\\' to advance test script',\n" + << "\t'custom_steps_separated': " << "[\n\t\t{\n\t\t\t'content': '" << testContent << "',\n\t\t\t'expected': '" << testExpected << "'\n\t\t}\n\t]\n" + << "}\n"; + + stream << "case = client.send_post('add_case/' + str(section_id), data)\n"; +} + +void TestRailInterface::requestTestRailRunDataFromUser() { + _testRailRunSelectorWindow.reset(); + _testRailRunSelectorWindow.exec(); +} + +void TestRailInterface::getTestCasesFromTestRail() { +} + +void TestRailInterface::createTestRailRun() { + requestTestRailRunDataFromUser(); + createTestRailDotPyScript(); + createStackDotPyScript(); + + // TestRail will be updated after the process initiated by getTestCasesFromTestRail has completed + getTestCasesFromTestRail(); } \ No newline at end of file diff --git a/tools/auto-tester/src/TestRailInterface.h b/tools/auto-tester/src/TestRailInterface.h index 6c98ddf430..4501be2d87 100644 --- a/tools/auto-tester/src/TestRailInterface.h +++ b/tools/auto-tester/src/TestRailInterface.h @@ -11,44 +11,102 @@ #ifndef hifi_test_testrail_interface_h #define hifi_test_testrail_interface_h -#include "ui/TestRailSelectorWindow.h" +#include "ui/BusyWindow.h" + +#include "ui/TestRailTestCasesSelectorWindow.h" +#include "ui/TestRailRunSelectorWindow.h" + #include #include +#include #include -class TestRailInterface { +class TestRailInterface : public QObject{ + Q_OBJECT + public: TestRailInterface(); void createTestSuiteXML(const QString& testDirectory, const QString& outputDirectory, - const QString& user, - const QString& branch); + const QString& userGitHub, + const QString& branchGitHub); void createTestSuitePython(const QString& testDirectory, const QString& outputDirectory, - const QString& user, - const QString& branch); + const QString& userGitHub, + const QString& branchGitHub); - QDomElement processDirectory(const QString& directory, - const QString& user, - const QString& branch, - const QDomElement& element); + QDomElement processDirectoryXML(const QString& directory, + const QString& useGitHubr, + const QString& branchGitHub, + const QDomElement& element); - QDomElement processTest(const QString& fullDirectory, const QString& test, const QString& user, const QString& branch, const QDomElement& element); + QDomElement processTestXML(const QString& fullDirectory, + const QString& test, + const QString& userGitHub, + const QString& branchGitHub, + const QDomElement& element); - void createTestRailDotPyScript(const QString& outputDirectory); - void requestDataFromUser(); - void createAddSectionsPythonScript(const QString& outputDirectory); + void processTestPython(const QString& fullDirectory, + QTextStream& stream, + const QString& userGitHub, + const QString& branchGitHub); + + void getMilestonesFromTestRail(); + void getTestCasesFromTestRail(); + + void createTestRailDotPyScript(); + void createStackDotPyScript(); + + void requestTestRailTestCasesDataFromUser(); + void requestTestRailRunDataFromUser(); + + void createAddTestCasesPythonScript(const QString& testDirectory, + const QString& userGitHub, + const QString& branchGitHub); + + void processDirectoryPython(const QString& directory, + QTextStream& stream, + const QString& userGitHub, + const QString& branchGitHub); + + bool isAValidTestDirectory(const QString& directory); + + QString getObject(const QString& path); + + void updateMilestonesComboData(int exitCode, QProcess::ExitStatus exitStatus); + + void createTestRailRun(); private: + // HighFidelity Interface project ID in TestRail + const int INTERFACE_PROJECT_ID{ 24 }; + + // Rendering suite ID + const int INTERFACE_SUITE_ID{ 1147 }; + QDomDocument _document; - TestRailSelectorWindow _testRailSelectorWindow; + BusyWindow _busyWindow; + TestRailTestCasesSelectorWindow _testRailTestCasesSelectorWindow; + TestRailRunSelectorWindow _testRailRunSelectorWindow; QString _url; QString _user; QString _password; + QString _projectID; + QString _suiteID; + + QString _testDirectory; + QString _outputDirectory; + QString _userGitHub; + QString _branchGitHub; + + const QString pythonExe{ "python.exe" }; + QString _pythonCommand; + std::map _milestones; + QStringList _milestoneNames; }; #endif \ No newline at end of file diff --git a/tools/auto-tester/src/ui/AutoTester.cpp b/tools/auto-tester/src/ui/AutoTester.cpp index 02c3c49a53..697711c4eb 100644 --- a/tools/auto-tester/src/ui/AutoTester.cpp +++ b/tools/auto-tester/src/ui/AutoTester.cpp @@ -68,8 +68,12 @@ void AutoTester::on_createTestsOutlineButton_clicked() { _test->createTestsOutline(); } -void AutoTester::on_createTestRailTestSuiteButton_clicked() { - _test->createTestRailTestSuite(); +void AutoTester::on_createTestRailTestCasesButton_clicked() { + _test->createTestRailTestCases(); +} + +void AutoTester::on_createTestRailRunButton_clicked() { + _test->createTestRailRun(); } // To toggle between show and hide diff --git a/tools/auto-tester/src/ui/AutoTester.h b/tools/auto-tester/src/ui/AutoTester.h index 7f04bd1c49..236a1ed733 100644 --- a/tools/auto-tester/src/ui/AutoTester.h +++ b/tools/auto-tester/src/ui/AutoTester.h @@ -45,7 +45,8 @@ private slots: void on_createMDFileButton_clicked(); void on_createAllMDFilesButton_clicked(); void on_createTestsOutlineButton_clicked(); - void on_createTestRailTestSuiteButton_clicked(); + void on_createTestRailTestCasesButton_clicked(); + void on_createTestRailRunButton_clicked(); void on_hideTaskbarButton_clicked(); void on_showTaskbarButton_clicked(); diff --git a/tools/auto-tester/src/ui/AutoTester.ui b/tools/auto-tester/src/ui/AutoTester.ui index 9030016f34..680fe17785 100644 --- a/tools/auto-tester/src/ui/AutoTester.ui +++ b/tools/auto-tester/src/ui/AutoTester.ui @@ -7,7 +7,7 @@ 0 0 645 - 570 + 814 @@ -18,7 +18,7 @@ 380 - 450 + 620 101 40 @@ -44,7 +44,7 @@ 430 - 320 + 490 101 40 @@ -57,7 +57,7 @@ 330 - 170 + 340 220 40 @@ -70,7 +70,7 @@ 320 - 330 + 500 131 20 @@ -86,7 +86,7 @@ 320 - 380 + 550 255 23 @@ -99,7 +99,7 @@ 330 - 230 + 400 220 40 @@ -229,17 +229,17 @@ - + - 409 + 410 100 - 141 + 140 40 - Create TestRail Test Suite + Create TestRail Test Cases @@ -271,6 +271,19 @@ XML + + + + 410 + 180 + 140 + 40 + + + + Create TestRail Run + + diff --git a/tools/auto-tester/src/ui/BusyWindow.cpp b/tools/auto-tester/src/ui/BusyWindow.cpp new file mode 100644 index 0000000000..904dc47d75 --- /dev/null +++ b/tools/auto-tester/src/ui/BusyWindow.cpp @@ -0,0 +1,18 @@ +// +// BusyWindow.cpp +// +// Created by Nissim Hadar on 26 Jul 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 "BusyWindow.h" + +#include + +#include + +BusyWindow::BusyWindow(QWidget *parent) { + setupUi(this); +} diff --git a/tools/auto-tester/src/ui/BusyWindow.h b/tools/auto-tester/src/ui/BusyWindow.h new file mode 100644 index 0000000000..62f2df7e04 --- /dev/null +++ b/tools/auto-tester/src/ui/BusyWindow.h @@ -0,0 +1,22 @@ +// +// BusyWindow.h +// +// Created by Nissim Hadar on 29 Jul 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_BusyWindow_h +#define hifi_BusyWindow_h + +#include "ui_BusyWindow.h" + +class BusyWindow : public QDialog, public Ui::BusyWindow { + Q_OBJECT + +public: + BusyWindow(QWidget* parent = Q_NULLPTR); +}; + +#endif \ No newline at end of file diff --git a/tools/auto-tester/src/ui/BusyWindow.ui b/tools/auto-tester/src/ui/BusyWindow.ui new file mode 100644 index 0000000000..c237566a5e --- /dev/null +++ b/tools/auto-tester/src/ui/BusyWindow.ui @@ -0,0 +1,75 @@ + + + BusyWindow + + + Qt::ApplicationModal + + + + 0 + 0 + 542 + 189 + + + + Updating TestRail - please wait + + + + + 30 + 850 + 500 + 28 + + + + + 12 + + + + similarity + + + + + + 40 + 40 + 481 + 101 + + + + 0 + + + 0 + + + + + + 50 + 60 + 431 + 61 + + + + + 20 + + + + Please wait for this window to close + + + + + + + diff --git a/tools/auto-tester/src/ui/MismatchWindow.h b/tools/auto-tester/src/ui/MismatchWindow.h index 30fca94469..f203a2be6a 100644 --- a/tools/auto-tester/src/ui/MismatchWindow.h +++ b/tools/auto-tester/src/ui/MismatchWindow.h @@ -14,8 +14,7 @@ #include "../common.h" -class MismatchWindow : public QDialog, public Ui::MismatchWindow -{ +class MismatchWindow : public QDialog, public Ui::MismatchWindow { Q_OBJECT public: diff --git a/tools/auto-tester/src/ui/MismatchWindow.ui b/tools/auto-tester/src/ui/MismatchWindow.ui index 72f86261ab..8a174989d4 100644 --- a/tools/auto-tester/src/ui/MismatchWindow.ui +++ b/tools/auto-tester/src/ui/MismatchWindow.ui @@ -2,6 +2,9 @@ MismatchWindow + + Qt::ApplicationModal + 0 @@ -193,4 +196,4 @@ - \ No newline at end of file + diff --git a/tools/auto-tester/src/ui/TestRailRunSelectorWindow.cpp b/tools/auto-tester/src/ui/TestRailRunSelectorWindow.cpp new file mode 100644 index 0000000000..4da4b1493f --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailRunSelectorWindow.cpp @@ -0,0 +1,100 @@ +// +// TestRailRunSelectorWindow.cpp +// +// Created by Nissim Hadar on 31 Jul 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 "TestRailRunSelectorWindow.h" + +#include + +#include + +TestRailRunSelectorWindow::TestRailRunSelectorWindow(QWidget *parent) { + setupUi(this); + + projectIDLineEdit->setValidator(new QIntValidator(1, 999, this)); +} + + +void TestRailRunSelectorWindow::reset() { + urlLineEdit->setDisabled(false); + userLineEdit->setDisabled(false); + passwordLineEdit->setDisabled(false); + projectIDLineEdit->setDisabled(false); + + OKButton->setDisabled(true); + milestoneComboBox->setDisabled(true); +} + +void TestRailRunSelectorWindow::on_acceptButton_clicked() { + urlLineEdit->setDisabled(true); + userLineEdit->setDisabled(true); + passwordLineEdit->setDisabled(true); + projectIDLineEdit->setDisabled(true); + + OKButton->setDisabled(false); + milestoneComboBox->setDisabled(false); + close(); +} + +void TestRailRunSelectorWindow::on_OKButton_clicked() { + userCancelled = false; + close(); +} + +void TestRailRunSelectorWindow::on_cancelButton_clicked() { + userCancelled = true; + close(); +} + +bool TestRailRunSelectorWindow::getUserCancelled() { + return userCancelled; +} + +void TestRailRunSelectorWindow::setURL(const QString& user) { + urlLineEdit->setText(user); +} + +QString TestRailRunSelectorWindow::getURL() { + return urlLineEdit->text(); +} + +void TestRailRunSelectorWindow::setUser(const QString& user) { + userLineEdit->setText(user); +} + +QString TestRailRunSelectorWindow::getUser() { + return userLineEdit->text(); +} + +QString TestRailRunSelectorWindow::getPassword() { + return passwordLineEdit->text(); +} + +void TestRailRunSelectorWindow::setProjectID(const int project) { + projectIDLineEdit->setText(QString::number(project)); +} + +int TestRailRunSelectorWindow::getProjectID() { + return projectIDLineEdit->text().toInt(); +} + +void TestRailRunSelectorWindow::setSuiteID(const int project) { + suiteIDLineEdit->setText(QString::number(project)); +} + +int TestRailRunSelectorWindow::getSuiteID() { + return suiteIDLineEdit->text().toInt(); +} + +void TestRailRunSelectorWindow::updateMilestoneComboBoxData(QStringList data) { + milestoneComboBox->insertItems(0, data); +} + +int TestRailRunSelectorWindow::getMilestoneID() { + return milestoneComboBox->currentIndex(); +} \ No newline at end of file diff --git a/tools/auto-tester/src/ui/TestRailRunSelectorWindow.h b/tools/auto-tester/src/ui/TestRailRunSelectorWindow.h new file mode 100644 index 0000000000..ece70124b9 --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailRunSelectorWindow.h @@ -0,0 +1,50 @@ +// +// TestRailRunSelectorWindow.h +// +// Created by Nissim Hadar on 31 Jul 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_TestRailRunSelectorWindow_h +#define hifi_TestRailRunSelectorWindow_h + +#include "ui_TestRailRunSelectorWindow.h" + +class TestRailRunSelectorWindow : public QDialog, public Ui::TestRailRunSelectorWindow { + Q_OBJECT + +public: + TestRailRunSelectorWindow(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 updateMilestoneComboBoxData(QStringList data); + int getMilestoneID(); + +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/TestRailRunSelectorWindow.ui b/tools/auto-tester/src/ui/TestRailRunSelectorWindow.ui new file mode 100644 index 0000000000..a15c1b6d0c --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailRunSelectorWindow.ui @@ -0,0 +1,283 @@ + + + TestRailRunSelectorWindow + + + Qt::ApplicationModal + + + + 0 + 0 + 489 + 474 + + + + TestRail Run 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 + + + + 140 + 350 + 121 + 20 + + + + + 10 + + + + TestRail Milestone + + + + + + 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 + milestoneComboBox + OKButton + cancelButton + + + + diff --git a/tools/auto-tester/src/ui/TestRailSelectorWindow.cpp b/tools/auto-tester/src/ui/TestRailSelectorWindow.cpp deleted file mode 100644 index b7232837c8..0000000000 --- a/tools/auto-tester/src/ui/TestRailSelectorWindow.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// -// TestRailSelectorWindow.cpp -// -// Created by Nissim Hadar on 26 Jul 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 "TestRailSelectorWindow.h" - -#include - -#include - -TestRailSelectorWindow::TestRailSelectorWindow(QWidget *parent) { - setupUi(this); - - projectLineEdit->setValidator(new QIntValidator(1, 999, this)); -} - -void TestRailSelectorWindow::on_OKButton_clicked() { - userCancelled = false; - close(); -} - -void TestRailSelectorWindow::on_cancelButton_clicked() { - userCancelled = true; - close(); -} - -bool TestRailSelectorWindow::getUserCancelled() { - return userCancelled; -} - -void TestRailSelectorWindow::setURL(const QString& user) { - URLTextEdit->setText(user); -} - -QString TestRailSelectorWindow::getURL() { - return URLTextEdit->toPlainText(); -} - -void TestRailSelectorWindow::setUser(const QString& user) { - userTextEdit->setText(user); -} - -QString TestRailSelectorWindow::getUser() { - return userTextEdit->toPlainText(); -} - -QString TestRailSelectorWindow::getPassword() { - return passwordLineEdit->text(); -} - -void TestRailSelectorWindow::setProject(const int project) { - projectLineEdit->setText(QString::number(project)); -} - -int TestRailSelectorWindow::getProject() { - return projectLineEdit->getText().toInt(); -} diff --git a/tools/auto-tester/src/ui/TestRailSelectorWindow.h b/tools/auto-tester/src/ui/TestRailSelectorWindow.h deleted file mode 100644 index 821102b6bc..0000000000 --- a/tools/auto-tester/src/ui/TestRailSelectorWindow.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// TestRailSelectorWindow.h -// -// Created by Nissim Hadar on 26 Jul 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_TestRailSelectorWindow_h -#define hifi_TestRailSelectorWindow_h - -#include "ui_TestRailSelectorWindow.h" - -class TestRailSelectorWindow : public QDialog, public Ui::TestRailSelectorWindow { - Q_OBJECT - -public: - TestRailSelectorWindow(QWidget* parent = Q_NULLPTR); - - bool getUserCancelled(); - - void setURL(const QString& user); - QString getURL(); - - void setUser(const QString& user); - QString getUser(); - - QString getPassword(); - - void setProject(const int project); - int getProject(); - - bool userCancelled{ false }; - -private slots: - void on_OKButton_clicked(); - void on_cancelButton_clicked(); -}; - -#endif \ No newline at end of file diff --git a/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.cpp b/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.cpp new file mode 100644 index 0000000000..afef51a321 --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.cpp @@ -0,0 +1,100 @@ +// +// TestRailTestCasesSelectorWindow.cpp +// +// Created by Nissim Hadar on 26 Jul 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 "TestRailTestCasesSelectorWindow.h" + +#include + +#include + +TestRailTestCasesSelectorWindow::TestRailTestCasesSelectorWindow(QWidget *parent) { + setupUi(this); + + projectIDLineEdit->setValidator(new QIntValidator(1, 999, this)); +} + + +void TestRailTestCasesSelectorWindow::reset() { + urlLineEdit->setDisabled(false); + userLineEdit->setDisabled(false); + passwordLineEdit->setDisabled(false); + projectIDLineEdit->setDisabled(false); + + OKButton->setDisabled(true); + milestoneComboBox->setDisabled(true); +} + +void TestRailTestCasesSelectorWindow::on_acceptButton_clicked() { + urlLineEdit->setDisabled(true); + userLineEdit->setDisabled(true); + passwordLineEdit->setDisabled(true); + projectIDLineEdit->setDisabled(true); + + OKButton->setDisabled(false); + milestoneComboBox->setDisabled(false); + close(); +} + +void TestRailTestCasesSelectorWindow::on_OKButton_clicked() { + userCancelled = false; + close(); +} + +void TestRailTestCasesSelectorWindow::on_cancelButton_clicked() { + userCancelled = true; + close(); +} + +bool TestRailTestCasesSelectorWindow::getUserCancelled() { + return userCancelled; +} + +void TestRailTestCasesSelectorWindow::setURL(const QString& user) { + urlLineEdit->setText(user); +} + +QString TestRailTestCasesSelectorWindow::getURL() { + return urlLineEdit->text(); +} + +void TestRailTestCasesSelectorWindow::setUser(const QString& user) { + userLineEdit->setText(user); +} + +QString TestRailTestCasesSelectorWindow::getUser() { + return userLineEdit->text(); +} + +QString TestRailTestCasesSelectorWindow::getPassword() { + return passwordLineEdit->text(); +} + +void TestRailTestCasesSelectorWindow::setProjectID(const int project) { + projectIDLineEdit->setText(QString::number(project)); +} + +int TestRailTestCasesSelectorWindow::getProjectID() { + return projectIDLineEdit->text().toInt(); +} + +void TestRailTestCasesSelectorWindow::setSuiteID(const int project) { + suiteIDLineEdit->setText(QString::number(project)); +} + +int TestRailTestCasesSelectorWindow::getSuiteID() { + return suiteIDLineEdit->text().toInt(); +} + +void TestRailTestCasesSelectorWindow::updateMilestoneComboBoxData(QStringList data) { + milestoneComboBox->insertItems(0, data); +} + +int TestRailTestCasesSelectorWindow::getMilestoneID() { + return milestoneComboBox->currentIndex(); +} \ No newline at end of file diff --git a/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.h b/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.h new file mode 100644 index 0000000000..fb9d741bab --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.h @@ -0,0 +1,50 @@ +// +// TestRailTestCasesSelectorWindow.h +// +// Created by Nissim Hadar on 26 Jul 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_TestRailTestCasesSelectorWindow_h +#define hifi_TestRailTestCasesSelectorWindow_h + +#include "ui_TestRailTestCasesSelectorWindow.h" + +class TestRailTestCasesSelectorWindow : public QDialog, public Ui::TestRailTestCasesSelectorWindow { + Q_OBJECT + +public: + TestRailTestCasesSelectorWindow(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 updateMilestoneComboBoxData(QStringList data); + int getMilestoneID(); + +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/TestRailSelectorWindow.ui b/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.ui similarity index 55% rename from tools/auto-tester/src/ui/TestRailSelectorWindow.ui rename to tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.ui index dfc477deb0..9233f7a629 100644 --- a/tools/auto-tester/src/ui/TestRailSelectorWindow.ui +++ b/tools/auto-tester/src/ui/TestRailTestCasesSelectorWindow.ui @@ -1,17 +1,17 @@ - TestRailSelectorWindow - + TestRailTestCasesSelectorWindow + 0 0 489 - 312 + 474 - MismatchWindow + TestRail Test Case Selector Window @@ -35,7 +35,7 @@ 70 - 115 + 125 121 20 @@ -67,21 +67,14 @@ TestRail URL - - - - 200 - 25 - 231 - 24 - - - + + false + 120 - 240 + 420 93 28 @@ -94,7 +87,7 @@ 280 - 240 + 420 93 28 @@ -107,7 +100,7 @@ 200 - 115 + 120 231 24 @@ -116,21 +109,11 @@ QLineEdit::Password - - - - 200 - 70 - 231 - 24 - - - 70 - 70 + 75 121 20 @@ -144,11 +127,11 @@ TestRail User - + 200 - 160 + 170 231 24 @@ -161,7 +144,7 @@ 70 - 160 + 175 121 20 @@ -172,11 +155,126 @@ - TestRail Project + TestRail Project ID + + + + + + 200 + 270 + 231 + 28 + + + + Accept + + + + + false + + + + 270 + 350 + 161 + 22 + + + + + + true + + + + 140 + 350 + 121 + 20 + + + + + 10 + + + + TestRail Milestone + + + + + + 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 + milestoneComboBox + OKButton + cancelButton +