Module: TestLinker::Wrapper

Included in:
TestLinker
Defined in:
lib/test_linker/wrapper.rb

Overview

This module contains all methods that directly wrap TestLink’s XMLRPC functions.

Instance Method Summary collapse

Instance Method Details

#aboutString

Returns info about the server’s TestLink API.

Returns:

  • (String)

    Info about TestLink API version



12
13
14
# File 'lib/test_linker/wrapper.rb', line 12

def about
  make_call("tl.about", {}, "1.0b5")
end

#add_test_case_to_test_plan(project_id, plan_id, test_case_external_id, test_case_version, options = {}) ⇒ Object Also known as: addTestCaseToTestPlan

Adds a test case version to a test plan.

Parameters:

  • project_id (Fixnum, String)
  • plan_id (Fixnum, String)
  • test_case_external_id (Fixnum, String)
  • test_case_version (Fixnum, String)
  • options (Hash) (defaults to: {})

    Optional parameters for the method.

Options Hash (options):

  • urgency (String)
  • executionorder (Fixnum)
  • platformid (Fixnum)

    Only if test plan has no platforms. (TestLink API >=1.0)

Returns:



28
29
30
31
32
33
34
35
# File 'lib/test_linker/wrapper.rb', line 28

def add_test_case_to_test_plan(project_id, plan_id, test_case_external_id,
    test_case_version, options={})
  args = { :testprojectid => project_id, :testplanid => plan_id,
      :testcaseexternalid => test_case_external_id,
      :version => test_case_version }
  args.merge! options
  make_call("tl.addTestCaseToTestPlan", args, "1.0b5")
end

#assign_requirements(project_id, test_case_external_id, requirements) ⇒ Object Also known as: assignRequirements

Assign Requirements to a test case. Capable of assigning multiple requirements. Requirements can belong to different Requirement Specs.

Parameters:

  • project_id (Fixnum, String)
  • test_case_external_id (Fixnum, String)
  • requirements (String)

Returns:



45
46
47
48
49
# File 'lib/test_linker/wrapper.rb', line 45

def assign_requirements(project_id, test_case_external_id, requirements)
  args = { :testcaseexternalid => test_case_external_id,
      :testprojectid => project_id, :requirements => requirements }
  make_call("tl.assignRequirements", args, "1.0b5")
end

#builds_for_test_plan(plan_id) ⇒ Array<Hash> Also known as: getBuildsForTestPlan

Gets a list of builds within a test plan.

Parameters:

  • plan_id (Fixnum, String)

    ID of the plan to get builds for.

Returns:

  • (Array<Hash>)

    List of all builds for the plan and their associated info.



57
58
59
60
# File 'lib/test_linker/wrapper.rb', line 57

def builds_for_test_plan plan_id
  args = { :testplanid => plan_id }
  make_call("tl.getBuildsForTestPlan", args, "1.0b5")
end

#check_dev_key(dev_key) ⇒ Hash Also known as: checkDevKey

Checks if the given Developer Key exist.

Parameters:

  • dev_key (String)

Returns:

  • (Hash)

    “true” if it exists, otherwise error structure.



68
69
70
71
# File 'lib/test_linker/wrapper.rb', line 68

def check_dev_key dev_key
  args = { :devKey => dev_key }
  make_call("tl.checkDevKey", args, "1.0")
end

#create_build(plan_id, build_name, build_notes) ⇒ Object Also known as: createBuild

Creates a new build for a specific test plan.

Parameters:

  • plan_id (Fixnum, String)
  • build_name (String)
  • build_notes (String)

Returns:



80
81
82
83
84
# File 'lib/test_linker/wrapper.rb', line 80

def create_build(plan_id, build_name, build_notes)
  args = { :testplanid => plan_id, :buildname => build_name,
      :buildnotes => build_notes }
  make_call("tl.createBuild", args, "1.0b5")
end

#create_project(project_name, test_case_prefix, options = {}) ⇒ Object Also known as: createTestProject

Parameters:

  • project_name (String)
  • test_case_prefix (String)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • notes (String)
  • options (Hash)

    ALL int treated as boolean: requirementsEnabled, testPriorityEnabled, automationEnabled, inventoryEnabled

  • active (Fixnum)
  • public (Fixnum)

Returns:



97
98
99
100
101
# File 'lib/test_linker/wrapper.rb', line 97

