postman

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package postman implements a library that configures tester.Tester from Postman collections.

Instructions:

  1. Create a new collection in Postman
  2. Create your requests in Postman. Request name will be imported as tester.TestCategory
  3. Execute your requests and save as Example. These examples will become tester.TestScenario
  4. Export your collection from Postman (right click/Export) as Collection v2.1

This library will replace variables in the request/example with variables defined on the collection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTester

func NewTester(path string) (*tester.Tester, error)

NewTester returns a Tester initialized from a Postman collection

Example:

tester, err := postman.NewTester("testdata/sample_collection.json")
if err != nil {
	t.Fatal(err)
}
defer tester.Close()
tester.Setup("user", "create_success")

_, err = c.CreateUser("user1")
if err != nil {
	t.Fatal(err)
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL