Class: EasyqaApi::TestRun
Overview
Test Run representation from EasyQA website
Constant Summary
Constants inherited from Item
Constants included from ClassMethodsSettable
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#id ⇒ Object
Returns the value of attribute id.
-
#project_token ⇒ Object
Returns the value of attribute project_token.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
-
.all(project_token, user = @@default_user) ⇒ Array
List of all test runs in project.
Instance Method Summary collapse
-
#create(attrs, user = @@default_user) ⇒ Hash
Create test run on EasyQA website.
-
#delete(project_token = @project_token, id = @id, user = @@default_user) ⇒ Hash
Delete test run on EasyQA website.
-
#show(project_token = @project_token, id = @id, user = @@default_user) ⇒ Hash
Show test run from EasyQA website.
-
#update(attrs, user = @@default_user) ⇒ Hash
Update test run on EasyQA website.
Methods inherited from Item
#initialize, #install_variables!, json_connection, multipart_connection, operation_status, send_request
Methods included from ClassMethodsSettable
Constructor Details
This class inherits a constructor from EasyqaApi::Item
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
25 26 27 |
# File 'lib/easyqa_api/items/test_run.rb', line 25 def attributes @attributes end |
#id ⇒ Object
Returns the value of attribute id.
25 26 27 |
# File 'lib/easyqa_api/items/test_run.rb', line 25 def id @id end |
#project_token ⇒ Object
Returns the value of attribute project_token.
25 26 27 |
# File 'lib/easyqa_api/items/test_run.rb', line 25 def project_token @project_token end |
#title ⇒ Object
Returns the value of attribute title.
25 26 27 |
# File 'lib/easyqa_api/items/test_run.rb', line 25 def title @title end |
Class Method Details
.all(project_token, user = @@default_user) ⇒ Array
List of all test runs in project
34 35 36 37 38 39 40 41 |
# File 'lib/easyqa_api/items/test_run.rb', line 34 def self.all(project_token, user = @@default_user) send_request('test_runs', :get) do |req| req.params = { auth_token: user.auth_token, token: project_token } end end |
Instance Method Details
#create(attrs, user = @@default_user) ⇒ Hash
If you add test plan id to tes_run_result_attributes all test cases from this test plan has been included to your test run
Create test run on EasyQA website. Have a class method analog
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/easyqa_api/items/test_run.rb', line 45 def create(attrs, user = @@default_user) attrs = { project_token: @project_token }.merge(attrs) @attributes = send_request('test_runs', :post) do |req| req.body = { test_run: attrs.except(:project_token), token: attrs[:project_token], auth_token: user.auth_token } end end |
#delete(project_token = @project_token, id = @id, user = @@default_user) ⇒ Hash
Delete test run on EasyQA website. Have a class method analog
83 84 85 86 87 88 89 90 |
# File 'lib/easyqa_api/items/test_run.rb', line 83 def delete(project_token = @project_token, id = @id, user = @@default_user) @attributes = send_request("test_runs/#{id}", :delete) do |req| req.params = { token: project_token, auth_token: user.auth_token } end end |
#show(project_token = @project_token, id = @id, user = @@default_user) ⇒ Hash
Show test run from EasyQA website. Have a class method analog
58 59 60 61 62 63 64 65 |
# File 'lib/easyqa_api/items/test_run.rb', line 58 def show(project_token = @project_token, id = @id, user = @@default_user) @attributes = send_request("test_runs/#{id}", :get) do |req| req.params = { token: project_token, auth_token: user.auth_token } end end |
#update(attrs, user = @@default_user) ⇒ Hash
If you add test plan id to tes_run_result_attributes all test cases from this test plan has been included to your test run
Update test run on EasyQA website. Have a class method analog
70 71 72 73 74 75 76 77 78 79 |
# File 'lib/easyqa_api/items/test_run.rb', line 70 def update(attrs, user = @@default_user) attrs = { id: @id, project_token: @project_token }.merge(attrs) @attributes = send_request("test_runs/#{attrs[:id]}", :put) do |req| req.body = { test_run: attrs.except(:project_token, :id), token: attrs[:project_token], auth_token: user.auth_token } end end |