Help us shape the future of Go! Take the 2026 Go Developer Survey

generation

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImplementedTestCases

func GetImplementedTestCases(disco *discovery.ModelDiscoveryItem, nameGenerator names.Generator, ctx *model.Context, headlessTokenAcquisition bool, genConfig GeneratorConfig) ([]model.TestCase, map[string]string)

GetImplementedTestCases takes a discovery Model and determines the implemented endpoints. Currently this function is experimental - meaning it contains fmt.Printlns as an aid to understanding and conceptualisation

Types

type Generator

type Generator interface {
	GenerateManifestTests(log *logrus.Entry, config GeneratorConfig, discovery discovery.ModelDiscovery,
		ctx *model.Context, conditional []discovery.ConditionalAPIProperties) (SpecRun, manifest.Scripts, map[string][]manifest.RequiredTokens)
}

Generator - generates test cases from discovery model

func NewGenerator

func NewGenerator() Generator

NewGenerator - returns implementation of Generator interface

type GeneratorConfig

type GeneratorConfig struct {
	ClientID              string
	Aud                   string
	ResponseType          string
	Scope                 string
	AuthorizationEndpoint string
	RedirectURL           string
	ResourceIDs           model.ResourceIDs
}

GeneratorConfig -

type MockGenerator

type MockGenerator struct {
	mock.Mock
}

MockGenerator is an autogenerated mock type for the Generator type

func (*MockGenerator) GenerateManifestTests

GenerateManifestTests provides a mock function with given fields: log, config, _a2, ctx

type SpecRun

type SpecRun struct {
	SpecTestCases           []SpecificationTestCases        `json:"specCases"`
	SpecConsentRequirements []model.SpecConsentRequirements `json:"specTokens"`
}

SpecRun represents all specs and their test and a list of tokens required to run those tests

type SpecificationTestCases

type SpecificationTestCases struct {
	Specification discovery.ModelAPISpecification `json:"apiSpecification"`
	TestCases     []model.TestCase                `json:"testCases"`
}

SpecificationTestCases - test cases generated for a specification

func GetCustomTestCases

func GetCustomTestCases(discoReader *discovery.CustomTest, ctx *model.Context, headlessTokenAcquisition bool) SpecificationTestCases

GetCustomTestCases retrieves custom tests from the discovery file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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