Documentation
¶
Overview ¶
Copyright 2023-2024 API Testing Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023-2024 API Testing Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func ConvertHistoryToRemoteTestCase(historyTestcase *HistoryTestResult) (result *server.TestCase)
- func ConvertToGRPCHistoryTestCase(historyTestResult *HistoryTestResult) (result *server.HistoryTestCase)
- func ConvertToGRPCHistoryTestSuite(historyTestResult *HistoryTestResult) (result *remote.HistoryTestSuite)
- func ConvertToGRPCTestSuite(suite *TestSuite) (result *remote.TestSuite)
- func ConvertToRemoteHistoryTestResult(historyTestResult *HistoryTestResult) (result *server.HistoryTestResult)
- func ConvertToRemoteTestCase(testcase *TestCase) (result *server.TestCase)
- func NewRemoteServer(defaultHistoryLimit int) (s remote.LoaderServer)
- func SliceToJSON(slice []string) (result string)
- type HistoryTestResult
- type TestCase
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertHistoryToRemoteTestCase ¶ added in v0.0.11
func ConvertHistoryToRemoteTestCase(historyTestcase *HistoryTestResult) (result *server.TestCase)
func ConvertToGRPCHistoryTestCase ¶ added in v0.0.11
func ConvertToGRPCHistoryTestCase(historyTestResult *HistoryTestResult) (result *server.HistoryTestCase)
func ConvertToGRPCHistoryTestSuite ¶ added in v0.0.11
func ConvertToGRPCHistoryTestSuite(historyTestResult *HistoryTestResult) (result *remote.HistoryTestSuite)
func ConvertToGRPCTestSuite ¶
func ConvertToRemoteHistoryTestResult ¶ added in v0.0.11
func ConvertToRemoteHistoryTestResult(historyTestResult *HistoryTestResult) (result *server.HistoryTestResult)
func ConvertToRemoteTestCase ¶
func NewRemoteServer ¶
func NewRemoteServer(defaultHistoryLimit int) (s remote.LoaderServer)
NewRemoteServer creates a remote server instance
func SliceToJSON ¶
Types ¶
type HistoryTestResult ¶ added in v0.0.11
type HistoryTestResult struct {
ID string `gorm:"primaryKey"`
HistorySuiteName string
CreateTime string
//suite information
SuiteName string `json:"suiteName"`
SuiteAPI string
SpecKind string
SpecURL string
Param string
//case information
CaseName string `json:"caseName"`
CaseAPI string
Method string
Body string
Header string
HistoryHeader string
Cookie string
Query string
Form string
ExpectStatusCode int
ExpectBody string
ExpectSchema string
ExpectHeader string
ExpectBodyFields string
ExpectVerify string
//result information
Message string `json:"message"`
Error string `json:"error"`
StatusCode int32 `json:"statusCode"`
Output string `json:"output"`
}
func ConvertToDBHistoryTestResult ¶ added in v0.0.11
func ConvertToDBHistoryTestResult(historyTestResult *server.HistoryTestResult) (result *HistoryTestResult)
type TestCase ¶
type TestCase struct {
SuiteName string `json:"suiteName" gorm:"type:varchar(200);uniqueIndex:idx_name_and_suite_name"`
Name string `gorm:"type:varchar(200);uniqueIndex:idx_name_and_suite_name"`
API string
Method string
Body string
Header string
Cookie string
Query string
Form string
ExpectStatusCode int
ExpectBody string
ExpectSchema string
ExpectHeader string
ExpectBodyFields string
ExpectVerify string
}