From 0cf10a649f183304fd19392794dee6c22b68d235 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 31 Jul 2018 16:25:13 -0700 Subject: [PATCH] WIP - implementing creation of TestRail runs. --- tools/auto-tester/src/Test.cpp | 6 +++- tools/auto-tester/src/Test.h | 3 +- tools/auto-tester/src/TestRailInterface.cpp | 3 ++ tools/auto-tester/src/TestRailInterface.h | 2 ++ tools/auto-tester/src/ui/AutoTester.cpp | 8 +++-- tools/auto-tester/src/ui/AutoTester.h | 3 +- tools/auto-tester/src/ui/AutoTester.ui | 35 ++++++++++++++------- 7 files changed, 44 insertions(+), 16 deletions(-) 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 49b497353f..962012a3d7 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -689,3 +689,6 @@ void TestRailInterface::processTestPython(const QString& fullDirectory, stream << "case = client.send_post('add_case/' + str(section_id), data)\n"; } + +void TestRailInterface::createTestRailRun() { +} \ No newline at end of file diff --git a/tools/auto-tester/src/TestRailInterface.h b/tools/auto-tester/src/TestRailInterface.h index 4d12145021..4d863a0e3c 100644 --- a/tools/auto-tester/src/TestRailInterface.h +++ b/tools/auto-tester/src/TestRailInterface.h @@ -69,6 +69,8 @@ public: void updateMilestonesComboData(int exitCode, QProcess::ExitStatus exitStatus); + void createTestRailRun(); + private: // HighFidelity Interface project ID in TestRail const int INTERFACE_PROJECT_ID{ 24 }; 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 + +