Skip to content

Commit 96d3b44

Browse files
authored
feat: add testcase debug log (#530)
* feat: add testcase debug log --------- Signed-off-by: yuluo-yx <[email protected]>
1 parent e68c996 commit 96d3b44

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/runner/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (r *simpleTestCaseRunner) RunTestCase(testcase *testing.TestCase, dataConte
188188
return
189189
}
190190

191-
r.log.Debug("test case %q, status code: %d\n", testcase.Name, resp.StatusCode)
191+
r.log.Debug("test case %q, test case info: %v, status code: %d\n", testcase.Name, testcase, resp.StatusCode)
192192

193193
if err = testcase.Expect.Render(dataContext); err != nil {
194194
return

pkg/server/remote_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func TestRunTestCase(t *testing.T) {
148148
})
149149
assert.NoError(t, err)
150150
assert.Equal(t, sampleBody, result.Body)
151-
assert.Contains(t, result.Output, "start to run: 'get'\nstart to send request to http://foo\ntest case \"get\", status code: 200\n")
151+
assert.Contains(t, result.Output, "start to run: 'get'\nstart to send request to http://foo\ntest case \"get\", test case info: &{ get <nil> <nil> {http://foo GET map[] map[key:value] map[] map[] } {0 map[] map[] [] [] }}, status code: 200\n")
152152
})
153153

154154
t.Run("text response", func(t *testing.T) {

0 commit comments

Comments
 (0)