You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 🚧 Introduce new output format JUnit
* deprecated `json` flag option
* added new flag option `output`
* started XML marshalling for JUnit format
* 🐛 Add missing type in OutputValue String method
* 🐛 Print Junit report
* ✨ Generate report in Junit format
* ✅ Test FinalResults for JSON and JUnit
* Apply suggestions from code review
Co-authored-by: Nick Kubala <[email protected]>
* 🔥 Remove unused package errors
* 📝 Add missing parenthesis
* 📝 Add junit to output formats in test help
* 📝 Add output formats section with samples
Co-authored-by: Nick Kubala <[email protected]>
cmd.Flags().StringVar(&opts.TestReport, "test-report", "", "generate JSON test report and write it to specified file.")
208
+
cmd.Flags().StringVar(&opts.TestReport, "test-report", "", "generate test report and write it to specified file (supported format: json, junit; default: json)")
expected: `<testsuites failures="1" tests="2" time="2"><testsuite><testcase name="my first test" time="1"></testcase><testcase name="my fail" time="1"><failure>this failed because of that</failure></testcase></testsuite></testsuites>`,
48
+
},
49
+
{
50
+
actual: bytes.NewBuffer([]byte{}),
51
+
format: unversioned.Json,
52
+
expected: `{"Pass":1,"Fail":1,"Total":2,"Duration":2,"Results":[{"Name":"my first test","Pass":true,"Stdout":"it works!","Duration":1},{"Name":"my fail","Pass":false,"Stderr":"this failed","Errors":["this failed because of that"],"Duration":1}]}`,
0 commit comments