exporter

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(format string, req ExportRequest) error

Export exports tests to the specified format

func ResolveExportPath

func ResolveExportPath(path string) (string, error)

ResolveExportPath converts relative paths to absolute paths under ~/Documents/octrafic/tests/

func SupportedFormats

func SupportedFormats() []string

SupportedFormats returns list of supported export formats

Types

type CurlExporter

type CurlExporter struct{}

func (*CurlExporter) Export

func (e *CurlExporter) Export(req ExportRequest) error

func (*CurlExporter) FileExtension

func (e *CurlExporter) FileExtension() string

type ExportRequest

type ExportRequest struct {
	BaseURL  string
	Tests    []TestData
	FilePath string
	AuthType string
	AuthData map[string]string
}

ExportRequest contains all data needed for export

type Exporter

type Exporter interface {
	Export(req ExportRequest) error
	FileExtension() string
}

Exporter defines the interface for test exporters

type PostmanExporter

type PostmanExporter struct{}

func (*PostmanExporter) Export

func (e *PostmanExporter) Export(req ExportRequest) error

func (*PostmanExporter) FileExtension

func (e *PostmanExporter) FileExtension() string

type PytestExporter

type PytestExporter struct{}

func (*PytestExporter) Export

func (e *PytestExporter) Export(req ExportRequest) error

func (*PytestExporter) FileExtension

func (e *PytestExporter) FileExtension() string

type TestData

type TestData struct {
	Method       string
	Endpoint     string
	Headers      map[string]string
	Body         interface{}
	StatusCode   int
	ResponseBody string
	DurationMS   int64
	RequiresAuth bool
	Error        string
}

TestData represents a single test result to export

Jump to

Keyboard shortcuts

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