def create_project(project_name, test_case_prefix, options={})
  args = { :testprojectname => project_name, :testcaseprefix => test_case_prefix }
  args.merge! options
  make_call("tl.createTestProject", args, "1.0b5")
end

#create_test_case(project_id, suite_id, test_case_name, test_case_summary, test_case_steps, test_case_expected_results, login, options = {}) ⇒ Object Also known as: createTestCase

Parameters:

  • project_id (Fixnum, String)
  • suite_id (Fixnum, String)
  • test_case_name (String)
  • test_case_summary (String)
  • test_case_steps (String)
  • test_case_expected_results (String)
  • login (String)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • preconditions (String)
  • execution (String)
  • order (Fixnum)
  • internalid (Fixnum, String)
  • checkduplicatedname (Boolean)
  • actiononduplicatedname (String)
  • executiontype (String)

Returns:



120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/test_linker/wrapper.rb', line 120

def create_test_case(project_id, suite_id, test_case_name, test_case_summary,
    test_case_steps, test_case_expected_results, , options={})
  args = { :testcasename => test_case_name,
      :testsuiteid => suite_id,
      :testprojectid => project_id,
      :authorlogin => ,
      :summary => test_case_summary,
      :steps => test_case_steps,
      :expectedresults => test_case_expected_results }
  args.merge! options
  make_call("tl.createTestCase", args, "1.0b5")
end

#create_test_plan(project_name, plan_name, options = {}) ⇒ Object Also known as: createTestPlan

Parameters:

  • project_name (String)
  • plan_name (String)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • notes (String)
  • active (String)

    Defaults to 1.

  • public (String)

    Defaults to 1.

Returns:



142
143
144
145
146
# File 'lib/test_linker/wrapper.rb', line 142

def create_test_plan(project_name, plan_name, options={})
  args = { :testplanname => plan_name, :testprojectname => project_name }
  args.merge! options
  make_call('tl.createTestPlan', args, "1.0")
end

#create_test_suite(project_id, suite_name, details, options = {}) ⇒ Array<Hash> Also known as: createTestSuite

Returns Info about results of test suite creation.

Parameters:

  • project_id (Fixnum, String)
  • suite_name (String)
  • details (String)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • parentid (Fixnum, String)

    Defaults to top level.

  • order (Fixnum)

    Order inside parent container.

  • checkduplicatedname (Boolean)

    Check if there siblings with the same name. Defaults to true.

  • actiononduplicatedname (Boolean)

    Applicable only if checkduplicatedname = true.

Returns:

  • (Array<Hash>)

    Info about results of test suite creation.



160
161
162
163
164
165
# File 'lib/test_linker/wrapper.rb', line 160

def create_test_suite(project_id, suite_name, details, options={})
  args = { :testprojectid => project_id, :testsuitename => suite_name,
      :details => details }
  args.merge! options
  make_call('tl.createTestSuite', args, "1.0b5")
end

#delete_execution(execution_id) ⇒ Hash Also known as: deleteExecution

Returns “status”, “id”, “message”.

Parameters:

  • execution_id (Fixnum, String)

Returns:

  • (Hash)

    “status”, “id”, “message”



171
172
173
174
# File 'lib/test_linker/wrapper.rb', line 171

def delete_execution execution_id
  args = { :executionid => execution_id }
  make_call("tl.deleteExecution", args, "1.0")
end

#does_user_exist(user_name) ⇒ Boolean, Hash Also known as: doesUserExist

Returns true if user exists, otherwise an error structure.

Parameters:

  • user_name (String)

Returns:

  • (Boolean, Hash)

    true if user exists, otherwise an error structure.



180
181
182
183
# File 'lib/test_linker/wrapper.rb', line 180

def does_user_exist user_name
  args = { :user => user_name }
  make_call("tl.doesUserExist", args, "1.0")
end

#first_level_test_suites_for_project(project_id) ⇒ Array<Hash> Also known as: getFirstLevelTestSuitesForTestProject

Gets the set of test suites from the top level of the test project tree.

Parameters:

  • project_id (Fixnum, String)

    ID of the project to get suites for.

Returns:

  • (Array<Hash>)

    List of first level suites in project and their associated info.



191
192
193
194
# File 'lib/test_linker/wrapper.rb', line 191

