testrail

package module
Version: v0.0.0-...-adb5e6f Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 11 Imported by: 0

README

testrail

testrail is a Go client library for accessing the TestRail API

travis-ci: Build Status

GoDoc: GoDoc

Test Coverage: 9.52%

References

https://godoc.org/github.com/educlos/testrail

Example usage

  package main

  import "github.com/educlos/testrail"

  func main(){

    username := os.Getenv("TESTRAIL_USERNAME")
    password := os.Getenv("TESTRAIL_TOKEN")

    client := testrail.NewClient("https://example.testrail.com", username, password)

    projectID := 1
    suiteID := 11
    cases, err := client.GetCases(projectID, suiteID)

    for _, c := range cases{
      fmt.Println(c.ID)
    }
  }

License

MIT

Documentation

Overview

testrail provides a go api for testrail

Index

Constants

View Source
const (
	StatusPassed   int = 1
	StatusBlocked  int = 2
	StatusUntested int = 3
	StatusRetest   int = 4
	StatusFailed   int = 5
)

Variables

This section is empty.

Functions

func TimespanFromDuration

func TimespanFromDuration(duration time.Duration) *timespan

TimespanFromDuration converts a standard Go time duration into a testrail compatible timespan.

Types

type Case

type Case struct {
	CreatedBy            int          `json:"created_by"`
	CreatedOn            int          `json:"created_on"`
	CustomExpected       string       `json:"custom_expected"`
	CustomPreconds       string       `json:"custom_preconds"`
	CustomSteps          string       `json:"custom_steps"`
	CustomStepsSeparated []CustomStep `json:"custom_steps_separated"`
	Estimate             string       `json:"estimate"`
	EstimateForecast     string       `json:"estimate_forecast"`
	ID                   int          `json:"id"`
	MilestoneID          int          `json:"milestone_id"`
	PriorityID           int          `json:"priority_id"`
	Refs                 string       `json:"refs"`
	SectionID            int          `json:"section_id"`
	SuiteID              int          `json:"suite_id"`
	Title                string       `json:"title"`
	TypeID               int          `json:"type_id"`
	UpdatedBy            int          `json:"updated_by"`
	UdpatedOn            int          `json:"updated_on"`
}

Case represents a Test Case

type CaseField

type CaseField struct {
	Configs      []CaseFieldConfig `json:"configs"`
	Description  string            `json:"description"`
	DisplayOrder int               `json:"display_order"`
	ID           int               `json:"ID"`
	IsActive     bool              `json:"is_active"`
	Label        string            `json:"label"`
	Name         string            `json:"name"`
	SystemName   string            `json:"system_name"`
	TypeID       int               `json:"type_id"`
}

CaseField represents a Case Field

type CaseFieldConfig

type CaseFieldConfig struct {
	Context Context         `json:"context"`
	ID      string          `json:"id"`
	Options CaseFieldOption `json:"options"`
}

CaseFieldConfig represents the config a Case Field can have

type CaseFieldOption

type CaseFieldOption struct {
	DefaultValue string `json:"default_value"`
	Format       string `json:"format"`
	IsRequired   bool   `json:"is_required"`
	Rows         string `json:"rows"`
}

CaseFieldOption represents the options a config can have

type CaseType

type CaseType struct {
	ID        int    `json:"id"`
	IsDefault bool   `json:"is_default"`
	Name      string `json:"name"`
}

type Client

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

A Client stores the client informations and implement all the api functions to communicate with testrail

func NewClient

func NewClient(url, username, password string, useBetaApi ...bool) (c *Client)

NewClient returns a new client with the given credential for the given testrail domain

func NewCustomClient

func NewCustomClient(url, username, password string, customHttpClient *http.Client, useBetaApi ...bool) (c *Client)

NewClient returns a new client with with the given credential for the given testrail domain and custom http Client

func (*Client) AddCase

func (c *Client) AddCase(sectionID int, newCase SendableCase) (Case, error)

AddCase creates a new Test Case newCase and returns it

func (*Client) AddMilestone

func (c *Client) AddMilestone(projectID int, newMilestone SendableMilestone) (Milestone, error)

AddMilestone creates a new milestone on project projectID and returns it

func (*Client) AddPlan

func (c *Client) AddPlan(projectID int, newPlan SendablePlan) (Plan, error)

AddPlan creates a new plan on project projectID and returns it

