package
0.28.0
Repository: https://github.com/ovh/venom.git
Documentation: pkg.go.dev

# README

Venom - Executor OVHAPI

Step to test OVH API

Use case: you software need to make call to OVH API.
You will need OVH credentials to make API call. Please follow this tutorial to get all needed keys:
FR: https://www.ovh.com/fr/g934.premiers_pas_avec_lapi
EN: https://api.ovh.com/g934.first_step_with_api

Input

In your yaml file, you can use:

  - method optional, default value: GET
  - path mandatory, example "/me"
  - noAuth optional
  - body optional
  - bodyFile optional

name: Title of TestSuite
testcases:
- name: me
  context:
    type: default
    endpoint: 'ovh-eu'
    applicationKey: 'APPLICATION_KEY'
    applicationSecret: 'APPLICATION_SECRET'
    consumerKey: 'CONSUMER_KEY'
    insecureTLS: true #default false
  steps:
  - type: ovhapi
    method: GET
    path: /me
    headers:
      header1: value1
      header2: value2
    retry: 3
    delay: 2
    assertions:
    - result.statuscode ShouldEqual 200
    - result.bodyjson.nichandle ShouldContainSubstring MY_NICHANDLE

Output

result.executor
result.timeseconds
result.timehuman
result.statuscode
result.body
result.bodyjson
result.error
  • result.timeseconds & result.timehuman: time of execution
  • result.err: if exists, this field contains error
  • result.body: body of HTTP response
  • result.bodyjson: body of HTTP response if it's a json. You can access json data as result.bodyjson.yourkey for example
  • result.statuscode: Status Code of HTTP response

Default assertion

result.statuscode ShouldEqual 200

# Functions

New returns a new Executor.

# Constants

Name of executor.

# Structs

Executor struct.
Result represents a step result.

# Type aliases

Headers represents header HTTP for Request.