def first_level_test_suites_for_project project_id
  args = { :testprojectid => project_id }
  make_call("tl.getFirstLevelTestSuitesForTestProject", args, "1.0b5")
end

#full_path(node_id) ⇒ Object Also known as: getFullPath

Gets full path from the given node till the top using nodes_hierarchy_table.

Parameters:

  • node_id (Fixnum, String)

Returns:



203
204
205
206
# File 'lib/test_linker/wrapper.rb', line 203

def full_path node_id
  args = { :nodeID => node_id }
  make_call("tl.getFullPath", args, "1.0")
end

#last_execution_result(plan_id, build_id, test_case_id) ⇒ Array<Hash> Also known as: getLastExecutionResult

Returns Single element Array containing the result Hash.

Parameters:

  • plan_id (Fixnum, String)
  • build_id (Fixnum, String)
  • test_case_id (Fixnum, String)

Returns:

  • (Array<Hash>)

    Single element Array containing the result Hash.



213
214
215
216
# File 'lib/test_linker/wrapper.rb', line 213

def last_execution_result(plan_id, build_id, test_case_id)
  args = { :testplanid => plan_id, :testcaseid => test_case_id, :buildid => build_id }
  make_call("tl.getLastExecutionResult", args, "1.0b5")
end

#latest_build_for_test_plan(plan_id) ⇒ Hash Also known as: getLatestBuildForTestPlan

Returns Info for the latest build for the given test plan.

Parameters:

  • plan_id (Fixnum, String)

    ID of the plan to get build for.

Returns:

  • (Hash)

    Info for the latest build for the given test plan.



221
222
223
224
# File 'lib/test_linker/wrapper.rb', line 221

def latest_build_for_test_plan plan_id
  args = { :testplanid => plan_id }
  make_call("tl.getLatestBuildForTestPlan", args, "1.0b5")
end

#project_by_name(project_name) ⇒ Array<Hash> Also known as: getTestProjectByName

Info about a test project with a given name.

Parameters:

  • project_name (String)

    Name of the project to search for.

Returns:

  • (Array<Hash>)

    Info on matching project.



232
233
234
235
# File 'lib/test_linker/wrapper.rb', line 232

def project_by_name project_name
  args = { :testprojectname => project_name }
  make_call('tl.getTestProjectByName', args, "1.0")
end

#projectsArray<Hash> Also known as: getProjects

Gets a list of all projects.

their associated info.

Returns:

  • (Array<Hash>)

    List of all projects in TestLink and



242
243
244
# File 'lib/test_linker/wrapper.rb', line 242

def projects
  make_call("tl.getProjects", {}, "1.0b5" )
end

#repeat(message) ⇒ String

Sends a message to the server to have it repeated back.

Parameters:

  • message (String)

    The message to get the server to repeat back.

Returns:

  • (String)

    The message sent to the server.



251
252
253
# File 'lib/test_linker/wrapper.rb', line 251

def repeat message
  make_call("tl.repeat", { :str => message }, "1.0b5")
end

#report_test_case_result(plan_id, test_case_id, status, options = {}) ⇒ Hash Also known as: reportTCResult

Sets result in TestLink by test case ID and test plan ID. NOTE: will guess at last build, needs to be set to guarantee accuracy. NOTE: Renamed to setTestCaseExecutionResult in version 1.0.

Parameters:

  • plan_id (Fixnum, String)

    ID of the test plan to post results to.

  • test_case_id (Fixnum, String)

    ID of the test case to post results to.

  • status (String)

    ‘p’, ‘f’, or ‘b’ for Pass/Fail/Block

  • options (Hash) (defaults to: {})

Options Hash (options):

  • buildid (Fixnum, String)

    ID of the build to post results to.

  • buildname (Fixnum, String)

    Name of the build to post results to.

  • bugid (Fixnum, String)

    ID of the bug to link results to.

  • guess (Boolean)

    Defines whether to guess optional params or require them explicitly. Defaults to true.

  • platformid (Fixnum, String)

    ID of the platform to associate with the result. (TestLink API >=1.0)

  • customfields (String)

    i.e. “NAME: Steve Lovelessn” (TestLink API >=1.0)

  • notes (String)

    ?

Returns:

  • (Hash)

    “status” of posting, “id” of the execution, “message” giving success or failure info.

Raises:

See Also:

Version:

  • TestLink API version 1.0 Beta 5



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/test_linker/wrapper.rb', line 278