func (*Client) AddPlanEntry

func (c *Client) AddPlanEntry(planID int, newEntry SendableEntry) (Entry, error)

AddPlanEntry creates a new entry on plan planID and returns it

func (*Client) AddProject

func (c *Client) AddProject(newProject SendableProject) (Project, error)

AddProject creates a new project and return its

func (*Client) AddResult

func (c *Client) AddResult(testID int, newResult SendableResult) (Result, error)

AddResult adds a new result, comment or assigns a test to testID

func (*Client) AddResultForCase

func (c *Client) AddResultForCase(runID, caseID int, newResult SendableResult) (Result, error)

AddResultForCase adds a new result, comment or assigns a test to the case caseID on run runID

func (*Client) AddResults

func (c *Client) AddResults(runID int, newResult SendableResults) ([]Result, error)

AddResults adds new results, comment or assigns tests to runID

func (*Client) AddResultsForCases

func (c *Client) AddResultsForCases(runID int, newResult SendableResultsForCase) ([]Result, error)

AddResultsForCases adds new results, comments or assigns tests to run runID each result being assigned to a test case

func (*Client) AddRun

func (c *Client) AddRun(projectID int, newRun SendableRun) (Run, error)

AddRun creates a new run on projectID and returns it

func (*Client) AddSection

func (c *Client) AddSection(projectID int, newSection SendableSection) (Section, error)

AddSection creates a new section on projectID and returns it

func (*Client) AddSuite

func (c *Client) AddSuite(projectID int, newSuite SendableSuite) (Suite, error)

AddSuite creates a new suite on projectID and returns it

func (*Client) ClosePlan

func (c *Client) ClosePlan(planID int) (Plan, error)

ClosePlan closes the plan planID and returns it

func (*Client) CloseRun

func (c *Client) CloseRun(runID int) (Run, error)

CloseRun closes the run runID, archives its tests and results and returns it

func (*Client) DeleteCase

func (c *Client) DeleteCase(caseID int) error

DeleteCase deletes the existing Test Case caseID

func (*Client) DeleteMilestone

func (c *Client) DeleteMilestone(milestoneID int) error

DeleteMilestone deletes the milestone milestoneID

func (*Client) DeletePlan

func (c *Client) DeletePlan(planID int) error

DeletePlan deletes the plan planID

func (*Client) DeletePlanEntry

func (c *Client) DeletePlanEntry(planID int, entryID string) error

DeletePlanEntry delete the entry entryID on plan planID

func (*Client) DeleteProject

func (c *Client) DeleteProject(projectID int) error

DeleteProject deletes the project projectID

func (*Client) DeleteRun

func (c *Client) DeleteRun(runID int) error

DeleteRun delete the run runID

func (*Client) DeleteSection

func (c *Client) DeleteSection(sectionID int) error

DeleteSection deletes the section sectionID

func (*Client) DeleteSuite

func (c *Client) DeleteSuite(suiteID int) error

DeleteSuite delete the suite suiteID

func (*Client) GenerateCustom

func (c *Client) GenerateCustom() error

func (*Client) GetCase

func (c *Client) GetCase(caseID int) (Case, error)

GetCase returns the existing Test Case caseID

func (*Client) GetCaseFields

func (c *Client) GetCaseFields() ([]CaseField, error)

GetCaseFields returns a list of available case custom fields

func (*Client) GetCaseTypes

func (c *Client) GetCaseTypes() ([]CaseType, error)

Returns a list of available test case types

func (*Client) GetCases

func (c *Client) GetCases(projectID, suiteID int, sectionID ...int) ([]Case, error)

GetCases returns a list of Test Cases on project projectID for a Test Suite suiteID or for specific section sectionID in a Test Suite

func (*Client) GetCasesWithCustomFields

func (c *Client) GetCasesWithCustomFields(projectID, suiteID int, customArray interface{}, sectionID ...int) error

GetCasesWithCustomFields returns a interface that can be mapped to an array that contains custom fields on project projectID for a Test Suite suiteID or for specific section sectionID in a Test Suite

func (*Client) GetCasesWithFilters

func (c *Client) GetCasesWithFilters(projectID, suiteID int, filters ...RequestFilterForCases) ([]Case, error)

GetCasesWithFilters returns a list of Test Cases on project projectID for a Test Suite suiteID validating the filters

func (*Client) GetConfigs

