Documentation ¶
Overview ¶
Package runscope implements a client library for the runscope api (https://api.blazemeter.com/api-monitoring/)
Package runscope implements a client library for the runscope api (https://api.blazemeter.com/api-monitoring/)
Index ¶
- Constants
- func DebugF(level int, format string, args ...interface{})
- func ErrorF(level int, format string, args ...interface{})
- func InfoF(level int, format string, args ...interface{})
- func RegisterLogHandlers(debug func(level int, format string, args ...interface{}), ...)
- type Account
- type Agent
- type Assertion
- type Bucket
- type Client
- func (client *Client) CreateBucket(bucket *Bucket) (*Bucket, error)
- func (client *Client) CreateRole(role *Role, teamID string) (*Role, error)
- func (client *Client) CreateSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error)
- func (client *Client) CreateSharedEnvironment(environment *Environment, bucket *Bucket) (*Environment, error)
- func (client *Client) CreateTest(test *Test) (*Test, error)
- func (client *Client) CreateTestEnvironment(environment *Environment, test *Test) (*Environment, error)
- func (client *Client) CreateTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error)
- func (client *Client) DeleteBucket(key string) error
- func (client *Client) DeleteBuckets(predicate func(bucket *Bucket) bool) error
- func (client *Client) DeleteEnvironment(environment *Environment, bucket *Bucket) error
- func (client *Client) DeleteRole(role *Role, teamID string) error
- func (client *Client) DeleteSchedule(schedule *Schedule, bucketKey string, testID string) error
- func (client *Client) DeleteTest(test *Test) error
- func (client *Client) DeleteTestStep(testStep *TestStep, bucketKey string, testID string) error
- func (client *Client) GetAccount() (*Account, error)
- func (client *Client) ListAgents(teamID string) ([]*Agent, error)
- func (client *Client) ListAllTests(input *ListTestsInput) ([]*Test, error)
- func (client *Client) ListBuckets() ([]*Bucket, error)
- func (client *Client) ListIntegrations(teamID string) ([]*Integration, error)
- func (client *Client) ListPeople(teamID string) ([]*People, error)
- func (client *Client) ListRegions() (*Regions, error)
- func (client *Client) ListResults(bucketKey string, testID string) ([]*Result, error)
- func (client *Client) ListRoles(teamID string) ([]*Role, error)
- func (client *Client) ListSchedules(bucketKey string, testID string) ([]*Schedule, error)
- func (client *Client) ListSharedEnvironment(bucket *Bucket) ([]*Environment, error)
- func (client *Client) ListTestEnvironment(bucket *Bucket, test *Test) ([]*Environment, error)
- func (client *Client) ListTests(input *ListTestsInput) ([]*Test, error)
- func (client *Client) ReadBucket(key string) (*Bucket, error)
- func (client *Client) ReadRole(role *Role, teamID string) (*Role, error)
- func (client *Client) ReadSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error)
- func (client *Client) ReadSharedEnvironment(environment *Environment, bucket *Bucket) (*Environment, error)
- func (client *Client) ReadTest(test *Test) (*Test, error)
- func (client *Client) ReadTestEnvironment(environment *Environment, test *Test) (*Environment, error)
- func (client *Client) ReadTestLatestResult(testID string, bucketKey string) (*Result, error)
- func (client *Client) ReadTestMetrics(test *Test, input *ReadMetricsInput) (*TestMetric, error)
- func (client *Client) ReadTestResult(testRunID string, bucketKey string, testID string) (*Result, error)
- func (client *Client) ReadTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error)
- func (client *Client) ReadTestStepResult(testRunID string, bucketKey string, testID string, testStepID string) (*Result, error)
- func (client *Client) UpdateRole(role *Role, teamID string) (*Role, error)
- func (client *Client) UpdateSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error)
- func (client *Client) UpdateSharedEnvironment(environment *Environment, bucket *Bucket) (*Environment, error)
- func (client *Client) UpdateTest(test *Test) (*Test, error)
- func (client *Client) UpdateTestEnvironment(environment *Environment, test *Test) (*Environment, error)
- func (client *Client) UpdateTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error)
- type ClientAPI
- type Contact
- type EmailSettings
- type Environment
- type EnvironmentIntegration
- type Integration
- type ListTestsInput
- type LocalMachine
- type People
- type ReadMetricsInput
- type Region
- type Regions
- type Request
- type ResponseTime
- type Result
- type Role
- type Schedule
- type Script
- type Team
- type Test
- type TestMetric
- type TestRun
- type TestStep
- type TimePeriodMetic
- type Variable
Constants ¶
const APIURL = "https://api.runscope.com"
APIURL is the default runscope api uri
const (
// DefaultPageSize is the max number of items fetched in each request
DefaultPageSize = 10
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { Name string `json:"name"` Email string `json:"email"` ID string `json:"id"` UUID string `json:"uuid"` Teams []Team `json:"teams"` }
Account represents Runscope account
type Assertion ¶
type Assertion struct { Comparison string `json:"comparison,omitempty"` Value interface{} `json:"value,omitempty"` Source string `json:"source,omitempty"` Property string `json:"property,omitempty"` }
Assertion allow you to specify success criteria for a given request, Ghost Inspector, subtest, or condition step. Each assertion is defined by a source, property, comparison, and value. See https://www.runscope.com/docs/api/steps#assertions
type Bucket ¶
type Bucket struct { Name string `json:"name,omitempty"` Key string `json:"key,omitempty"` Default bool `json:"default,omitempty"` AuthToken string `json:"auth_token,omitempty"` TestsURL string `json:"tests_url,omitempty" mapstructure:"tests_url"` CollectionsURL string `json:"collections_url,omitempty"` MessagesURL string `json:"messages_url,omitempty"` TriggerURL string `json:"trigger_url,omitempty"` VerifySsl bool `json:"verify_ssl,omitempty"` Team *Team `json:"team,omitempty"` }
Bucket resources are a simple way to organize your requests and tests. See https://api.blazemeter.com/api-monitoring/#buckets and https://www.runscope.com/docs/buckets
type Client ¶
Client provides access to create, read, update and delete runscope resources
func (*Client) CreateBucket ¶
CreateBucket creates a new bucket resource. See https://api.blazemeter.com/api-monitoring/#creating-a-bucket
func (*Client) CreateRole ¶
CreateRole creates a new role with specified permissions. See https://api.blazemeter.com/api-monitoring/#create-role
func (*Client) CreateSchedule ¶
func (client *Client) CreateSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error)
CreateSchedule creates a new test schedule. See https://api.blazemeter.com/api-monitoring/#schedule-details
func (*Client) CreateSharedEnvironment ¶
func (client *Client) CreateSharedEnvironment(environment *Environment, bucket *Bucket) (*Environment, error)
CreateSharedEnvironment creates a new shared environment. See https://www.runscope.com/docs/api/environments#create-shared
func (*Client) CreateTest ¶
CreateTest creates a new runscope test. See https://www.runscope.com/docs/api/tests#create
func (*Client) CreateTestEnvironment ¶
func (client *Client) CreateTestEnvironment(environment *Environment, test *Test) (*Environment, error)
CreateTestEnvironment creates a new test environment. See https://www.runscope.com/docs/api/environments#create
func (*Client) CreateTestStep ¶
func (client *Client) CreateTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error)
CreateTestStep creates a new runscope test step. See https://www.runscope.com/docs/api/steps#add
func (*Client) DeleteBucket ¶
DeleteBucket deletes a bucket by key. See https://www.runscope.com/docs/api/buckets#bucket-delete
func (*Client) DeleteBuckets ¶
DeleteBuckets deletes all buckets matching the predicate
func (*Client) DeleteEnvironment ¶
func (client *Client) DeleteEnvironment(environment *Environment, bucket *Bucket) error
DeleteEnvironment deletes an existing shared environment. https://www.runscope.com/docs/api/environments#delete
func (*Client) DeleteRole ¶
DeleteRole delete runscope role. See https://api.blazemeter.com/api-monitoring/#delete-a-role
func (*Client) DeleteSchedule ¶
DeleteSchedule delete an existing test schedule. See https://api.blazemeter.com/api-monitoring/#delete-test-schedule
func (*Client) DeleteTest ¶
DeleteTest delete an existing test. See https://www.runscope.com/docs/api/tests#delete
func (*Client) DeleteTestStep ¶
DeleteTestStep delete an existing test step. https://www.runscope.com/docs/api/steps#delete
func (*Client) GetAccount ¶
GetAccount returns runscope account information https://api.blazemeter.com/api-monitoring/#account
func (*Client) ListAgents ¶
ListAgents list all the agents. See https://api.blazemeter.com/api-monitoring/#agents
func (*Client) ListAllTests ¶
func (client *Client) ListAllTests(input *ListTestsInput) ([]*Test, error)
ListAllTests lists all tests for a bucket
func (*Client) ListBuckets ¶
ListBuckets lists all buckets for an account
func (*Client) ListIntegrations ¶
func (client *Client) ListIntegrations(teamID string) ([]*Integration, error)
ListIntegrations list all configured integrations for your team. See https://www.runscope.com/docs/api/integrations
func (*Client) ListPeople ¶
ListPeople list all the people on your team. See https://www.runscope.com/docs/api/teams
func (*Client) ListRegions ¶
ListRegions returns all regions known by Runscope https://api.blazemeter.com/api-monitoring/#regions
func (*Client) ListResults ¶
ListResults list all results for test. https://api.blazemeter.com/api-monitoring/#test-result-list
func (*Client) ListRoles ¶
ListRoles list all the roles. See https://api.blazemeter.com/api-monitoring/#list-roles
func (*Client) ListSchedules ¶
ListSchedules list all the schedules for a given test. See https://api.blazemeter.com/api-monitoring/#test-schedule-list
func (*Client) ListSharedEnvironment ¶
func (client *Client) ListSharedEnvironment(bucket *Bucket) ([]*Environment, error)
ListSharedEnvironment lists all shared environments for a given bucket. See https://www.runscope.com/docs/api/environments#list-shared
func (*Client) ListTestEnvironment ¶
func (client *Client) ListTestEnvironment(bucket *Bucket, test *Test) ([]*Environment, error)
ListTestEnvironment lists all tests environments in a given test. See https://api.blazemeter.com/api-monitoring/#test-envrionment-list
func (*Client) ListTests ¶
func (client *Client) ListTests(input *ListTestsInput) ([]*Test, error)
ListTests lists some tests given ListTestsInput
func (*Client) ReadBucket ¶
ReadBucket list details about an existing bucket resource. See https://www.runscope.com/docs/api/buckets#bucket-list
func (*Client) ReadRole ¶
ReadRole creates a new role with specified permissions. See https://api.blazemeter.com/api-monitoring/#role-details
func (*Client) ReadSchedule ¶
func (client *Client) ReadSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error)
ReadSchedule list details about an existing test schedule. See https://api.blazemeter.com/api-monitoring/#schedule-details
func (*Client) ReadSharedEnvironment ¶
func (client *Client) ReadSharedEnvironment(environment *Environment, bucket *Bucket) (*Environment, error)
ReadSharedEnvironment lists details about an existing shared environment. See https://www.runscope.com/docs/api/environments#detail
func (*Client) ReadTest ¶
ReadTest list details about an existing test. See https://www.runscope.com/docs/api/tests#detail
func (*Client) ReadTestEnvironment ¶
func (client *Client) ReadTestEnvironment(environment *Environment, test *Test) (*Environment, error)
ReadTestEnvironment lists details about an existing test environment. See https://www.runscope.com/docs/api/environments#detail
func (*Client) ReadTestLatestResult ¶
ReadTestLatestResult list details about an existing latest result. https://api.blazemeter.com/api-monitoring/#test-result-step-detail
func (*Client) ReadTestMetrics ¶
func (client *Client) ReadTestMetrics(test *Test, input *ReadMetricsInput) (*TestMetric, error)
ReadTestMetrics retrieves metrics for a test. See https://www.runscope.com/docs/api/metrics
func (*Client) ReadTestResult ¶
func (client *Client) ReadTestResult(testRunID string, bucketKey string, testID string) (*Result, error)
ReadTestResult list details about an existing result. https://api.blazemeter.com/api-monitoring/#test-result-detail
func (*Client) ReadTestStep ¶
func (client *Client) ReadTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error)
ReadTestStep list details about an existing test step. https://www.runscope.com/docs/api/steps#detail
func (*Client) ReadTestStepResult ¶
func (client *Client) ReadTestStepResult(testRunID string, bucketKey string, testID string, testStepID string) (*Result, error)
ReadTestStepResult list details about an existing result. https://api.blazemeter.com/api-monitoring/#test-result-step-detail
func (*Client) UpdateRole ¶
UpdateRole update a runscope role. See https://api.blazemeter.com/api-monitoring/#modify-role
func (*Client) UpdateSchedule ¶
func (client *Client) UpdateSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error)
UpdateSchedule updates an existing test schedule. See https://api.blazemeter.com/api-monitoring/#modify-schedule
func (*Client) UpdateSharedEnvironment ¶
func (client *Client) UpdateSharedEnvironment(environment *Environment, bucket *Bucket) (*Environment, error)
UpdateSharedEnvironment updates details about an existing shared environment. See https://www.runscope.com/docs/api/environments#modify
func (*Client) UpdateTest ¶
UpdateTest update an existing test. See https://www.runscope.com/docs/api/tests#modifying
func (*Client) UpdateTestEnvironment ¶
func (client *Client) UpdateTestEnvironment(environment *Environment, test *Test) (*Environment, error)
UpdateTestEnvironment updates details about an existing test environment. See https://www.runscope.com/docs/api/environments#modify
func (*Client) UpdateTestStep ¶
func (client *Client) UpdateTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error)
UpdateTestStep updates an existing test step. https://www.runscope.com/docs/api/steps#modify
type ClientAPI ¶
type ClientAPI interface { CreateBucket(bucket *Bucket) (*Bucket, error) CreateSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error) CreateTest(test *Test) (*Test, error) CreateTestEnvironment(environment *Environment, test *Test) (*Environment, error) CreateTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error) DeleteBucket(key string) error DeleteBuckets(predicate func(bucket *Bucket) bool) error DeleteEnvironment(environment *Environment, bucket *Bucket) error DeleteSchedule(schedule *Schedule, bucketKey string, testID string) error DeleteTest(test *Test) error DeleteTestStep(testStep *TestStep, bucketKey string, testID string) error ListBuckets() ([]*Bucket, error) ListTests(input *ListTestsInput) ([]*Test, error) ListAllTests(input *ListTestsInput) ([]*Test, error) ListSchedules(bucketKey string, testID string) ([]*Schedule, error) ListIntegrations(teamID string) ([]*Integration, error) ListPeople(teamID string) ([]*People, error) ListAgents(teamID string) ([]*Agent, error) ListTestEnvironment(bucket *Bucket, test *Test) ([]*Environment, error) ReadBucket(key string) (*Bucket, error) ReadSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error) ReadTest(test *Test) (*Test, error) ReadTestMetrics(test *Test, input *ReadMetricsInput) (*TestMetric, error) ReadTestEnvironment(environment *Environment, test *Test) (*Environment, error) ReadTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error) UpdateSchedule(schedule *Schedule, bucketKey string, testID string) (*Schedule, error) UpdateTest(test *Test) (*Test, error) UpdateTestEnvironment(environment *Environment, test *Test) (*Environment, error) UpdateTestStep(testStep *TestStep, bucketKey string, testID string) (*TestStep, error) ListResults(bucketKey string, testID string) ([]*Result, error) ReadTestResult(testRunID string, bucketKey string, testID string) (*Result, error) ReadTestLatestResult(testID string, bucketKey string) (*Result, error) ReadTestStepResult(testRunID string, bucketKey string, testID string, testStepID string) (*Result, error) ListRegions() (*Regions, error) GetAccount() (*Account, error) }
ClientAPI interface for mocking data in unit tests
func NewClientAPI ¶
NewClientAPI Interface initialization
type Contact ¶
type Contact struct { Email string `json:"email,omitempty"` ID string `json:"id"` Name string `json:"name,omitempty"` }
Contact details
type EmailSettings ¶
type EmailSettings struct { NotifyAll bool `json:"notify_all,omitempty"` NotifyOn string `json:"notify_on,omitempty"` NotifyThreshold int `json:"notify_threshold,omitempty"` Recipients []*Contact `json:"recipients,omitempty"` }
EmailSettings determining how test failures trigger notifications
type Environment ¶
type Environment struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Script string `json:"script,omitempty"` PreserveCookies bool `json:"preserve_cookies"` TestID string `json:"test_id,omitempty"` InitialVariables map[string]string `json:"initial_variables,omitempty"` Integrations []*EnvironmentIntegration `json:"integrations,omitempty"` Regions []string `json:"regions,omitempty"` VerifySsl bool `json:"verify_ssl"` ExportedAt *time.Time `json:"exported_at,omitempty"` RetryOnFailure bool `json:"retry_on_failure"` RemoteAgents []*LocalMachine `json:"remote_agents,omitempty"` WebHooks []string `json:"webhooks,omitempty"` ParentEnvironmentID string `json:"parent_environment_id,omitempty"` EmailSettings *EmailSettings `json:"emails,omitempty"` ClientCertificate string `json:"client_certificate,omitempty"` Headers map[string][]string `json:"headers,omitempty"` }
Environment stores details for shared and test-specific environments. See https://www.runscope.com/docs/api/environments
func (*Environment) String ¶
func (environment *Environment) String() string
type EnvironmentIntegration ¶
type EnvironmentIntegration struct { ID string `json:"id"` IntegrationType string `json:"integration_type"` Description string `json:"description,omitempty"` }
EnvironmentIntegration represents an integration with a third-party. See https://www.runscope.com/docs/api/integrations
type Integration ¶
type Integration struct { ID string `json:"id"` UUID string `json:"uuid"` IntegrationType string `json:"type"` Description string `json:"description,omitempty"` }
Integration represents an integration with a third-party. See https://www.runscope.com/docs/api/integrations
type ListTestsInput ¶
ListTestsInput represents the input to ListTests func
type LocalMachine ¶
LocalMachine used in an environment to represent a remote agent
type People ¶
type People struct { ID string `json:"id"` UUID string `json:"uuid"` Name string `json:"name"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` LastLoginAt time.Time `json:"last_login_at"` GroupName string `json:"group_name"` }
People represents a person belonging to a team. See https://www.runscope.com/docs/api/teams
type ReadMetricsInput ¶
type Region ¶
type Region struct { RegionCode string `json:"region_code"` Location string `json:"location"` ServiceProvider string `json:"service_provider"` Hostname string `json:"hostname"` }
Region represents a Runscope region
type Regions ¶
type Regions struct {
Regions []Region `json:"regions"`
}
Regions represents multiple Runscope regions
type Request ¶
type Request struct { Result string `json:"result"` URL string `json:"url"` Method string `json:"method"` AssertionsDefined int `json:"assertions_defined"` AssertionsFailed int `json:"assertions_failed"` AssertionsPassed int `json:"assertions_passed"` ScriptsDefined int `json:"scripts_defined"` ScriptsFailed int `json:"scripts_failed"` ScriptsPassed int `json:"scripts_passed"` VariablesDefined int `json:"variables_defined"` VariablesFailed int `json:"variables_failed"` VariablesPassed int `json:"variables_passed"` Assertions []Assertion `json:"assertions"` Scripts []Script `json:"scripts"` Variables []Variable `json:"variables"` }
Request represents the result of a request made by a given test
type ResponseTime ¶
type Result ¶
type Result struct { AssertionsDefined int `json:"assertions_defined"` AssertionsFailed int `json:"assertions_failed"` AssertionsPassed int `json:"assertions_passed"` BucketKey string `json:"bucket_key"` FinishedAt float64 `json:"finished_at"` Region string `json:"region"` RequestsExecuted int `json:"requests_executed"` Result string `json:"result"` ScriptsDefined int `json:"scripts_defined"` ScriptsFailed int `json:"scripts_failed"` ScriptsPassed int `json:"scripts_passed"` StartedAt float64 `json:"started_at"` TestRunID string `json:"test_run_id"` TestRunURL string `json:"test_run_url"` TestID string `json:"test_id"` VariablesDefined int `json:"variables_defined"` VariablesFailed int `json:"variables_failed"` VariablesPassed int `json:"variables_passed"` EnvironmentID string `json:"environment_id"` EnvironmentName string `json:"environment_name"` Requests []Request `json:"requests"` }
type Schedule ¶
type Schedule struct { ID string `json:"id,omitempty"` EnvironmentID string `json:"environment_id,omitempty"` Interval string `json:"interval,omitempty"` Note string `json:"note,omitempty"` }
Schedule determines how often a test is executed. See https://api.blazemeter.com/api-monitoring/#schedules
type Script ¶
type Script struct {
Value string `json:"value"`
}
Script not sure how this is used, currently not documented, but looks like a javascript string that gets evaluated? See See https://www.runscope.com/docs/api/steps
type Test ¶
type Test struct { ID string `json:"id,omitempty"` Bucket *Bucket `json:"-"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` CreatedBy *Contact `json:"created_by,omitempty"` DefaultEnvironmentID string `json:"default_environment_id,omitempty"` ExportedAt *time.Time `json:"exported_at,omitempty"` Environments []*Environment `json:"environments"` LastRun *TestRun `json:"last_run"` Steps []*TestStep `json:"steps"` }
Test represents the details for a runscope test. See https://www.runscope.com/docs/api/tests
type TestMetric ¶
type TestMetric struct { ResponseTimes []ResponseTime `json:"response_times"` EnvironemntUUID string `json:"environment_uuid,omitempty"` Region string `json:"region,omitempty"` Timeframe string `json:"timeframe,omitempty"` ThisTimePeriod TimePeriodMetic `json:"this_time_period"` ChangeFromLastPeriod TimePeriodMetic `json:"change_from_last_period"` }
type TestRun ¶
type TestRun struct { RemoteAgentUUID string `json:"remote_agent_uuid,omitempty"` FinishedAt *time.Time `json:"finished_at,omitempty"` ErrorCount int `json:"error_count,omitempty"` MessageSuccess int `json:"message_success,omitempty"` TestUUID string `json:"test_uuid,omitempty"` ID string `json:"id,omitempty"` ExtractorSuccess int `json:"extractor_success,omitempty"` UUID string `json:"uuid,omitempty"` EnvironmentUUID string `json:"environment_uuid,omitempty"` EnvironmentName string `json:"environment_name,omitempty"` Source string `json:"source,omitempty"` RemoteAgentName string `json:"remote_agent_name,omitempty"` RemoteAgent string `json:"remote_agent,omitempty"` Status string `json:"status,omitempty"` BucketKey string `json:"bucket_key,omitempty"` RemoteAgentVersion string `json:"remote_agent_version,omitempty"` SubstitutionSuccess int `json:"substitution_success,omitempty"` MessageCount int `json:"message_count,omitempty"` ScriptCount int `json:"script_count,omitempty"` SubstitutionCount int `json:"substitution_count,omitempty"` ScriptSuccess int `json:"script_success,omitempty"` AssertionCount int `json:"assertion_count,omitempty"` AssertionSuccess int `json:"assertion_success,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` Messages []string `json:"messages,omitempty"` ExtractorCount int `json:"extractor_count,omitempty"` TemplateUUIDs []string `json:"template_uuids,omitempty"` Region string `json:"region,omitempty"` }
TestRun represents the details of the last time the test ran
type TestStep ¶
type TestStep struct { URL string `json:"url,omitempty"` Variables []*Variable `json:"variables,omitempty"` Args map[string]interface{} `json:"args,omitempty"` StepType string `json:"step_type,omitempty"` Auth map[string]string `json:"auth,omitempty"` ID string `json:"id,omitempty"` Body string `json:"body,omitempty"` Note string `json:"note,omitempty"` Headers map[string][]string `json:"headers,omitempty"` RequestID string `json:"request_id,omitempty"` Assertions []*Assertion `json:"assertions,omitempty"` Scripts []string `json:"scripts,omitempty"` BeforeScripts []string `json:"before_scripts,omitempty"` Method string `json:"method,omitempty"` TestUUID string `json:"test_uuid,omitempty"` }
TestStep represents each step that makes up part of the test. See https://www.runscope.com/docs/api/steps
type TimePeriodMetic ¶
type TimePeriodMetic struct { ResponseTime50thPercentile float64 `json:"response_time_50th_percentile,omitempty"` ResponseTime95thPercentile float64 `json:"response_time_95th_percentile,omitempty"` ResponseTime99thPercentile float64 `json:"response_time_99th_percentile,omitempty"` TotalTestRuns float64 `json:"total_test_runs,omitempty"` }
type Variable ¶
type Variable struct { Name string `json:"name,omitempty"` Property string `json:"property,omitempty"` Source string `json:"source,omitempty"` }
Variable allow you to extract data from request, subtest, and Ghost Inspector steps for use in subsequent steps in the test. Similar to Assertions, each variable is defined by a name, source, and property. See https://www.runscope.com/docs/api/steps#variables