mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-04 13:06:57 +08:00
feat: add cdoe for risk control
This commit is contained in:
@@ -102,6 +102,13 @@ var (
|
|||||||
TrackingFomatError = errors.New("tracking format error") // 91
|
TrackingFomatError = errors.New("tracking format error") // 91
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// risk control related: [100, 110)
|
||||||
|
var (
|
||||||
|
RiskControlLogout = errors.New("risk control logout") // 100
|
||||||
|
RiskControlSlideVerification = errors.New("risk control slide verification") // 101
|
||||||
|
RiskControlAccountActivation = errors.New("risk control account activation") // 102
|
||||||
|
)
|
||||||
|
|
||||||
var errorsMap = map[error]int{
|
var errorsMap = map[error]int{
|
||||||
// environment
|
// environment
|
||||||
ConfigureError: 3,
|
ConfigureError: 3,
|
||||||
@@ -175,6 +182,11 @@ var errorsMap = map[error]int{
|
|||||||
// trackings related
|
// trackings related
|
||||||
TrackingGetError: 90,
|
TrackingGetError: 90,
|
||||||
TrackingFomatError: 91,
|
TrackingFomatError: 91,
|
||||||
|
|
||||||
|
// risk control related
|
||||||
|
RiskControlLogout: 100,
|
||||||
|
RiskControlSlideVerification: 101,
|
||||||
|
RiskControlAccountActivation: 102,
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsErrorPredefined(err error) bool {
|
func IsErrorPredefined(err error) bool {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ type Summary struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Summary) AddCaseSummary(caseSummary *TestCaseSummary) {
|
func (s *Summary) AddCaseSummary(caseSummary *TestCaseSummary) {
|
||||||
log.Info().Interface("caseSummary", caseSummary).Msg("add case summary")
|
log.Info().Str("name", caseSummary.Name).Msg("add case summary")
|
||||||
s.Success = s.Success && caseSummary.Success
|
s.Success = s.Success && caseSummary.Success
|
||||||
s.Stat.TestCases.Total += 1
|
s.Stat.TestCases.Total += 1
|
||||||
s.Stat.TestSteps.Total += caseSummary.Stat.Total
|
s.Stat.TestSteps.Total += caseSummary.Stat.Total
|
||||||
|
|||||||
Reference in New Issue
Block a user