func (c *Client) GetConfigs(projectID int) (configs []Configuration, err error)

GetConfigs returns a list of available configurations on project projectID

func (*Client) GetMilestone

func (c *Client) GetMilestone(milestoneID int) (Milestone, error)

GetMilestone returns the existing milestone milestoneID

func (*Client) GetMilestones

func (c *Client) GetMilestones(projectID int, isCompleted ...bool) ([]Milestone, error)

GetMilestones returns the list of milestones for the project projectID can be filtered by completed status of the milestones

func (*Client) GetPlan

func (c *Client) GetPlan(planID int) (Plan, error)

GetPlan returns the existing plan planID

func (*Client) GetPlans

func (c *Client) GetPlans(projectID int, filters ...RequestFilterForPlan) ([]Plan, error)

GetPlans returns the list of plans for the project projectID validating the filters

func (*Client) GetPriorities

func (c *Client) GetPriorities() ([]Priority, error)

GetPriorities returns a list of available priorities

func (*Client) GetProject

func (c *Client) GetProject(projectID int) (Project, error)

GetProject returns the existing project projectID

func (*Client) GetProjects

func (c *Client) GetProjects(isCompleted ...bool) ([]Project, error)

GetProjects returns a list available projects can be filtered by completed status of the project

func (*Client) GetResultFields

func (c *Client) GetResultFields() ([]ResultField, error)

GetResultFields returns a list of available test result custom fields

func (*Client) GetResults

func (c *Client) GetResults(testID int, filters ...RequestFilterForCaseResults) ([]Result, error)

GetResults returns a list of results for the test testID validating the filters

func (*Client) GetResultsForCase

func (c *Client) GetResultsForCase(runID, caseID int, filters ...RequestFilterForCaseResults) ([]Result, error)

GetResultsForCase returns a list of results for the case caseID on run runID validating the filters

func (*Client) GetResultsForRun

func (c *Client) GetResultsForRun(runID int, filters ...RequestFilterForRunResults) ([]Result, error)

GetResultsForRun returns a list of results for the run runID validating the filters

func (*Client) GetRun

func (c *Client) GetRun(runID int) (Run, error)

GetRun returns the run runID

func (*Client) GetRuns

func (c *Client) GetRuns(projectID int, filters ...RequestFilterForRun) ([]Run, error)

GetRuns returns the list of runs of projectID validating the filters

func (*Client) GetSection

func (c *Client) GetSection(sectionID int) (Section, error)

GetSection returns the section sectionID

func (*Client) GetSections

func (c *Client) GetSections(projectID int, suiteID ...int) ([]Section, error)

GetSections returns the list of sections of projectID present in suite suiteID, if specified

func (*Client) GetStatuses

func (c *Client) GetStatuses() ([]Status, error)

GetStatuses return the list of all possible statuses

func (*Client) GetSuite

func (c *Client) GetSuite(suiteID int) (Suite, error)

GetSuite returns the suite suiteID

func (*Client) GetSuites

func (c *Client) GetSuites(projectID int) ([]Suite, error)

GetSuites returns the list of suites on project projectID

func (*Client) GetTest

func (c *Client) GetTest(testID int) (Test, error)

GetTest returns the test testID

func (*Client) GetTests

func (c *Client) GetTests(runID int, statusID ...[]int) ([]Test, error)

GetTests returns the list of tests of runID with status statusID, if specified

func (*Client) GetUser

func (c *Client) GetUser(userID int) (User, error)

GetUser returns the user userID

func (*Client) GetUserByEmail

func (c *Client) GetUserByEmail(email string) (User, error)

GetUserByEmail returns the user corresponding to email email

func (*Client) GetUsers

func (c *Client) GetUsers() ([]User, error)

GetUsers returns the list of users

func (*Client) UpdateCase

func (c *Client) UpdateCase(caseID int, updates SendableCase) (Case, error)

UpdateCase updates an existing Test Case caseID and returns it

func (*Client) UpdateMilestone

func (c *Client) UpdateMilestone(milestoneID int, updates SendableMilestone) (Milestone, error)

UpdateMilestone updates the existing milestone milestoneID an returns it

func (*Client) UpdatePlan

func (c *Client) UpdatePlan(planID int, updates SendablePlan) (Plan, error)

UpdatePlan updates the existing plan planID and returns it

func (*Client) UpdatePlanEntry