def report_test_case_result(plan_id, test_case_id, status, options={})
  if @version >= "1.0"
    message = "Method not supported in version #{@version}. "
    message << "Use #test_case_execution_result="
    raise TestLinker::Error, message
  end

  args = { :testcaseid => test_case_id, :testplanid => plan_id,
      :status => status, :guess => true }
  args.merge! options
  result = @server.call("tl.reportTCResult", args).first

  unless result['message'] == 'Success!'
    raise TestLinker::Error, "#{result['code']}: #{result['message']}"
  end

  result
end

#say_helloString Also known as: sayHello, ping

Basic connectivity test.

Returns:

  • (String)

    “Hello!”



301
302
303
# File 'lib/test_linker/wrapper.rb', line 301

def say_hello
  make_call("tl.sayHello", {}, "1.0b5")
end

#test_case(options) ⇒ Object Also known as: getTestCase

Gets a test case by it’s internal or external ID.

Parameters:

Options Hash (options):

  • testcaseid (Fixnum, String)
  • testcaseexternalid (Fixnum, String)
  • version (Fixnum, String)

    The test case version. Default is most recent.

Returns:



315
316
317
# File 'lib/test_linker/wrapper.rb', line 315

def test_case(options)
  make_call("tl.getTestCase", options, "1.0")
end

#test_case_attachments(options) ⇒ String Also known as: getTestCaseAttachments

Gets attachments for specified test case.

Parameters:

  • options (Hash)
  • testcaseid (Fixnum, String)

    If not present, testcaseexternalid must be called.

  • testcaseexternalid (Fixnum, String)

    If not present, testcaseid must be called.

Returns:

  • (String)


326
327
328
# File 'lib/test_linker/wrapper.rb', line 326

def test_case_attachments options
  make_call("tl.getTestCaseAttachments", options, "1.0b5")
end

#test_case_custom_field_design_value(project_id, test_case_external_id, custom_field_name, options = {}) ⇒ Array<Hash> Also known as: getTestCaseCustomFieldDesignValue

Parameters:

  • project_id (Fixnum, String)
  • test_case_external_id (Fixnum, String)
  • custom_field_name (Fixnum)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • details (String)

    Changes output information. If null or ‘value’, returns just a value; if ‘full’, returns a hash with all custom field definition, plus value and internal test case id; if ‘simple’, returns value plus custom field name, label, and type (as code).

Returns:



340
341
342
343
344
345
346
347
# File 'lib/test_linker/wrapper.rb', line 340

def test_case_custom_field_design_value(project_id, test_case_external_id,
    custom_field_name, options={})
  args = { :testprojectid => project_id,
      :testcaseexternalid => test_case_external_id,
      :customfieldname => custom_field_name }
  args.merge! options
  make_call("tl.getTestCaseCustomFieldDesignValue", args, "1.0b5")
end

#test_case_execution_result=(plan_id, test_case_id, status, options = {}) ⇒ Hash Also known as: setTestCaseExecutionResult

Sets result in TestLink by test case ID and test plan ID. NOTE: will guess at last build, needs to be set to guarantee accuracy.

Parameters:

  • plan_id (String)

    ID of the test plan to post results to.

  • test_case_id (String)

    ID of the test case to post results to.

  • status (String)

    ‘p’, ‘f’, or ‘b’ for Pass/Fail/Block

  • options (Hash) (defaults to: {})

Options Hash (options):

  • buildid (Fixnum)

    ID of the build to post results to.

  • buildname (String)

    Name of the build to post results to.

  • bugid (Fixnum)

    ID of the bug to link results to.

  • guess (Boolean)

    Defines whether to guess optinal params or require them.

  • notes (String)

    ?

  • platformid (String) — default: version 1.0
  • platformid (String) — default: version 1.0
  • customfields (String) — default: version 1.0
  • overwrite (String) — default: version 1.0

Returns:

  • (Hash)

    “status” of posting, “id” of the execution, “message” giving success or failure info.

Raises:

See Also:



371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/test_linker/wrapper.rb', line 371

