testlink-api-client 0.0.1

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.
Files changed (64) hide show
  1. data/LICENSE +15 -0
  2. data/README.rdoc +14 -0
  3. data/features/create_test_suite.feature +90 -0
  4. data/features/get_first_level_test_suites_for_test_project.feature +25 -0
  5. data/features/get_projects.feature +47 -0
  6. data/features/get_test_suite_by_id.feature +24 -0
  7. data/features/get_test_suites_for_test_suite.feature +33 -0
  8. data/features/step_definitions/common.rb +69 -0
  9. data/features/step_definitions/create_test_suite.rb +14 -0
  10. data/features/step_definitions/get_first_level_test_suites_for_test_project.rb +14 -0
  11. data/features/step_definitions/get_projects.rb +56 -0
  12. data/features/support/db/one_project.sql +1311 -0
  13. data/features/support/db/some_testsuites.sql +1312 -0
  14. data/features/support/env.rb +32 -0
  15. data/features/support/test_link_test_module.rb +32 -0
  16. data/lib/test_link.rb +22 -0
  17. data/lib/test_link/adapters.rb +24 -0
  18. data/lib/test_link/adapters/base.rb +35 -0
  19. data/lib/test_link/adapters/node_adapter.rb +47 -0
  20. data/lib/test_link/adapters/project_adapter.rb +32 -0
  21. data/lib/test_link/adapters/status_adapter.rb +33 -0
  22. data/lib/test_link/api_link.rb +62 -0
  23. data/lib/test_link/command.rb +29 -0
  24. data/lib/test_link/command/argument.rb +31 -0
  25. data/lib/test_link/command/base.rb +63 -0
  26. data/lib/test_link/command/create_test_case.rb +40 -0
  27. data/lib/test_link/command/create_test_suite.rb +35 -0
  28. data/lib/test_link/command/definition.rb +45 -0
  29. data/lib/test_link/command/get_first_level_test_suites_for_test_project.rb +29 -0
  30. data/lib/test_link/command/get_projects.rb +26 -0
  31. data/lib/test_link/command/get_test_suite_by_id.rb +29 -0
  32. data/lib/test_link/command/get_test_suites_for_test_suite.rb +29 -0
  33. data/lib/test_link/exceptions.rb +23 -0
  34. data/lib/test_link/exceptions/command_failed_exception.rb +26 -0
  35. data/lib/test_link/exceptions/empty_response_exception.rb +26 -0
  36. data/lib/test_link/exceptions/error_response_exception.rb +28 -0
  37. data/lib/test_link/exceptions/exception.rb +21 -0
  38. data/lib/test_link/objects.rb +24 -0
  39. data/lib/test_link/objects/methods.rb +29 -0
  40. data/lib/test_link/objects/node.rb +25 -0
  41. data/lib/test_link/objects/project.rb +25 -0
  42. data/lib/test_link/objects/status.rb +25 -0
  43. data/lib/testlink-api-client.rb +16 -0
  44. data/spec/spec_helper.rb +39 -0
  45. data/spec/test_link/adapters/base_spec.rb +56 -0
  46. data/spec/test_link/adapters/node_adapter_spec.rb +102 -0
  47. data/spec/test_link/adapters/project_adapter_spec.rb +81 -0
  48. data/spec/test_link/adapters/status_adapter_spec.rb +51 -0
  49. data/spec/test_link/api_link_spec.rb +106 -0
  50. data/spec/test_link/command/argument_spec.rb +43 -0
  51. data/spec/test_link/command/base_spec.rb +94 -0
  52. data/spec/test_link/command/create_test_case_spec.rb +88 -0
  53. data/spec/test_link/command/create_test_suite_spec.rb +67 -0
  54. data/spec/test_link/command/get_first_level_test_suites_for_test_project_spec.rb +43 -0
  55. data/spec/test_link/command/get_projets_spec.rb +33 -0
  56. data/spec/test_link/command/get_test_suite_by_id_spec.rb +43 -0
  57. data/spec/test_link/command/get_test_suites_for_test_suite_spec.rb +43 -0
  58. data/spec/test_link/exceptions/command_failed_exception_spec.rb +28 -0
  59. data/spec/test_link/exceptions/empty_response_exception_spec.rb +28 -0
  60. data/spec/test_link/exceptions/error_response_exception_spec.rb +30 -0
  61. data/spec/test_link/objects/node_spec.rb +49 -0
  62. data/spec/test_link/objects/project_spec.rb +39 -0
  63. data/spec/test_link/objects/status_spec.rb +43 -0
  64. metadata +194 -0