func (c *Client) UpdatePlanEntry(planID int, entryID string, updates SendableEntry) (Entry, error)

UpdatePlanEntry updates the entry entryID on plan planID and returns it

func (*Client) UpdateProject

func (c *Client) UpdateProject(projectID int, updates SendableProject, isCompleted ...bool) (Project, error)

UpdateProject updates the existing project projectID and returns it

func (*Client) UpdateRun

func (c *Client) UpdateRun(runID int, update UpdatableRun) (Run, error)

UpdateRun updates the run runID and returns it

func (*Client) UpdateSection

func (c *Client) UpdateSection(sectionID int, update UpdatableSection) (Section, error)

UpdateSection updates the section sectionID and returns it

func (*Client) UpdateSuite

func (c *Client) UpdateSuite(suiteID int, update SendableSuite) (Suite, error)

UpdateSuite updates the suite suiteID and returns it

type Config

type Config struct {
	GroupID int    `json:"group_id"`
	ID      int    `json:"id"`
	Name    string `json:"name"`
}

Config represents the config a Configuration can have

type Configuration

type Configuration struct {
	Configs   []Config `json:"configs"`
	ID        int      `json:"id"`
	Name      string   `json:"name"`
	ProjectID int      `json:"project_id"`
}

Configuration represents a Configuration

type Context

type Context struct {
	IsGlobal   bool  `json:"is_global"`
	ProjectIDs []int `json:"project_ids"`
}

Context represents the context a config can have

type CustomStep

type CustomStep struct {
	Content  string `json:"content"`
	Expected string `json:"expected"`
}

CustomStep represents the custom steps a Test Case can have

type CustomStepResult

type CustomStepResult struct {
	Content  string `json:"content"`
	Expected string `json:"expected"`
	Actual   string `json:"actual"`
	StatusID int    `json:"status_id"`
}

CustomStepResult represents the custom steps results a Result can have

type Entry

type Entry struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Runs    []Run  `json:"runs"`
	SuiteID int    `json:"suite_id"`
}

Entry represents the entry a Plan can have

type Links struct {
	Next *string `json:"next"`
	Prev *string `json:"prev"`
}

type Milestone

type Milestone struct {
	CompletedOn int    `json:"completed_on"`
	Description string `json:"description"`
	DueOn       int    `json:"due_on"`
	ID          int    `json:"id"`
	IsCompleted bool   `json:"is_completed"`
	Name        string `json:"name"`
	ProjectID   int    `json:"project_id"`
	URL         string `json:"url"`
}

Milestone represents a Milestone

type Plan

type Plan struct {
	AssignedToID       int     `json:"assignedto_id"`
	BlockedCount       int     `json:"blocked_count"`
	CompletedOn        int     `json:"completed_on"`
	CreatedBy          int     `json:"created_by"`
	CreatedOn          int     `json:"created_on"`
	Description        string  `json:"description"`
	Entries            []Entry `json:"entries"`
	FailedCount        int     `json:"failed_count"`
	ID                 int     `json:"id"`
	IsCompleted        bool    `json:"is_completed"`
	MilestoneID        int     `json:"milestone_id"`
	Name               string  `json:"name"`
	PassedCount        int     `json:"passed_count"`
	ProjectID          int     `json:"project_id"`
	RetestCount        int     `json:"retest_count"`
	UntestedCount      int     `json:"untested_count"`
	URL                string  `json:"url"`
	CustomStatus1Count int     `json:"custom_status1_count"`
	CustomStatus2Count int     `json:"custom_status2_count"`
	CustomStatus3Count int     `json:"custom_status3_count"`
	CustomStatus4Count int     `json:"custom_status4_count"`
	CustomStatus5Count int     `json:"custom_status5_count"`
	CustomStatus6Count int     `json:"custom_status6_count"`
	CustomStatus7Count int     `json:"custom_status7_count"`
}

Plan represents a Plan

type Priority

type Priority struct {
	ID        int    `json:"id"`
	IsDefault bool   `json:"is_default"`
	Name      string `json:"name"`
	Priority  int    `json:"priority"`
	ShortName string `json:"short_name"`
}

Priority represents a Priority

type Project

type Project struct {
	Announcement     string `json:"announcement"`
	CompletedOn      int    `json:"completed_on"`
	ID               int    `json:"id"`
	IsCompleted      bool   `json:"is_completed"`
	Name             string `json:"name"`
	ShowAnnouncement bool   `json:"show_announcement"`
	URL              string `json:"url"`
}

