autotest

package module
v0.0.0-...-ccaeed6 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 15 Imported by: 0

README

autotest

基于指令的自动化测试服务

go get github.com/yourhe/autotest 

cd proto && make stages

依赖

1、java环境(略)
2、protoc
get -u github.com/golang/protobuf/protoc-gen-go
3、grpc-gateway
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway 
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -u github.com/golang/protobuf/protoc-gen-go

如果遇到网络问题,可采用如下步骤

  • $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway目录
  • clone代码git clone https://github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
  • install go install

启动

  • 1、将vendor.zip解压放到项目上
  • 2、运行命令 java -Dwebdriver.chrome.driver=vendor/chromedriver-mac64-2.42 -jar vendor/selenium-server-standalone-3.14.0.jar -port 53188
  • 3、生成相关proto文件cd proto && make stages
  • 4、进入cmd目录启动cd cmd && go run main.go

Documentation

Index

Constants

View Source
const (
	// DefaultWaitInterval is the default polling interval for selenium.Wait
	// function.
	DefaultWaitInterval = 100 * time.Millisecond

	// DefaultWaitTimeout is the default timeout for selenium.Wait function.
	DefaultWaitTimeout = 60 * time.Second
)

Variables

This section is empty.

Functions

func AddAction

func AddAction(s *stages.Stage, a stages.Action)

func NewAction

func NewAction() stages.Action

func NewListener

func NewListener(wd selenium.WebDriver) *ltListener

func NewStage

func NewStage(id, description string, line int32) *stages.Stage

Types

type Action

type Action struct {
	*stages.Action
}

type Report

type Report struct {
}

Report autotest 报告

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server ...

func NewServer

func NewServer() *Server

func (*Server) GetReport

func (s *Server) GetReport() string

func (*Server) GetWd

func (s *Server) GetWd() selenium.WebDriver

func (*Server) RunTest

func (s *Server) RunTest(rawtl string) []*stages.Stage

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop() error

type Stage

type Stage stages.Stage

type Stages

type Stages []*stages.Stage

func NewStages

func NewStages() Stages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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