def test_case_execution_result=(plan_id, test_case_id, status, options={})
  if @version < "1.0"
    message = "Method not supported in version #{@version}. "
    message << "Use #report_test_case_result"
    raise TestLinker::Error, message
  end

  args = { :testcaseid => test_case_id, :testplanid => plan_id,
      :status => status, :guess => true }
  args.merge! options
  result = make_call("tl.setTestCaseExecutionResult", args, "1.0").first

  unless result[:message] == 'Success!'
    raise TestLinker::Error, "#{result['code']}: #{result['message']}"
  end

  result
end

#test_case_id_by_name(test_case_name, options = {}) ⇒ Array<Hash> Also known as: getTestCaseIDByName

Info about test case by name. CAUTION: returns multiple values if test case is used more than once.

Parameters:

  • test_case_name (String)

    Name to search across TL DB.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • testprojectname (String)
  • testsuitename (String)
  • testcasepathname (String)

Returns:

  • (Array<Hash>)

    List of all test cases in the DB matching test_case_name and their associated info.

Raises:



402
403
404
405
406
# File 'lib/test_linker/wrapper.rb', line 402

def test_case_id_by_name(test_case_name, options={})
  args   = { :testcasename => test_case_name }
  args.merge! options
  make_call("tl.getTestCaseIDByName", args, "1.0b5")
end

#test_cases_for_test_plan(plan_id, options = {}) ⇒ Hash Also known as: getTestCasesForTestPlan

Info about test cases within a test plan.

Parameters:

  • plan_id (Fixnum, String)

    ID of the plan to get test cases for.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • testcaseid (Fixnum, String)
  • buildid (Fixnum, String)
  • keywordid (Fixnum, String) — default: mutually exclusive with keywords
  • keywords (Fixnum) — default: mutually exclusive with keywordid

    (TestLink API >=1.0)

  • executed (String)
  • assignedto (String)
  • executestatus (String)
  • executiontype (String)
  • getstepinfo (String)

    Defaults to false

Returns:

  • (Hash)

    List of all test cases in the plan and their associated info.



425
426
427
428
429
# File 'lib/test_linker/wrapper.rb', line 425

def test_cases_for_test_plan(plan_id, options={})
  args = { :testplanid => plan_id }
  args.merge! options
  make_call("tl.getTestCasesForTestPlan", args, "1.0b5")
end

#test_cases_for_test_suite(project_id, suite_id, deep = true, details = "") ⇒ Array<Hash> Also known as: getTestCasesForTestSuite

Returns List of test cases in the given suite and their associated info.

Parameters:

  • project_id (Fixnum, String)
  • suite_id (Fixnum, String)

    ID of the suite to retrieve test cases for.

  • deep (Boolean) (defaults to: true)
  • details (String) (defaults to: "")

    Default is “simple”; use “full” to get summary, steps & expected results.

Returns:

  • (Array<Hash>)

    List of test cases in the given suite and their associated info.



439
440
441
442
443
# File 'lib/test_linker/wrapper.rb', line 439

def test_cases_for_test_suite(project_id, suite_id, deep=true, details="")
  args = { :testsuiteid => suite_id, :projectid => project_id,
      :deep => deep, :details => details }
  make_call("tl.getTestCasesForTestSuite", args, "1.0b5")
end

#test_plan_by_name(project_name, plan_name) ⇒ Array<Hash> Also known as: getTestPlanByName

Gets the test plan with the given name.

Parameters:

  • project_name (String)

    Name of the project the plan is in.

  • plan_name (String)

    Name of the plan to search for.

Returns:

  • (Array<Hash>)

    Info on matching plan.



452
453
454
455
# File 'lib/test_linker/wrapper.rb', line 452

def test_plan_by_name(project_name, plan_name)
  args = { :testplanname => plan_name, :testprojectname => project_name }
  make_call('tl.getTestPlanByName', args, "1.0")
end

#test_plan_platforms(plan_id) ⇒ Array<Hash> Also known as: getTestPlanPlatforms

List test suites within a test plan alphabetically.

Parameters:

  • plan_id (Fixnum, String)

    ID of the plan to get suites for.

Returns:

  • (Array<Hash>)

    List of all suites in plan and their associated info.



463
464
465
466
# File 'lib/test_linker/wrapper.rb', line 463

def test_plan_platforms plan_id
  args = { :testplanid => plan_id }
  make_call("tl.getTestPlanPlatforms", args, "1.0")
end

#test_plans(project_id) ⇒ Array<Hash> Also known as: getProjectTestPlans

Gets a list of test plans within a project.