Project represents a Project

type RequestFilterForCaseResults

type RequestFilterForCaseResults struct {
	Limit    *int  `json:"limit,omitempty"`
	Offest   *int  `json:"offset, omitempty"`
	StatusID []int `json:"status_id,omitempty"`
}

RequestFilterForCaseResults represents the filters usable to get the test case results

type RequestFilterForCases

type RequestFilterForCases struct {
	CreatedAfter  string `json:"created_after"`
	CreatedBefore string `json:"created_before"`
	CreatedBy     []int  `json:"created_by"`
	MilestoneID   []int  `json:"milestone_id"`
	PriorityID    []int  `json:"priority_id"`
	TypeID        []int  `json:"type_id"`
	UpdatedAfter  string `json:"updated_after"`
	UpdatedBefore string `json:"updated_before"`
	UpdatedBy     []int  `json:"updated_by"`
}

RequestFilterForCases represents the filters usable to get the test cases

type RequestFilterForPlan

type RequestFilterForPlan struct {
	CreatedAfter  string `json:"created_after"`
	CreatedBefore string `json:"created_before"`
	CreatedBy     []int  `json:"created_by"`
	IsCompleted   *bool  `json:"is_completed"`
	Limit         *int   `json:"limit"`
	Offset        *int   `json:"offset"`
	MilestoneID   []int  `json:"milestone_id"`
}

RequestFilterForPlan represents the filters usable to get the plan

type RequestFilterForRun

type RequestFilterForRun struct {
	CreatedAfter  string `json:"created_after,omitempty"`
	CreatedBefore string `json:"created_before,omitempty"`
	CreatedBy     []int  `json:"created_by,omitempty"`
	IsCompleted   *bool  `json:"is_completed,omitempty"`
	Limit         *int   `json:"limit,omitempty"`
	Offset        *int   `json:"offset, omitempty"`
	MilestoneID   []int  `json:"milestone_id,omitempty"`
	SuiteID       []int  `json:"suite_id,omitempty"`
}

RequestFilterForRun represents the filters usable to get the run

type RequestFilterForRunResults

type RequestFilterForRunResults struct {
	CreatedAfter  string `json:"created_after,omitempty"`
	CreatedBefore string `json:"created_before,omitempty"`
	CreatedBy     []int  `json:"created_by,omitempty"`
	Limit         *int   `json:"limit,omitempty"`
	Offest        *int   `json:"offset, omitempty"`
	StatusID      []int  `json:"status_id,omitempty"`
}

RequestFilterForRunResults represents the filters usable to get the run results

type Result

type Result struct {
	AssignedtoID int       `json:"assignedto_id"`
	Comment      string    `json:"comment"`
	CreatedBy    int       `json:"created_by"`
	CreatedOn    timestamp `json:"created_on"`
	Defects      string    `json:"defects"`
	Elapsed      timespan  `json:"elapsed"`
	ID           int       `json:"id"`
	StatusID     int       `json:"status_id"`
	TestID       int       `json:"test_id"`
	Version      string    `json:"version"`
	// contains filtered or unexported fields
}

Result represents a Test Case result

type ResultField

type ResultField struct {
	Configs      []ResultFieldConfig `json:"configs"`
	Description  string              `json:"description"`
	DisplayOrder int                 `json:"display_order"`
	ID           int                 `json:"ID"`
	Label        string              `json:"label"`
	Name         string              `json:"name"`
	SystemName   string              `json:"system_name"`
	TypeID       int                 `json:"type_id"`
	IsActive     bool                `json:"is_active"`
}

ResultField represents a ResultField

type ResultFieldConfig

type ResultFieldConfig struct {
	Context Context           `json:"context"`
	ID      string            `json:"id"`
	Options ResultFieldOption `json:"options"`
}

ResultFieldConfig represents a config a ResultField can have

type ResultFieldOption

type ResultFieldOption struct {
	Format      string `json:"format"`
	HasActual   bool   `json:"has_actual"`
	HasExpected bool   `json:"has_expected"`
	IsRequired  bool   `json:"is_required"`
}

ResultFieldOption represents an option a ResultField can have

type Results

type Results struct {
	TestID int `json:"test_id"`
	SendableResult
}

