flowcus

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

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

Go to latest
Published: Dec 13, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

README

Flowcus

Flowcus is an easy to use data flow testing framework to implement Black Box Testing.

Context

As a devOps trainee in a company providing analytics services, my first assignment was to write a software to perform integration tests on the data collection process. The data goes through different stages of treatment, my goal was to test these steps as well as the entire process flow. The real challenge was to correctly setup the test and being able to perform it, not really to write the test itself. So I have decided to rewrite the 1st version of my software to make it generic and reusable.

Contribution

Each Contribution is welcomed and encouraged. I do not claim to cover each use cases nor completely master the Golang. If you encounter a non sense or any trouble, you can open an issue and I will be happy to discuss about it :)

Install

    go get github.com/TommyStarK/Flowcus

Test

    go test -v --cover ./...

Usage

Implementation examples:

Documentation

Index

Constants

View Source
const (
	FORMAT  string  = "2006-01-2 15:04:05 (MST)"
	VERSION float64 = 0.5
)

Variables

This section is empty.

Functions

func LoopDualChan

func LoopDualChan(sig chan os.Signal, cin chan *Input, cout chan *Output, in, out *Fifo)

func LoopSingleChan

func LoopSingleChan(sig chan os.Signal, cin chan *Input, in *Fifo)

func NewExploratoryBoxTestsManager

func NewExploratoryBoxTestsManager() *exploratoryBoxTestsManager

Exploratory Box Tests Manager

func NewLinearBoxTestsManager

func NewLinearBoxTestsManager() *linearBoxTestsManager

Linear Box Tests Manager

func NewNonLinearBoxTestsManager

func NewNonLinearBoxTestsManager() *nonlinearBoxTestsManager

Non Linear Box Tests Manager

Types

type BoxETF

type BoxETF func(*Test, Input)

type BoxIF

type BoxIF func(chan<- *Input)

type BoxLTF

type BoxLTF func(*Test, Input, Output)

type BoxNLTF

type BoxNLTF func(*Test, []Input, []Output)

type BoxOF

type BoxOF func(chan<- *Output)

type BoxReport

type BoxReport struct {
	Box      string
	Date     string
	Duration time.Duration
	Coverage float64
	Number   int
	Cases    [][]TestExported
}

func (*BoxReport) ReportToCLI

func (b *BoxReport) ReportToCLI()

func (*BoxReport) ReportToJSON

func (b *BoxReport) ReportToJSON(filename string) error

type Exploratory

type Exploratory interface {
	Input(BoxIF)
	RegisterTests(...BoxETF)
	ReportToCLI()
	ReportToJSON(string) error
	Run()
}

func NewExploratoryBox

func NewExploratoryBox() Exploratory

type Input

type Input struct {
	Data     interface{}
	Expected interface{}
	Id       interface{}
	Label    string
}

func (*Input) Empty

func (i *Input) Empty() bool

func (*Input) String

func (i *Input) String() string

type Linear

type Linear interface {
	Input(BoxIF)
	Output(BoxOF)
	RegisterTests(...BoxLTF)
	ReportToCLI()
	ReportToJSON(string) error
	Run()
}

func NewLinearBox

func NewLinearBox() Linear

type NonLinear

type NonLinear interface {
	Input(BoxIF)
	Output(BoxOF)
	RegisterTests(...BoxNLTF)
	ReportToCLI()
	ReportToJSON(string) error
	Run()
}

func NewNonLinearBox

func NewNonLinearBox() NonLinear

type Output

type Output struct {
	Data interface{}
}

func (*Output) Empty

func (o *Output) Empty() bool

func (*Output) String

func (o *Output) String() string

type Report

type Report interface {
	ReportToCLI()
	ReportToJSON(string) error
}

func NewReport

func NewReport(manager interface{}) Report

type Test

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

func NewTest

func NewTest() *Test

func (*Test) Error

func (t *Test) Error(args ...interface{})

func (*Test) ErrorF

func (t *Test) ErrorF(format string, args ...interface{})

func (*Test) Fail

func (t *Test) Fail()

func (*Test) FailNow

func (t *Test) FailNow()

func (*Test) Failed

func (t *Test) Failed() bool

func (*Test) Fatal

func (t *Test) Fatal(args ...interface{})

func (*Test) FatalF

func (t *Test) FatalF(format string, args ...interface{})

func (*Test) Log

func (t *Test) Log(args ...interface{})

func (*Test) LogF

func (t *Test) LogF(format string, args ...interface{})

func (*Test) Skip

func (t *Test) Skip(args ...interface{})

func (*Test) SkipF

func (t *Test) SkipF(format string, args ...interface{})

func (*Test) SkipNow

func (t *Test) SkipNow()

func (*Test) Skipped

func (t *Test) Skipped() bool

type TestExported

type TestExported struct {
	Caller   string
	Start    time.Time
	Duration time.Duration
	Finished bool
	Skipped  bool
	Success  bool
	Errors   []string
	Logs     []string
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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