feat: add cdoe for risk control

This commit is contained in:
lilong.129
2024-09-13 15:50:34 +08:00
parent a10d7235f8
commit dff42b8d56
2 changed files with 13 additions and 1 deletions

View File

@@ -102,6 +102,13 @@ var (
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{
// environment
ConfigureError: 3,
@@ -175,6 +182,11 @@ var errorsMap = map[error]int{
// trackings related
TrackingGetError: 90,
TrackingFomatError: 91,
// risk control related
RiskControlLogout: 100,
RiskControlSlideVerification: 101,
RiskControlAccountActivation: 102,
}
func IsErrorPredefined(err error) bool {

View File

@@ -44,7 +44,7 @@ type Summary struct {
}
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.Stat.TestCases.Total += 1
s.Stat.TestSteps.Total += caseSummary.Stat.Total