Class: QAT::Reporter::Xray::Publisher::Hosted
- Defined in:
- lib/qat/reporter/xray/publisher/hosted.rb
Overview
QAT::Reporter::Xray::Publisher::Hosted integrator class
Instance Attribute Summary
Attributes inherited from Base
#base_url, #cloud_xray_api_credentials, #default_cloud_api_url, #default_headers, #login_credentials
Instance Method Summary collapse
-
#export_test_scenarios(keys, filter) ⇒ Object
Export Xray test scenarios to a zip file via API.
-
#import_cucumber_tests(project_key, file_path) ⇒ Object
Import Cucumber features files as a zip file via API.
-
#send_execution_results(results) ⇒ Object
Posts the execution json results in Xray.
Methods inherited from Base
Constructor Details
This class inherits a constructor from QAT::Reporter::Xray::Publisher::Base
Instance Method Details
#export_test_scenarios(keys, filter) ⇒ Object
Export Xray test scenarios to a zip file via API
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/qat/reporter/xray/publisher/hosted.rb', line 38 def export_test_scenarios(keys, filter) params = { keys: keys, fz: true } params[:filter] = filter unless filter == 'nil' headers = default_headers.merge(params: params) rsp = RestClient.get("#{base_url}/rest/raven/1.0/export/test", headers) extract_feature_files(rsp) end |
#import_cucumber_tests(project_key, file_path) ⇒ Object
Import Cucumber features files as a zip file via API
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/qat/reporter/xray/publisher/hosted.rb', line 22 def import_cucumber_tests(project_key, file_path) headers = default_headers.merge({ multipart: true, params: { projectKey: project_key } }) payload = { file: File.new(file_path, 'rb') } Client.new(base_url).post('/rest/raven/1.0/import/feature', payload, headers) end |