beans

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const NsModel = `urn:model.allure.qatools.yandex.ru`

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Title  string `xml:"title,attr"`
	Type   string `xml:"type,attr"`
	Size   int    `xml:"size,attr"`
	Source string `xml:"source,attr"`
}

func NewAttachment

func NewAttachment(title, mime, source string, size int) *Attachment

type Label

type Label struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type Step

type Step struct {
	Parent *Step `xml:"-"`

	Status      string        `xml:"status,attr"`
	Start       int64         `xml:"start,attr"`
	Stop        int64         `xml:"stop,attr"`
	Name        string        `xml:"name"`
	Steps       []*Step       `xml:"steps"`
	Attachments []*Attachment `xml:"attachments"`
}

func NewStep

func NewStep(name string, start time.Time) *Step

func (*Step) AddStep

func (s *Step) AddStep(step *Step)

func (*Step) End

func (s *Step) End(status string, end time.Time)

type Suite

type Suite struct {
	XMLName   xml.Name `xml:"ns2:test-suite"`
	NsAttr    string   `xml:"xmlns:ns2,attr"`
	Start     int64    `xml:"start,attr"`
	End       int64    `xml:"stop,attr"`
	Name      string   `xml:"name"`
	Title     string   `xml:"title"`
	TestCases struct {
		Cases []*TestCase `xml:"test-case"`
	} `xml:"test-cases"`
}

func NewSuite

func NewSuite(name string, start time.Time) *Suite

func (*Suite) AddTest

func (s *Suite) AddTest(test *TestCase)

add test in suite

func (Suite) HasTests

func (s Suite) HasTests() bool

suite has test-cases?

func (*Suite) SetEnd

func (s *Suite) SetEnd(endTime time.Time)

SetEnd set end time for suite

type TestCase

type TestCase struct {
	Status string `xml:"status,attr"`
	Start  int64  `xml:"start,attr"`
	Stop   int64  `xml:"stop,attr"`
	Name   string `xml:"name"`
	Steps  struct {
		Steps []*Step `xml:"step"`
	} `xml:"steps"`
	Labels struct {
		Label []*Label `xml:"label"`
	} `xml:"labels"`
	Attachments struct {
		Attachment []*Attachment `xml:"attachment"`
	} `xml:"attachments"`
	Desc    string `xml:"description"`
	Failure struct {
		Msg   string `xml:"message"`
		Trace string `xml:"stack-trace"`
	} `xml:"failure,omitempty"`
}

func NewTestCase

func NewTestCase(name string, start time.Time) *TestCase

start new test case

func (*TestCase) AddAttachment

func (t *TestCase) AddAttachment(attach *Attachment)

func (*TestCase) AddLabel

func (t *TestCase) AddLabel(name, value string)

func (*TestCase) AddStep

func (t *TestCase) AddStep(step *Step)

func (*TestCase) End

func (t *TestCase) End(status string, err error, end time.Time)

func (*TestCase) SetDescription

func (t *TestCase) SetDescription(desc string)

Jump to

Keyboard shortcuts

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