Documentation ¶
Overview ¶
Package JUnit is the JUnit Java testing framework's implementation of an Impendulo tool. See http://junit.org/ for more information.
Index ¶
- Constants
- type Failure
- type Report
- type Result
- func (r *Result) ChartVals() []*result.ChartVal
- func (r *Result) GetFileId() bson.ObjectId
- func (r *Result) GetId() bson.ObjectId
- func (r *Result) GetName() string
- func (r *Result) GetTestId() bson.ObjectId
- func (r *Result) GetType() string
- func (r *Result) OnGridFS() bool
- func (r *Result) Reporter() result.Reporter
- func (r *Result) SetReport(report result.Reporter)
- func (r *Result) String() string
- func (r *Result) Template() string
- type Test
- type TestCase
- type TestCases
- type TestType
- type Tool
- type Type
Constants ¶
View Source
const (
NAME = "JUnit"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Failure ¶
type Failure struct { Message string `xml:"message,attr"` Type string `xml:"type,attr"` Value string `xml:",innerxml"` }
Failure gives details as to why a test case failed.
type Report ¶
type Report struct { Id bson.ObjectId //Errors is the number of runtime exceptions //which occurred when running the test cases. Errors int `xml:"errors,attr"` //Failures is the number of test cases which produced //an invalid result. Failures int `xml:"failures,attr"` Name string `xml:"name,attr"` Tests int `xml:"tests,attr"` Time float64 `xml:"time,attr"` //Results is all the failed testcases. Results TestCases `xml:"testcase"` }
Report is created from XML output by a Ant JUnit task.
type Result ¶
type Result struct { Id bson.ObjectId `bson:"_id"` FileId bson.ObjectId `bson:"fileid"` TestId bson.ObjectId `bson:"testid"` TestName string `bson:"name"` Report *Report `bson:"report"` GridFS bool `bson:"gridfs"` Type string `bson:"type"` }
type Test ¶
type Test struct { Id bson.ObjectId `bson:"_id"` ProjectId bson.ObjectId `bson:"projectid"` Name string `bson:"name"` Package string `bson:"pkg"` Time int64 `bson:"time"` Type Type `bson:"type"` Target *tool.Target `bson:"target"` //The test file Test []byte `bson:"test"` //The data files needed for the test stored in a zip archive Data []byte `bson:"data"` }
Test stores tests for a project.
type TestCase ¶
type TestCase struct { ClassName string `xml:"classname,attr"` Name string `xml:"name,attr"` Time float64 `xml:"time,attr"` Fail *Failure `xml:"failure"` }
TestCase represents a failed testcase
type TestCases ¶
type TestCases []*TestCase
TestCases represents all the testcases which a class failed. It implements sort.Sort
Click to show internal directories.
Click to hide internal directories.