mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-10 02:09:51 +08:00
fix: report GA event with value to indicate failure
This commit is contained in:
@@ -8,7 +8,7 @@ func TestSendEvents(t *testing.T) {
|
||||
event := EventTracking{
|
||||
Category: "unittest",
|
||||
Action: "SendEvents",
|
||||
Value: "123",
|
||||
Value: 123,
|
||||
}
|
||||
err := gaClient.SendEvent(event)
|
||||
if err != nil {
|
||||
@@ -21,7 +21,7 @@ func TestStructToUrlValues(t *testing.T) {
|
||||
Category: "unittest",
|
||||
Action: "convert",
|
||||
Label: "v0.3.0",
|
||||
Value: "123",
|
||||
Value: 123,
|
||||
}
|
||||
val := structToUrlValues(event)
|
||||
if val.Encode() != "ea=convert&ec=unittest&el=v0.3.0&ev=123" {
|
||||
|
||||
@@ -17,7 +17,7 @@ type EventTracking struct {
|
||||
Category string `form:"ec"` // Required. Event Category.
|
||||
Action string `form:"ea"` // Required. Event Action.
|
||||
Label string `form:"el"` // Optional. Event label, used as version.
|
||||
Value string `form:"ev"` // Optional. Event value, must be digits, "123"
|
||||
Value int `form:"ev"` // Optional. Event value, must be non-negative integer
|
||||
}
|
||||
|
||||
func (e EventTracking) StartTiming(variable string) UserTimingTracking {
|
||||
|
||||
Reference in New Issue
Block a user