Results represents a run result that can be created or updated via the api

type ResultsForCase

type ResultsForCase struct {
	CaseID int `json:"case_id"`
	SendableResult
}

Results represents a run result that can be created or updated via the api

type Run

type Run struct {
	AssignedToID       int    `json:"assignedto_id"`
	BlockedCount       int    `json:"blocked_count"`
	CompletedOn        int    `json:"completed_on"`
	Config             string `json:"config"`
	ConfigIDs          []int  `json:"config_ids"`
	CreatedBy          int    `json:"created_by"`
	CreatedOn          int    `json:"created_on"`
	Description        string `json:"description"`
	EntryID            string `json:"entry_id"`
	EntryIndex         int    `json:"entry_index"`
	FailedCount        int    `json:"failed_count"`
	ID                 int    `json:"id"`
	IncludeAll         bool   `json:"include_all"`
	IsCompleted        bool   `json:"is_completed"`
	MilestoneID        int    `json:"milestone_id"`
	Name               string `json:"name"`
	PassedCount        int    `json:"passed_count"`
	PlanID             int    `json:"plan_id"`
	ProjectID          int    `json:"project_id"`
	RetestCount        int    `json:"retest_count"`
	SuiteID            int    `json:"suite_id"`
	UntestedCount      int    `json:"untested_count"`
	URL                string `json:"url"`
	CustomStatus1Count int    `json:"custom_status1_count"`
	CustomStatus2Count int    `json:"custom_status2_count"`
	CustomStatus3Count int    `json:"custom_status3_count"`
	CustomStatus4Count int    `json:"custom_status4_count"`
	CustomStatus5Count int    `json:"custom_status5_count"`
	CustomStatus6Count int    `json:"custom_status6_count"`
	CustomStatus7Count int    `json:"custom_status7_count"`
}

Run represents a Run

type Section

type Section struct {
	Depth        int    `json:"depth"`
	Description  string `json:"description"`
	DisplayOrder int    `json:"display_order"`
	ID           int    `json:"id"`
	ParentID     int    `json:"parent_id"`
	Name         string `json:"name"`
	SuiteID      int    `json:"suite_id"`
}

Section represents a Test Suite Section

type SendableCase

type SendableCase struct {
	Title           string       `json:"title"`
	TypeID          int          `json:"type_id,omitempty"`
	PriorityID      int          `json:"priority_id,omitempty"`
	Estimate        string       `json:"estimate,omitempty"`
	MilestoneID     int          `json:"milestone_id,omitempty"`
	Refs            string       `json:"refs,omitempty"`
	Checkbox        bool         `json:"custom_checkbox,omitempty"`
	Date            string       `json:"custom_date,omitempty"`
	Dropdown        int          `json:"custom_dropdown,omitempty"`
	Integer         int          `json:"custom_integer,omitempty"`
	Milestone       int          `json:"custom_milestone,omitempty"`
	MultiSelect     []int        `json:"custom_multi-select,omitempty"`
	Steps           []CustomStep `json:"custom_steps,omitempty"`
	String          string       `json:"custom_string,omitempty"`
	TemplateId      int          `json:"template_id,omitempty"`
	TestDescription string       `json:"custom_test_description,omitempty"`
	Text            string       `json:"custom_text,omitempty"`
	URL             string       `json:"custom_url,omitempty"`
	User            int          `json:"custom_user,omitempty"`
}

SendableCase represents a Test Case that can be created or updated via the api

type SendableEntry

type SendableEntry struct {
	SuiteID      int           `json:"suite_id"`
	Name         string        `json:"name,omitempty"`
	AssignedtoID int           `json:"assignedto_id,omitempty"`
	IncludeAll   bool          `json:"include_all"`
	CaseIDs      []int         `json:"case_ids,omitempty"`
	ConfigIDs    []int         `json:"config_ids,omitempty"`
	Runs         []SendableRun `json:"runs,omitempty"`
}

SendableEntry represents an Entry that can be created or updated via the api

type SendableMilestone

type SendableMilestone struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	DueOn       int    `json:"due_on,omitempty"`
}

SendableMilestone represents a Milestone that can be created or updated via the api

type SendablePlan

type SendablePlan struct {
	Name        string          `json:"name,omitempty"`
	Description string          `json:"description,omitempty"`
	MilestoneID int             `json:"milestone_id,omitempty"`
	Entries     []SendableEntry `json:"entries,omitempty"`
}

