controllers

package
v0.0.0-...-96ffb46 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestDesc

type TestDesc struct {
	Name string
}

TestDesc is used for describing a single test of some test suite. This structure is required by revel test cmd.

type TestResult

type TestResult struct {
	Name         string
	Passed       bool
	ErrorHTML    template.HTML
	ErrorSummary string
}

TestResult represents the results of running a single test of some test suite. This structure is required by revel test cmd.

type TestRunner

type TestRunner struct {
	*revel.Controller
}

TestRunner is a controller which is used for running application tests in browser.

func (TestRunner) Index

func (c TestRunner) Index() revel.Result

Index is an action which renders the full list of available test suites and their tests.

func (TestRunner) List

func (c TestRunner) List() revel.Result

List returns a JSON list of test suites and tests. It is used by revel test command line tool.

func (TestRunner) Run

func (c TestRunner) Run(suite, test string) revel.Result

Run runs a single test, given by the argument.

func (TestRunner) Suite

func (c TestRunner) Suite(suite string) revel.Result

Suite method allows user to navigate to individual Test Suite and their tests.

type TestSuiteDesc

type TestSuiteDesc struct {
	Name  string
	Tests []TestDesc

	// Elem is reflect.Type which can be used for accessing methods
	// of the test suite.
	Elem reflect.Type
}

TestSuiteDesc is used for storing information about a single test suite. This structure is required by revel test cmd.

type TestSuiteResult

type TestSuiteResult struct {
	Name    string
	Passed  bool
	Results []TestResult
}

TestSuiteResult stores the results the whole test suite. This structure is required by revel test cmd.

Jump to

Keyboard shortcuts

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