class RunscopeCi::RsTest
Attributes
agent[R]
assertions_defined[R]
assertions_failed[R]
assertions_passed[R]
bucket_key[R]
environment_id[R]
environment_name[R]
finished_at[R]
region[R]
requests[R]
requests_executed[R]
result[RW]
scripts_defined[R]
scripts_failed[R]
scripts_passed[R]
started_at[R]
status[R]
test_id[R]
test_name[R]
test_run_id[R]
test_run_url[R]
test_url[R]
url[R]
variables[R]
variables_defined[R]
variables_failed[R]
variables_passed[R]
Public Class Methods
new(run)
click to toggle source
expects parsed json 'run' block from Runscope API response like trigger bucket call
# File lib/runscope_ci.rb, line 56 def initialize(run) @status = run["status"] @environment_id = run["environment_id"] @bucket_key = run["bucket_key"] @variables = run["variables"] @agent = run["agent"] @test_name = run["test_name"] @test_id = run["test_id"] @url = run["url"] @region = run["region"] @environment_name = run["environment_name"] @test_url = run["test_url"] @test_run_url = run["test_run_url"] @test_run_id = run["test_run_id"] end
Public Instance Methods
result_detail()
click to toggle source
# File lib/runscope_ci.rb, line 72 def result_detail res = self.class.get("/buckets/#{@bucket_key}/tests/#{@test_id}/results/#{@test_run_id}", headers: {"Authorization" => "Bearer #{access_token}"}) raise "Received error #{res.code} #{res.message} #{res.body}" unless res.code == 200 result = JSON.parse(res.body)["data"] @started_at = result["started_at"] @finished_at = result["finished_at"] @scripts_defined = result["scripts_defined"] @assertions_failed = result["assertions_failed"] @variables_failed = result["variables_failed"] @variables_passed = result["variables_passed"] @result = result["result"] @requests_executed = result["requests_executed"] @assertions_defined = result["assertions_defined"] @assertions_passed = result["assertions_passed"] @scripts_passed = result["scripts_passed"] @scripts_failed = result["scripts_failed"] @variables_defined = result["variables_defined"] @requests = result["requests"] self end