From aa57d359beba6c328e4d5cb204500481baa71fe6 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Wed, 25 Jul 2018 17:26:23 -0700 Subject: [PATCH] Adding interface to select TestRail user. --- tools/auto-tester/src/Test.cpp | 3 +- tools/auto-tester/src/TestRailInterface.cpp | 8 +- tools/auto-tester/src/TestRailInterface.h | 10 +- tools/auto-tester/src/ui/TestRailSelector.ui | 147 +++++++++++++++++++ 4 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 tools/auto-tester/src/ui/TestRailSelector.ui diff --git a/tools/auto-tester/src/Test.cpp b/tools/auto-tester/src/Test.cpp index c8ae75eee0..f708137305 100644 --- a/tools/auto-tester/src/Test.cpp +++ b/tools/auto-tester/src/Test.cpp @@ -846,7 +846,8 @@ void Test::createTestRailTestSuite() { } if (_testRailCreateMode == PYTHON) { - ////createTestRailPythonTestSuite(); + _testRailInterface.createTestSuitePython(_testDirectory, outputDirectory, autoTester->getSelectedUser(), + autoTester->getSelectedBranch()); } else { _testRailInterface.createTestSuiteXML(_testDirectory, outputDirectory, autoTester->getSelectedUser(), autoTester->getSelectedBranch()); diff --git a/tools/auto-tester/src/TestRailInterface.cpp b/tools/auto-tester/src/TestRailInterface.cpp index ee1969db44..4c7c1a4f27 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -16,7 +16,13 @@ #include #include -void TestRailInterface::createTestSuiteXML(const QString& testDirectory, +void TestRailInterface::createTestSuitePython(const QString& testDirectory, + const QString& outputDirectory, + const QString& user, + const QString& branch) { + } + + void TestRailInterface::createTestSuiteXML(const QString& testDirectory, const QString& outputDirectory, const QString& user, const QString& branch) { diff --git a/tools/auto-tester/src/TestRailInterface.h b/tools/auto-tester/src/TestRailInterface.h index c0a61687e4..a8edd1f8b7 100644 --- a/tools/auto-tester/src/TestRailInterface.h +++ b/tools/auto-tester/src/TestRailInterface.h @@ -22,7 +22,15 @@ public: const QString& user, const QString& branch); - QDomElement processDirectory(const QString& directory, const QString& user, const QString& branch, const QDomElement& element); + void createTestSuitePython(const QString& testDirectory, + const QString& outputDirectory, + const QString& user, + const QString& branch); + + QDomElement processDirectory(const QString& directory, + const QString& user, + const QString& branch, + const QDomElement& element); QDomElement processTest(const QString& fullDirectory, const QString& test, const QString& user, const QString& branch, const QDomElement& element); private: diff --git a/tools/auto-tester/src/ui/TestRailSelector.ui b/tools/auto-tester/src/ui/TestRailSelector.ui new file mode 100644 index 0000000000..695b374a50 --- /dev/null +++ b/tools/auto-tester/src/ui/TestRailSelector.ui @@ -0,0 +1,147 @@ + + + AutoTesterClass + + + + 0 + 0 + 314 + 259 + + + + AutoTester + + + + + + 20 + 130 + 101 + 40 + + + + OK + + + + + + 20 + 65 + 81 + 16 + + + + + 10 + + + + TestRail Branch + + + + + + 20 + 25 + 81 + 16 + + + + + 10 + + + + TestRail User + + + + + + 110 + 22 + 140 + 24 + + + + + + + 110 + 60 + 140 + 24 + + + + + + + 170 + 130 + 101 + 40 + + + + Cancel + + + + + + + 0 + 0 + 314 + 21 + + + + + File + + + + + + Help + + + + + + + + + TopToolBarArea + + + false + + + + + + Close + + + + + About + + + + + + +