Class: ATM::Services::TestPlan

Inherits:
Base
  • Object
show all
Defined in:
lib/atm_ruby/services/test_plan.rb

Overview

ATM::Services::TestPlan

Instance Attribute Summary

Attributes inherited from Base

#[], #auth_header, #header, #project_id, #response

Instance Method Summary collapse

Methods inherited from Base

#initialize, #set_response

Constructor Details

This class inherits a constructor from ATM::Services::Base

Instance Method Details

#find(plan_key) ⇒ Object

Retrives data for specific test plan

plan_data = ATM::CLinet.new.TestPlan.find(‘RR-P20’)

Examples:

Retrive data for a plan_key

Parameters:

  • plan_key (String)


11
12
13
14
15
16
# File 'lib/atm_ruby/services/test_plan.rb', line 11

def find(plan_key)
  self.class.get("/rest/kanoahtests/1.0/testplan/#{plan_key.upcase}", headers: auth_header).tap do |res|
    set_response(res)
    raise ATM::TestPlanError, response unless response.code == 200
  end
end