Parameters:

  • project_id (Fixnum, String)

    ID of the project to retrieve plans.

Returns:

  • (Array<Hash>)

    Array of all plans in a project and their associated info.

Raises:



475
476
477
478
479
# File 'lib/test_linker/wrapper.rb', line 475

def test_plans project_id
  args = { :testprojectid => project_id }
  response = make_call("tl.getProjectTestPlans", args, "1.0b5")
  response == "" ? [{}] : response
end

#test_suite_by_id(suite_id) ⇒ Object Also known as: getTestSuiteByID

Gets a test suite by the given ID.

Parameters:

  • suite_id (Fixnum, String)

Returns:



487
488
489
490
# File 'lib/test_linker/wrapper.rb', line 487

def test_suite_by_id suite_id
  args = { :testsuiteid => suite_id }
  make_call("tl.getTestSuiteByID", args, "1.0")
end

#test_suites_for_test_plan(plan_id) ⇒ Array<Hash> Also known as: getTestSuitesForTestPlan

List test suites within a test plan alphabetically.

Parameters:

  • plan_id (Fixnum, String)

    ID of the plan to get suites for.

Returns:

  • (Array<Hash>)

    List of all suites in plan and their associated info.



497
498
499
500
# File 'lib/test_linker/wrapper.rb', line 497

def test_suites_for_test_plan plan_id
  args = { :testplanid => plan_id }
  make_call("tl.getTestSuitesForTestPlan", args, "1.0b5")
end

#test_suites_for_test_suite(suite_id) ⇒ Array<Hash> Also known as: getTestSuitesForTestSuite

Gets a list of test suites that are direct children of the given test suite.

Parameters:

  • suite_id (Fixnum, String)

    ID of the suite to get suites for.

Returns:

  • (Array<Hash>)

    List of all suites in plan and their associated info.



508
509
510
511
# File 'lib/test_linker/wrapper.rb', line 508

def test_suites_for_test_suite suite_id
  args = { :testsuiteid => suite_id }
  make_call("tl.getTestSuitesForTestSuite", args, "1.0")
end

#totals_for_test_plan(plan_id) ⇒ Hash Also known as: getTotalsForTestPlan

Gets the summarized results grouped by platform.

Parameters:

  • plan_id (Fixnum, String)

Returns:

  • (Hash)

    Contains “type” => platform, “total_tc” => X, “details => Array of counts.



520
521
522
523
# File 'lib/test_linker/wrapper.rb', line 520

def totals_for_test_plan plan_id
  args = { :testplanid => plan_id }
  make_call("tl.getTotalsForTestPlan", args, "1.0")
end

#upload_attachment(foreign_key_id, foreign_key_table, file_name, mime_type, content, options = {}) ⇒ Object Also known as: uploadAttachment

Uploads an attachment for specified table. You must specify the table that the attachment is connected (nodes_hierarchy, builds, etc) and the foreign key id in this table The attachment must be Base64 encoded by the client before sending it.

Parameters:

  • foreign_key_id (Fixnum, String)
  • foreign_key_table (String)
  • file_name (String)
  • mime_type (String)
  • content (String)

    The Base64 encoded content of the attachment.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • title (String)
  • description (String)

Returns:



541
542
543
544
545
546
547
# File 'lib/test_linker/wrapper.rb', line 541

def upload_attachment(foreign_key_id, foreign_key_table, file_name,
    mime_type, content, options={})
  args = { :fkid => foreign_key_id, :fktable => foreign_key_table,
      :filename => file_name, :filetype => mime_type, :content => content }
  args.merge! options
  make_call("tl.uploadAttachment", args, "1.0")
end

#upload_execution_attachment(execution_id, file_name, mime_type, content, options = {}) ⇒ Object Also known as: uploadExecutionAttachment

Uploads an attachment for a test case execution.

Parameters:

  • execution_id (Fixnum, String)
  • file_name (String)
  • mime_type (String)
  • content (String)

    The Base64 encoded content of the attachment.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • title (String)
  • description (String)

Returns:



561
562
563
564
565
566
567
# File 'lib/test_linker/wrapper.rb', line 561

def upload_execution_attachment(execution_id, file_name, mime_type, content,
  options={})
  args = { :executionid => execution_id, :filename => file_name,
      :filetype => mime_type, :content => content }
  args.merge! options
  make_call("tl.uploadExecutionAttachment", args, "1.0")
