evidence

package
v0.0.0-...-201b726 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const IMG_SCALE string = `{"x_scale": %f, "y_scale": %f}`

图片缩放设置

View Source
const SHAPE_OPTION string = `{"type":"%s","color":{"line":"#FF0000","fill":"#FFFFFF"},"width":%.f,"height": %.f}`

形状设置(向下箭头 红线框 白色)

View Source
const SHAPE_TYPE_DOWN_ARROW = "downArrow"

Variables

This section is empty.

Functions

func AddEvidence

func AddEvidence(eviOption EvidenceOption) error

在测试结果文件中填加证据图片

Types

type Case

type Case struct {
	CaseNo      string   `yaml:"caseNo"`
	CaseContent string   `yaml:"caseContent"`
	ImagePath   []string `yaml:"imagePath"` // 测试Case对应的所有证据图片的全路径
}

测试Case

type EvidenceOption

type EvidenceOption struct {
	TestCaseFile         string  `yaml:"testCaseFile"`         // 测试证据文件, XLSX文件
	TestCase             []Case  `yaml:"testCase"`             // 测试Case
	EvidenceSheetName    string  `yaml:"evidenceSheetName"`    // 测试证据工作表
	EvidenceRootPath     string  `yaml:"evidenceRootPath"`     // 测试证据根路径
	EvidenceAddStartCell string  `yaml:"evidenceAddStartCell"` // 测试证据图片插入起始单元格
	EvidenceScale        float64 `yaml:"evidenceScale"`        // 测试证据图片缩放率
	EvidenceOffsetRow    int     `yaml:"evidenceOffsetRow"`    // 测试证据图片间隔行数
}

测试证据选项

func ReadEvidenceInput

func ReadEvidenceInput(file string) (eviOption EvidenceOption, err error)

获取输入

type ImageOption

type ImageOption struct {
	CaseInfoColumn string  // 测试Case信息插入列  例: A B
	StartRow       int     // 图片插入开始行
	Scale          float64 // 图片缩放率
	OffsetRow      int     // 图片间的偏移行数
	TestCase       []Case  // 测试Case
}

图片选项

type ShapeOption

type ShapeOption struct {
	AddFlag   bool    // 是否添加标志,true为添加,false为不添加
	Type      string  // 形状类型
	ColorLine string  // 线颜色
	ColorFill string  // 填充颜色
	Width     float64 // 宽
	Height    float64 // 高
}

形状选项

Jump to

Keyboard shortcuts

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