SendablePlan represents a Plan that can be created or updated via the api

type SendableProject

type SendableProject struct {
	Name             string `json:"name"`
	Announcement     string `json:"announcement,omitempty"`
	ShowAnnouncement bool   `json:"show_announcement,omitempty"`
	SuiteMode        int    `json:"suite_mode,omitempty"`
}

SendableProject represents a Project that can be created or updated via the ap

type SendableResult

type SendableResult struct {
	StatusID     int      `json:"status_id,omitempty"`
	Comment      string   `json:"comment,omitempty"`
	Version      string   `json:"version,omitempty"`
	Elapsed      timespan `json:"elapsed,omitempty"`
	Defects      string   `json:"defects,omitempty"`
	AssignedToID int      `json:"assignedto_id,omitempty"`
	// contains filtered or unexported fields
}

SendableResult represents a Test Case result that can be created or updated via the api

type SendableResults

type SendableResults struct {
	Results []Results `json:"results"`
}

SendableResults represents a list of run results that can be created or updated via the api

type SendableResultsForCase

type SendableResultsForCase struct {
	Results []ResultsForCase `json:"results"`
}

SendableResultsForCase represents a Test Case result that can be created or updated via the api

type SendableRun

type SendableRun struct {
	SuiteID      int    `json:"suite_id"`
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	MilestoneID  int    `json:"milestone_id,omitempty"`
	AssignedToID int    `json:"assignedto_id,omitempty"`
	IncludeAll   *bool  `json:"include_all,omitempty"`
	CaseIDs      []int  `json:"case_ids,omitempty"`
}

SendableRun represents a Run that can be created via the api

type SendableSection

type SendableSection struct {
	Description string `json:"description,omitempty"`
	SuiteID     int    `json:"suite_id,omitempty"`
	ParentID    int    `json:"parent_id,omitempty"`
	Name        string `json:"name"`
}

SendableSection represents a Test Suite Section that can be created via the api

type SendableSuite

type SendableSuite struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

SendableSuite represents a Test Suite that can be created or updated via the api

type Status

type Status struct {
	ColorBright int    `json:"color_bright"`
	ColorDark   int    `json:"color_dark"`
	ColorMedium int    `json:"color_medium"`
	ID          int    `json:"id"`
	IsFinal     bool   `json:"is_final"`
	IsSystem    bool   `json:"is_system"`
	IsUntested  bool   `json:"is_untested"`
	Label       string `json:"label"`
	Name        string `json:"name"`
}

Status represents a Status

type Suite

type Suite struct {
	CompletedOn int    `json:"completed_on"`
	Description string `json:"description"`
	ID          int    `json:"id"`
	IsBaseline  bool   `json:"is_baseline"`
	IsCompleted bool   `json:"is_completed"`
	IsMaster    bool   `json:"is_master"`
	Name        string `json:"name"`
	ProjectID   int    `json:"project_id"`
	URL         string `json:"url"`
}

Suite represenst a Test Suite

type Test

type Test struct {
	AssignedToID     int    `json:"assignedto_id"`
	CaseID           int    `json:"case_id"`
	Estimate         string `json:"estimate"`
	EstimateForecast string `json:"estimate_forecast"`
	ID               int    `json:"id"`
	MilestoneID      int    `json:"milestone_id"`
	PriorityID       int    `json:"priority_id"`
	Refs             string `json:"refs"`
	RunID            int    `json:"run_id"`
	StatusID         int    `json:"status_id"`
	Title            string `json:"title"`
	TypeID           int    `json:"type_id"`
}

Test represent a Test

type UpdatableRun

type UpdatableRun struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	MilestoneID int    `json:"milestone_id,omitempty"`
	IncludeAll  *bool  `json:"include_all,omitempty"`
	CaseIDs     []int  `json:"case_ids,omitempty"`
}

UpdatableRun represents a Run that can be updated via the api

type UpdatableSection

type UpdatableSection struct {
	Description string `json:"description,omitempty"`
	Name        string `json:"name,omitempty"`
}

UpdatableSection represents a Test Suite Section that can be updated via the api

type User

type User struct {
	Email    string `json:"email"`
	ID       int    `json:"id"`
	IsActive bool   `json:"is_active"`
	Name     string `json:"name"`
}

User represents a User

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL