Documentation ¶
Index ¶
- Constants
- type Client
- type CreatePlanRequest
- type CreatePlanRequestBody
- type CreatePlanResponseBody
- type CreateTestRunRequest
- type CreateTestRunRequestBody
- type CreateTestRunResponseBody
- type EnumOptionId
- type Fault
- type FaultBody
- type GetPlanByIDRequest
- type GetPlanByIDRequestBody
- type GetPlanByIDResponseBody
- type GetTestRunByIDRequest
- type GetTestRunByIDRequestBody
- type GetTestRunByIDResponseBody
- type LogInEnvelopResponse
- type LogInRequest
- type LogInRequestBody
- type LogInRequestBodyLogIn
- type LogInResponseHeader
- type Plan
- type PolarionSessionService
- type PolarionXUnit
- type PolarionXUnitTestCase
- type PolarionXUnitTestSuite
- type Session
- func (s *Session) CreatePlan(projectID, name, id, parentID, templateID string) error
- func (s *Session) CreateTestRun(projectID, id, templateID string) (string, error)
- func (s *Session) GetPlanByID(projectID, id string) (*Plan, error)
- func (s *Session) GetTestRunByID(projectID, id string) (*TestRun, error)
- func (s *Session) UpdateTestRun(uri string, title string, isTemplate bool, plannedIn string) error
- type SessionRequest
- type SessionRequestHeader
- type SessionResponse
- type Status
- type TestRun
- type UpdateTestRunRequest
- type UpdateTestRunRequestBody
- type UpdateTestRunRequestCustomField
- type UpdateTestRunResponseBody
- type XUnitImportResponse
- type XUnitImporter
- type XUnitImporterService
- type XUnitJobStatus
- type XUnitJobStatusRespons
Constants ¶
View Source
const ( XunitEndpoint = "/xunit" JobQueueEndpoint = "/xunit-queue" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatePlanRequest ¶
type CreatePlanRequestBody ¶
type CreatePlanRequestBody struct { PlanNS string `xml:"xmlns:plan,attr"` CreatePlan CreatePlanRequest `xml:"plan:createPlan"` }
func NewCreatePlanRequest ¶
func NewCreatePlanRequest(projectID, name, id, parentID, templateID string) *CreatePlanRequestBody
type CreatePlanResponseBody ¶
type CreatePlanResponseBody struct {
FaultBody
}
type CreateTestRunRequest ¶
type CreateTestRunRequestBody ¶
type CreateTestRunRequestBody struct { TesNS string `xml:"xmlns:tes,attr"` CreateTestRun CreateTestRunRequest `xml:"tes:createTestRun"` }
func NewCreateTestRunRequest ¶
func NewCreateTestRunRequest(projectID, id, templateID string) *CreateTestRunRequestBody
type EnumOptionId ¶
type EnumOptionId struct {
ID string `xml:"trac:id"`
}
type GetPlanByIDRequest ¶
type GetPlanByIDRequestBody ¶
type GetPlanByIDRequestBody struct { PlanNS string `xml:"xmlns:plan,attr"` GetPlanByID GetPlanByIDRequest `xml:"plan:getPlanById"` }
func NewGetPlanByIDRequest ¶
func NewGetPlanByIDRequest(projectID, id string) *GetPlanByIDRequestBody
type GetPlanByIDResponseBody ¶
type GetTestRunByIDRequest ¶
type GetTestRunByIDRequestBody ¶
type GetTestRunByIDRequestBody struct { TesNS string `xml:"xmlns:tes,attr"` GetTestRunByID GetTestRunByIDRequest `xml:"tes:getTestRunById"` }
func NewGetTestRunByIDRequest ¶
func NewGetTestRunByIDRequest(projectID, id string) *GetTestRunByIDRequestBody
type LogInEnvelopResponse ¶
type LogInEnvelopResponse struct { XMLName xml.Name `xml:"Envelope"` Header LogInResponseHeader `xml:"Header"` Body FaultBody `xml:"Body"` }
type LogInRequest ¶
type LogInRequest struct { XMLName xml.Name `xml:"soapenv:Envelope"` SoapNS string `xml:"xmlns:soapenv,attr"` SesNS string `xml:"xmlns:ses,attr"` Header struct{} `xml:"soapenv:Header"` Body LogInRequestBody `xml:"soapenv:Body"` }
func NewLogInRequest ¶
func NewLogInRequest(s LogInRequestBodyLogIn) *LogInRequest
type LogInRequestBody ¶
type LogInRequestBody struct {
LogIn LogInRequestBodyLogIn `xml:"ses:logIn"`
}
type LogInRequestBodyLogIn ¶
type LogInResponseHeader ¶
type LogInResponseHeader struct {
SessionID string `xml:"sessionID"`
}
type PolarionSessionService ¶
type PolarionSessionService interface { GetPlanByID(projectID, id string) (*Plan, error) CreatePlan(projectID, name, id, parentID, templateID string) error GetTestRunByID(projectID, id string) (*TestRun, error) CreateTestRun(projectID, id, templateID string) (string, error) UpdateTestRun(uri string, title string, isTemplate bool, plannedIn string) error }
type PolarionXUnit ¶
type PolarionXUnit struct { XMLName xml.Name `xml:"testsuites"` Properties []formatter.JUnitProperty `xml:"properties>property,omitempty"` Suites []PolarionXUnitTestSuite }
func JUnitToPolarionXUnit ¶
func JUnitToPolarionXUnit(junit *formatter.JUnitTestSuite, projectID, title, templateID string) (*PolarionXUnit, error)
type PolarionXUnitTestCase ¶
type PolarionXUnitTestCase struct { formatter.JUnitTestCase Properties []formatter.JUnitProperty `xml:"properties>property,omitempty"` }
type PolarionXUnitTestSuite ¶
type PolarionXUnitTestSuite struct { formatter.JUnitTestSuite TestCases []PolarionXUnitTestCase `xml:"testcase"` }
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) CreatePlan ¶
func (*Session) CreateTestRun ¶
func (*Session) GetTestRunByID ¶
type SessionRequest ¶
type SessionRequest struct { XMLName xml.Name `xml:"soapenv:Envelope"` SoapNS string `xml:"xmlns:soapenv,attr"` Header SessionRequestHeader `xml:"soapenv:Header"` Body interface{} `xml:"soapenv:Body"` }
func NewSessionRequest ¶
func NewSessionRequest(sessionID string, body interface{}) *SessionRequest
type SessionRequestHeader ¶
type SessionResponse ¶
type SessionResponse struct { Header struct{} `xml:"Header"` Body interface{} `xml:"Body"` }
type UpdateTestRunRequest ¶
type UpdateTestRunRequest struct { URI string `xml:"uri,attr"` Title string `xml:"tes1:title,omitempty"` IsTemplate bool `xml:"tes1:isTemplate,omitempty"` CustomFields []UpdateTestRunRequestCustomField `xml:"tes1:customFields>trac:Custom,omitempty"` }
type UpdateTestRunRequestBody ¶
type UpdateTestRunRequestBody struct { TesNS string `xml:"xmlns:tes,attr"` Tes1NS string `xml:"xmlns:tes1,attr"` TracNS string `xml:"xmlns:trac,attr"` UpdateTestRun UpdateTestRunRequest `xml:"tes:updateTestRun>tes:content"` }
func NewUpdateTestRunRequest ¶
func NewUpdateTestRunRequest(uri string, title string, isTemplate bool, plannedIn string) *UpdateTestRunRequestBody
type UpdateTestRunRequestCustomField ¶
type UpdateTestRunRequestCustomField struct { Key string `xml:"trac:key"` Value interface{} `xml:"trac:value"` }
type UpdateTestRunResponseBody ¶
type UpdateTestRunResponseBody struct {
FaultBody
}
type XUnitImportResponse ¶
type XUnitImportResponse struct { Files struct { File struct { JobIDs []int `json:"job-ids"` } `json:"file.xml"` } `json:"files"` }
type XUnitImporter ¶
type XUnitImporter struct {
// contains filtered or unexported fields
}
func NewXUnitImporter ¶
func NewXUnitImporter(url, username, password string) *XUnitImporter
func (*XUnitImporter) GetJobStatus ¶
func (x *XUnitImporter) GetJobStatus(id int) (XUnitJobStatus, error)
func (*XUnitImporter) Import ¶
func (x *XUnitImporter) Import(xunit *PolarionXUnit) (int, error)
type XUnitImporterService ¶
type XUnitImporterService interface { Import(xunit *PolarionXUnit) (int, error) GetJobStatus(id int) (XUnitJobStatus, error) }
type XUnitJobStatus ¶
type XUnitJobStatus string
const ( ReadyStatus XUnitJobStatus = "READY" RunningStatus XUnitJobStatus = "RUNNING" SuccessStatus XUnitJobStatus = "SUCCESS" )
type XUnitJobStatusRespons ¶
type XUnitJobStatusRespons struct { Jobs []struct { Status XUnitJobStatus `json:"status"` } `json:"jobs"` }
Click to show internal directories.
Click to hide internal directories.