@@ -0,0 +1,28 @@
1
+ # This file is part of testlink-api-client.
2
+ #
3
+ # testlink-api-client is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # testlink-api-client is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Foobar. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ require "test_link/exceptions/command_failed_exception"
17
+
18
+ describe TestLink::Exceptions::CommandFailedException do
19
+ before :each do
20
+ @exception = TestLink::Exceptions::CommandFailedException.new "Foo message"
21
+ end
22
+
23
+ describe 'message' do
24
+ it 'should be "Empty response"' do
25
+ @exception.message.should == 'Command has failed: Foo message'
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ # This file is part of testlink-api-client.
2
+ #
3
+ # testlink-api-client is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # testlink-api-client is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Foobar. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ require "test_link/exceptions/empty_response_exception"
17
+
18
+ describe TestLink::Exceptions::EmptyResponseException do
19
+ before :each do
20
+ @exception = TestLink::Exceptions::EmptyResponseException.new
21
+ end
22
+
23
+ describe 'message' do
24
+ it 'should be "Empty response"' do
25
+ @exception.message.should == 'Response is empty'
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,30 @@
1
+ # This file is part of testlink-api-client.
2
+ #
3
+ # testlink-api-client is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # testlink-api-client is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Foobar. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ require "test_link/exceptions/error_response_exception"
17
+
18
+ describe TestLink::Exceptions::ErrorResponseException do
19
+ before :each do
20
+ @exception = TestLink::Exceptions::ErrorResponseException.new 123, '___message___'
21
+ end
22
+
23
+ it "has a code" do
24
+ @exception.should provide :code
25
+ end
26
+
27
+ it "has a message" do
28
+ @exception.should respond_to :message
29
+ end
30
+ end
@@ -0,0 +1,49 @@
1
+ # This file is part of testlink-api-client.
2
+ #
3
+ # testlink-api-client is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # testlink-api-client is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Foobar. If not, see <http://www.gnu.org/licenses/>.
15
+ require "test_link/objects/node"
16
+
17
+ describe TestLink::Objects::Node do
18
+ before :each do
19
+ @test_suite = TestLink::Objects::Node.new
20
+ end
21
+
22
+ it "has an id" do
23
+ @test_suite.should provide :id
24
+ end
25
+
26
+ it "has a parent_id" do
27
+ @test_suite.should provide :parent_id
28
+ end
29
+
30
+ it "has a type_id" do
31
+ @test_suite.should provide :type_id
32
+ end
33
+
34
+ it "has a table" do
35
+ @test_suite.should provide :table
36
+ end
37
+
38
+ it "has a name" do
39
+ @test_suite.should provide :name
40
+ end
41
+
42
+ it "has an order" do
43
+ @test_suite.should provide :order
44
+ end
45
+
46
+ it "has details" do
47
+ @test_suite.should provide :details
48
+ end
49
+ end
@@ -0,0 +1,39 @@
1
+ # This file is part of testlink-api-client.
2
+ #
3
+ # testlink-api-client is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # testlink-api-client is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Foobar. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ require 'test_link/objects/project'
17
+
18
+ describe TestLink::Objects::Project do
19
+
20
+ before :each do
21
+ @project = TestLink::Objects::Project.new
22
+ end
23
+
24
+ it "has an id" do
25
+ @project.should provide :id
26
+ end
27
+
28
+ it "has a prefix" do
29
+ @project.should provide :prefix
30
+ end
31
+
32
+ it "has a name" do
33
+ @project.should provide :name
34
+ end
35
+
36
+ it "has notes" do
37
+ @project.should provide :notes
38
+ end
39
+ end
@@ -0,0 +1,43 @@
1
+ # This file is part of testlink-api-client.
2
+ #
3
+ # testlink-api-client is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # testlink-api-client is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Foobar. If not, see <http://www.gnu.org/licenses/>.
15
+
16
+ require 'test_link/objects/status'
17
+
18
+ describe TestLink::Objects::Status do
19
+
20
+ before :each do
21
+ @status = TestLink::Objects::Status.new
22
+ end
23
+
24
+ it "has an id" do
25
+ @status.should provide :id
26
+ end
27
+
28
+ it "has a status" do
29
+ @status.should provide :status
30
+ end
31
+
32
+ it "has a message" do
33
+ @status.should provide :message
34
+ end
35
+
36
+ it "has an additional info" do
37
+ @status.should provide :additional_info
38
+ end
39
+
40
+ it "refers to an operation" do
41
+ @status.should provide :operation
42
+ end
43
+ end
metadata ADDED
@@ -0,0 +1,194 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: testlink-api-client
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - "Flor\xC3\xA9al TOUMIKIAN"
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-03-22 00:00:00 +01:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: rspec
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :development
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: autotest-growl
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :development
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: autotest
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: cucumber
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :development
59
+ version_requirements: *id004
60
+ description: " TestLink API Client allow to use the TestLink Remote API.\n"
61
+ email: ftoumikian@april.org
62
+ executables: []
63
+
64
+ extensions: []
65
+
66
+ extra_rdoc_files:
67
+ - LICENSE
68
+ - README.rdoc
69
+ files:
70
+ - lib/test_link.rb
71
+ - lib/testlink-api-client.rb
72
+ - lib/test_link/exceptions/empty_response_exception.rb
73
+ - lib/test_link/exceptions/exception.rb
74
+ - lib/test_link/exceptions/command_failed_exception.rb
75
+ - lib/test_link/exceptions/error_response_exception.rb
76
+ - lib/test_link/objects.rb
77
+ - lib/test_link/api_link.rb
78
+ - lib/test_link/objects/node.rb
79
+ - lib/test_link/objects/project.rb
80
+ - lib/test_link/objects/status.rb
81
+ - lib/test_link/objects/methods.rb
82
+ - lib/test_link/command/get_projects.rb
83
+ - lib/test_link/command/base.rb
84
+ - lib/test_link/command/get_test_suites_for_test_suite.rb
85
+ - lib/test_link/command/definition.rb
86
+ - lib/test_link/command/argument.rb
87
+ - lib/test_link/command/create_test_case.rb
88
+ - lib/test_link/command/create_test_suite.rb
89
+ - lib/test_link/command/get_test_suite_by_id.rb
90
+ - lib/test_link/command/get_first_level_test_suites_for_test_project.rb
91
+ - lib/test_link/command.rb
92
+ - lib/test_link/adapters/base.rb
93
+ - lib/test_link/adapters/status_adapter.rb
94
+ - lib/test_link/adapters/node_adapter.rb
95
+ - lib/test_link/adapters/project_adapter.rb
96
+ - lib/test_link/exceptions.rb
97
+ - lib/test_link/adapters.rb
98
+ - spec/spec_helper.rb
99
+ - spec/test_link/exceptions/error_response_exception_spec.rb
100
+ - spec/test_link/exceptions/command_failed_exception_spec.rb
101
+ - spec/test_link/exceptions/empty_response_exception_spec.rb
102
+ - spec/test_link/api_link_spec.rb
103
+ - spec/test_link/objects/node_spec.rb
104
+ - spec/test_link/objects/status_spec.rb
105
+ - spec/test_link/objects/project_spec.rb
106
+ - spec/test_link/command/argument_spec.rb
107
+ - spec/test_link/command/get_first_level_test_suites_for_test_project_spec.rb
108
+ - spec/test_link/command/create_test_suite_spec.rb
109
+ - spec/test_link/command/create_test_case_spec.rb
110
+ - spec/test_link/command/get_test_suites_for_test_suite_spec.rb
111
+ - spec/test_link/command/base_spec.rb
112
+ - spec/test_link/command/get_test_suite_by_id_spec.rb
113
+ - spec/test_link/command/get_projets_spec.rb
114
+ - spec/test_link/adapters/node_adapter_spec.rb
115
+ - spec/test_link/adapters/base_spec.rb
116
+ - spec/test_link/adapters/status_adapter_spec.rb
117
+ - spec/test_link/adapters/project_adapter_spec.rb
118
+ - features/get_projects.feature
119
+ - features/get_test_suites_for_test_suite.feature
120
+ - features/support/env.rb
121
+ - features/support/db/some_testsuites.sql
122
+ - features/support/db/one_project.sql
123
+ - features/support/test_link_test_module.rb
124
+ - features/get_first_level_test_suites_for_test_project.feature
125
+ - features/get_test_suite_by_id.feature
126
+ - features/create_test_suite.feature
127
+ - features/step_definitions/get_projects.rb
128
+ - features/step_definitions/common.rb
129
+ - features/step_definitions/create_test_suite.rb
130
+ - features/step_definitions/get_first_level_test_suites_for_test_project.rb
131
+ - LICENSE
132
+ - README.rdoc
133
+ has_rdoc: true
134
+ homepage: http://github.com/floreal/testlink-api-client/
135
+ licenses: []
136
+
137
+ post_install_message:
138
+ rdoc_options: []
139
+
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ none: false
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: "0"
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: "0"
154
+ requirements: []
155
+
156
+ rubyforge_project:
157
+ rubygems_version: 1.6.2
158
+ signing_key:
159
+ specification_version: 3
160
+ summary: A ruby TestLink API Client
161
+ test_files:
162
+ - spec/spec_helper.rb
163
+ - spec/test_link/exceptions/error_response_exception_spec.rb
164
+ - spec/test_link/exceptions/command_failed_exception_spec.rb
165
+ - spec/test_link/exceptions/empty_response_exception_spec.rb
166
+ - spec/test_link/api_link_spec.rb
167
+ - spec/test_link/objects/node_spec.rb
168
+ - spec/test_link/objects/status_spec.rb
169
+ - spec/test_link/objects/project_spec.rb
170
+ - spec/test_link/command/argument_spec.rb
171
+ - spec/test_link/command/get_first_level_test_suites_for_test_project_spec.rb
172
+ - spec/test_link/command/create_test_suite_spec.rb
173
+ - spec/test_link/command/create_test_case_spec.rb
174
+ - spec/test_link/command/get_test_suites_for_test_suite_spec.rb
175
+ - spec/test_link/command/base_spec.rb
176
+ - spec/test_link/command/get_test_suite_by_id_spec.rb
177
+ - spec/test_link/command/get_projets_spec.rb
178
+ - spec/test_link/adapters/node_adapter_spec.rb
179
+ - spec/test_link/adapters/base_spec.rb
180
+ - spec/test_link/adapters/status_adapter_spec.rb
181
+ - spec/test_link/adapters/project_adapter_spec.rb
182
+ - features/get_projects.feature
183
+ - features/get_test_suites_for_test_suite.feature
184
+ - features/support/env.rb
185
+ - features/support/db/some_testsuites.sql
186
+ - features/support/db/one_project.sql
187
+ - features/support/test_link_test_module.rb
188
+ - features/get_first_level_test_suites_for_test_project.feature
189
+ - features/get_test_suite_by_id.feature
190
+ - features/create_test_suite.feature
191
+ - features/step_definitions/get_projects.rb
192
+ - features/step_definitions/common.rb
193
+ - features/step_definitions/create_test_suite.rb
194
+ - features/step_definitions/get_first_level_test_suites_for_test_project.rb