From 2c1e00f2d5d99aa048fa5ff1586217a9ddb29a39 Mon Sep 17 00:00:00 2001 From: Tian Feng Date: Tue, 8 Oct 2024 17:05:47 -0700 Subject: [PATCH] feat: support downloading network.har and crash.json (#954) --- internal/http/rdcservice.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/http/rdcservice.go b/internal/http/rdcservice.go index c0f95a582..ce3810238 100644 --- a/internal/http/rdcservice.go +++ b/internal/http/rdcservice.go @@ -37,6 +37,8 @@ type rdcJob struct { DeviceLogURL string `json:"device_log_url,omitempty"` TestCasesURL string `json:"test_cases_url,omitempty"` VideoURL string `json:"video_url,omitempty"` + NetworkLogURL string `json:"network_log_url,omitempty"` + CrashLogURL string `json:"crash_log_url,omitempty"` Screenshots []struct { ID string } `json:"screenshots,omitempty"` @@ -310,6 +312,12 @@ func (c *RDCService) GetJobAssetFileNames(ctx context.Context, jobID string, rea if strings.HasSuffix(jr.VideoURL, "/video.mp4") { files = append(files, "video.mp4") } + if strings.HasSuffix(jr.NetworkLogURL, "/network.har") { + files = append(files, "network.har") + } + if strings.HasSuffix(jr.CrashLogURL, "/crash.json") { + files = append(files, "crash.json") + } if len(jr.Screenshots) > 0 { files = append(files, "screenshots.zip") }