test_rail_integration 0.0.7.8 → 0.0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dff67be18ea8fd2be4061b4e7f4ba8e988f7aef1
|
4
|
+
data.tar.gz: 4bf9f88a8c59e45b99a18b8ef4e215ba7c778c56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f86d6a48de8fc03b30b24aa825827a3c5ff7b66efac32d1dc9e314fd79ebba59e2ae44e1eb569d29c4d56467ebb22bc7c2a13d172865bf2fdd4027cae6436f64
|
7
|
+
data.tar.gz: cd2b772279bb8e8e1646b5a1874c8f6a1c4db170def0cf95f7e22e2beb5dc30c92c91cf0d9c75c77a7aa1f36e86b6258061b5ecbe6ce18171ab04449e49e9d5b
|
data/bin/test_rail_integration
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
require 'thor'
|
2
2
|
require_relative 'generator/project'
|
3
|
-
require_relative '
|
3
|
+
require_relative 'generator/project/check_test_run'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
class CLI < Thor
|
6
|
+
include TestRail
|
7
|
+
desc "perform", "Creates project for interaction with TestRail"
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
def perform
|
10
|
+
TestRail::Generators::Project.copy_file('run_test_run.rb')
|
11
|
+
TestRail::Generators::Project.copy_file("test_rail_data.yml", "config/data/")
|
12
|
+
end
|
13
13
|
|
14
|
-
|
14
|
+
desc "check_test_run_and_update", "Check test run statuses and update"
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
end
|
16
|
+
def check_test_run_and_update
|
17
|
+
TestRail::CheckTestRun.check
|
19
18
|
end
|
20
|
-
end
|
19
|
+
end
|
20
|
+
|
@@ -3,7 +3,6 @@ require_relative '../../generator/API_client'
|
|
3
3
|
require_relative '../../generator/connection'
|
4
4
|
require_relative '../../generator/test_rail_tools'
|
5
5
|
|
6
|
-
|
7
6
|
module TestRail
|
8
7
|
|
9
8
|
class CheckTestRun
|
@@ -24,6 +23,7 @@ module TestRail
|
|
24
23
|
test_case_result.comment ||= TestRail::TestCaseResult::COMMENT[:fail]
|
25
24
|
TestRail::Connection.commit_test_result(test_case_result)
|
26
25
|
|
26
|
+
p test_case_result
|
27
27
|
return test_case_result
|
28
28
|
end
|
29
29
|
end
|
@@ -31,4 +31,4 @@ module TestRail
|
|
31
31
|
end
|
32
32
|
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
@@ -1,40 +1,38 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'thor/group'
|
3
3
|
|
4
|
-
module
|
5
|
-
module
|
6
|
-
|
7
|
-
|
8
|
-
include Thor::Actions
|
4
|
+
module TestRail
|
5
|
+
module Generators
|
6
|
+
class Project < Thor::Group
|
7
|
+
include Thor::Actions
|
9
8
|
|
10
|
-
|
9
|
+
desc "Generates files that contains information about TestRail"
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
#
|
12
|
+
# Obtaining path of project folder
|
13
|
+
#
|
14
|
+
def self.source_root
|
15
|
+
File.dirname(__FILE__)
|
16
|
+
end
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
#
|
19
|
+
# Checking existence of tes trail data file
|
20
|
+
#
|
21
|
+
def self.test_rail_data_file_exist?
|
22
|
+
File.exists?("config/data/test_rail_data.yml")
|
23
|
+
end
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
25
|
+
#
|
26
|
+
# Copying templates for using for accessing to testrail
|
27
|
+
#
|
28
|
+
def self.copy_file(file_name, root = nil)
|
29
|
+
if file_name == "test_rail_data.yml"
|
30
|
+
FileUtils.mkdir_p("config/data")
|
31
|
+
end
|
32
|
+
if root
|
33
|
+
FileUtils.cp("#{source_root}/project/#{file_name}", "#{root}/#{file_name}")
|
34
|
+
else
|
35
|
+
FileUtils.cp("#{source_root}/project/#{file_name}", "#{file_name}")
|
38
36
|
end
|
39
37
|
end
|
40
38
|
end
|