end

#upload_project_attachment(project_id, file_name, mime_type, content, options = {}) ⇒ Object Also known as: uploadTestProjectAttachment

Uploads an attachment for a Test Project. The attachment must be Base64 encoded by the client before sending it.

Parameters:

  • project_id (Fixnum, String)
  • file_name (String)
  • mime_type (String)
  • content (String)

    The Base64 encoded content of the attachment.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • title (String)
  • description (String)

Returns:



582
583
584
585
586
587
588
# File 'lib/test_linker/wrapper.rb', line 582

def upload_project_attachment(project_id, file_name, mime_type, content,
    options={})
  args = { :testprojectid => project_id, :filename => file_name,
      :filetype => mime_type, :content => content }
  args.merge! options
  make_call("tl.uploadTestProjectAttachment", args, "1.0")
end

#upload_requirement_attachment(requirement_id, file_name, mime_type, content, options = {}) ⇒ Object Also known as: uploadRequirementAttachment

Uploads an attachment for a Requirement. The attachment content must be Base64 encoded by the client before sending it.

Parameters:

  • requirement_id (Fixnum, String)
  • file_name (String)
  • mime_type (String)
  • content (String)

    The Base64 encoded content of the attachment.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • title (String)
  • description (String)

Returns:



603
604
605
606
607
608
609
# File 'lib/test_linker/wrapper.rb', line 603

def upload_requirement_attachment(requirement_id, file_name, mime_type,
    content, options={})
  args = { :requirementid => requirement_id, :filename => file_name,
      :filetype => mime_type, :content => content }
  args.merge! options
  make_call("tl.uploadRequirementAttachment", args, "1.0")
end

#upload_requirement_specification_attachment(requirement_specification_id, file_name, mime_type, content, options = {}) ⇒ Object Also known as: uploadRequirementSpecificationAttachment

Uploads an attachment for a Requirement Specification. The attachment content must be Base64 encoded by the client before sending it.

Parameters:

  • requirement_specification_id (Fixnum, String)
  • file_name (String)
  • mime_type (String)
  • content (String)

    The Base64 encoded content of the attachment.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • title (String)
  • description (String)

Returns:



624
625
626
627
628
629
630
# File 'lib/test_linker/wrapper.rb', line 624

def upload_requirement_specification_attachment(requirement_specification_id,
    file_name, mime_type, content, options={})
  args = { :reqspecid => requirement_specification_id, :filename => file_name,
      :filetype => mime_type, :content => content }
  args.merge! options
  make_call("tl.uploadRequirementSpecificationAttachment", args, "1.0")
end

#upload_test_case_attachment(test_case_id, file_name, mime_type, content, options = {}) ⇒ Object Also known as: uploadTestCaseAttachment

Uploads an attachment for a Test Case. The attachment must be Base64 encoded by the client before sending it.

Parameters:

  • test_case_id (Fixnum, String)
  • file_name (String)
  • mime_type (String)
  • content (String)

    The Base64 encoded content of the attachment.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • title (String)
  • description (String)

Returns:



646
647
648
649
650
651
652
# File 'lib/test_linker/wrapper.rb', line 646

def upload_test_case_attachment(test_case_id, file_name, mime_type, content,
    options={})
  args = { :testcaseid => test_case_id, :filename => file_name,
      :filetype => mime_type, :content => content }
  args.merge! options
  make_call("tl.uploadTestCaseAttachment", args, "1.0")
end

#upload_test_suite_attachment(suite_id, file_name, mime_type, content, options = {}) ⇒ Object Also known as: uploadTestSuiteAttachment

Uploads an attachment for a Test Suite. The attachment must be Base64 encoded by the client before sending it.

Parameters:

  • suite_id (Fixnum, String)
  • file_name (String)
  • mime_type (String)
  • content (String)

    The Base64 encoded content of the attachment.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • title (String)
  • description (String)

Returns:



667
668
669
670
671
672
673
# File 'lib/test_linker/wrapper.rb', line 667

def upload_test_suite_attachment(suite_id, file_name, mime_type, content,
    options={})
  args = { :testsuiteid => suite_id, :filename => file_name,
      :filetype => mime_type, :content => content }
  args.merge! options
  make_call("tl.uploadTestSuiteAttachment", args, "1.0")
end