-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility of convert new fuzzing tests output to junit format. #129
Comments
I haven't used the fuzzing yet in Go 1.18, but a quick test shows the output is somewhat similar so it might work already. Have you tried it? If you have some fuzz output that is not handled well, feel free to post it here. |
Hey, thanks for you reply. Yes, i tested, and the fuzzing format it's a little different. You can using this example, but i generated the following output in a little personal project using this command: Go Command:
Go Output:
The XML generated with go-junit-report: <?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite tests="18" failures="0" time="11.154" name="git.worten.net/fcd/packages/error">
<properties>
<property name="go.version" value="go1.18"></property>
</properties>
<testcase classname="error" name="TestNew" time="0.000"></testcase>
<testcase classname="error" name="TestNew/All_equal" time="0.000"></testcase>
<testcase classname="error" name="TestNew/Only_type_equal" time="0.000"></testcase>
<testcase classname="error" name="TestWrap" time="0.000"></testcase>
<testcase classname="error" name="TestWrap/All_equal" time="0.000"></testcase>
<testcase classname="error" name="TestWrapf" time="0.000"></testcase>
<testcase classname="error" name="TestWrapf/All_equal" time="0.000"></testcase>
<testcase classname="error" name="TestUnwrap" time="0.000"></testcase>
<testcase classname="error" name="TestUnwrap/Simple_Unwrap" time="0.000"></testcase>
<testcase classname="error" name="TestCause" time="0.000"></testcase>
<testcase classname="error" name="TestCause/Simple_Cause" time="0.000"></testcase>
<testcase classname="error" name="TestServiceError_New" time="0.000"></testcase>
<testcase classname="error" name="TestServiceError_New/Success_new" time="0.000"></testcase>
<testcase classname="error" name="TestServiceError_Wrap" time="0.000"></testcase>
<testcase classname="error" name="TestServiceError_Wrap/Success_new" time="0.000"></testcase>
<testcase classname="error" name="TestServiceError_Wrapf" time="0.000"></testcase>
<testcase classname="error" name="TestServiceError_Wrapf/Success_new" time="0.000"></testcase>
<testcase classname="error" name="BenchmarkWrapf" time="0.000001054"></testcase>
</testsuite>
</testsuites> Note that it does not include the fuzzing tests of my golang output, but don't worry, i will send a PR in the next days :) |
Thanks, that's very helpful. It looks like we should be able to support this with a few small changes, and in fact it looks like the v2 branch already outputs something that seems usable: <?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="19">
<testsuite name="git.worten.net/fcd/packages/error" tests="19" failures="0" errors="0" hostname="local" time="11.154" timestamp="2022-04-05T21:23:09+01:00">
<testcase name="TestNew" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestNew/All_equal" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestNew/Only_type_equal" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestWrap" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestWrap/All_equal" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestWrapf" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestWrapf/All_equal" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestUnwrap" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestUnwrap/Simple_Unwrap" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestCause" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestCause/Simple_Cause" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestServiceError_New" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestServiceError_New/Success_new" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestServiceError_Wrap" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestServiceError_Wrap/Success_new" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestServiceError_Wrapf" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="TestServiceError_Wrapf/Success_new" classname="git.worten.net/fcd/packages/error" time="0.000"></testcase>
<testcase name="FuzzUnwrap" classname="git.worten.net/fcd/packages/error" time="10.080"></testcase>
<testcase name="BenchmarkWrapf" classname="git.worten.net/fcd/packages/error" time="1.054000000"></testcase>
</testsuite>
</testsuites> I'd hold off on sending a PR at the moment. I don't intend to make further changes to v1 (currently in the master branch). I'm working on a v2 (in the v2 branch), but still planning to do some refactoring before I merge it to master and start accepting contributions for that version. |
On the new golang version 1.18 we have a new way to test, called fuzzing tests, and this return a different output. Is it possible convert this new output to junit format?
The text was updated successfully, but these errors were encountered: