test

package
v0.0.0-...-1335841 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	FileName string `json:"filename"`
	FileSize int    `json:"filesize"`
}

FileInfo ...

type Result

type Result struct {
	Name       string
	XMLContent []byte
	ImagePaths []string
	StepInfo   models.TestResultStepInfo
}

Result ...

type Results

type Results []Result

Results ...

func ParseTestResults

func ParseTestResults(testsRootDir string, logger logV2.Logger) (results Results, err error)

ParseTestResults walks through the Test Deploy directory and parses all the Steps' test results.

The Test Deploy directory has the following directory structure:

test_results ($BITRISE_TEST_DEPLOY_DIR)
├── step_1_test_results ($BITRISE_TEST_RESULT_DIR)
│		 ├── step-info.json
│		 ├── test_run_1
│		 │		 ├── UnitTest.xml
│		 │		 └── test-info.json
│		 └── test_run_2
│		     ├── UITest.xml
│		     └── test-info.json
└── step_2_test_results ($BITRISE_TEST_RESULT_DIR)
    ├── step-info.json
    └── test_run
        ├── results.xml
        ├── screenshot_1.jpg
        ├── screenshot_2.jpeg
        ├── screenshot_3.png
        └── test-info.json

func (Results) Upload

func (results Results) Upload(apiToken, endpointBaseURL, appSlug, buildSlug string, logger logV2.Logger) error

Upload ...

type UploadRequest

type UploadRequest struct {
	Name   string                    `json:"name"`
	Step   models.TestResultStepInfo `json:"step_info"`
	Assets []FileInfo                `json:"assets"`
	FileInfo
}

UploadRequest ...

type UploadResponse

type UploadResponse struct {
	ID     string      `json:"id"`
	Assets []UploadURL `json:"assets"`
	UploadURL
}

UploadResponse ...

type UploadURL

type UploadURL struct {
	FileName string `json:"filename"`
	URL      string `json:"upload_url"`
}

UploadURL ...

Directories

Path Synopsis
Package converters contains the interface that is required to be a package a test result converter.
Package converters contains the interface that is required to be a package a test result converter.

Jump to

Keyboard shortcuts

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