WIP - implementing creation of TestRail runs.

This commit is contained in:
NissimHadar 2018-07-31 16:25:13 -07:00
parent 3f91c55223
commit 0cf10a649f
7 changed files with 44 additions and 16 deletions

View file

@ -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;

View file

@ -57,7 +57,8 @@ public:
void createTestsOutline();
void createTestRailTestSuite();
void createTestRailTestCases();
void createTestRailRun();
bool compareImageLists(bool isInteractiveMode, QProgressBar* progressBar);

View file

@ -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() {
}

View file

@ -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 };

View file

@ -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

View file

@ -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();

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>645</width>
<height>570</height>
<height>814</height>
</rect>
</property>
<property name="windowTitle">
@ -18,7 +18,7 @@
<property name="geometry">
<rect>
<x>380</x>
<y>450</y>
<y>620</y>
<width>101</width>
<height>40</height>
</rect>
@ -44,7 +44,7 @@
<property name="geometry">
<rect>
<x>430</x>
<y>320</y>
<y>490</y>
<width>101</width>
<height>40</height>
</rect>
@ -57,7 +57,7 @@
<property name="geometry">
<rect>
<x>330</x>
<y>170</y>
<y>340</y>
<width>220</width>
<height>40</height>
</rect>
@ -70,7 +70,7 @@
<property name="geometry">
<rect>
<x>320</x>
<y>330</y>
<y>500</y>
<width>131</width>
<height>20</height>
</rect>
@ -86,7 +86,7 @@
<property name="geometry">
<rect>
<x>320</x>
<y>380</y>
<y>550</y>
<width>255</width>
<height>23</height>
</rect>
@ -99,7 +99,7 @@
<property name="geometry">
<rect>
<x>330</x>
<y>230</y>
<y>400</y>
<width>220</width>
<height>40</height>
</rect>
@ -229,17 +229,17 @@
</rect>
</property>
</widget>
<widget class="QPushButton" name="createTestRailTestSuiteButton">
<widget class="QPushButton" name="createTestRailTestCasesButton">
<property name="geometry">
<rect>
<x>409</x>
<x>410</x>
<y>100</y>
<width>141</width>
<width>140</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>Create TestRail Test Suite</string>
<string>Create TestRail Test Cases</string>
</property>
</widget>
<widget class="QRadioButton" name="createPythonScriptRadioButton">
@ -271,6 +271,19 @@
<string>XML</string>
</property>
</widget>
<widget class="QPushButton" name="createTestRailRunButton">
<property name="geometry">
<rect>
<x>410</x>
<y>180</y>
<width>140</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>Create TestRail Run</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">