-
Notifications
You must be signed in to change notification settings - Fork 125
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
Ability to apply a transformation to the "testsuite" name in junit #50
Comments
Do you have a link to the jenkins plugin that does this? I wonder what logic it uses to make the directory structure. I guess Java class paths are separated by dots, which is why it has done this? If that is the case another option might be to convert the path into something that resembles a valid java path (ex: This change (#49) was made recently (v0.3.4) to improve integration with CircleCI. I wonder if that will cause any problems with the jenkins plugin. Generally making the junit report integrate better with CI systems makes sense to me. |
Yes, I suspect this is something to do with Java class path separators. I'm using a hosted Jenkins so the Switching to |
I found a (very gross) workaround:
(the |
Jenkins interprets the default as nested folders `github` → `com/docker/app` (presumably due to thinking it is using Java style naming). In gotestyourself/gotestsum#50 I requested support for something in `gotestsum` itself but for now this will do. Signed-off-by: Ian Campbell <[email protected]>
Jenkins interprets the default as nested folders `github` → `com/docker/app` (presumably due to thinking it is using Java style naming). In gotestyourself/gotestsum#50 I requested support for something in `gotestsum` itself but for now this will do. Signed-off-by: Ian Campbell <[email protected]>
Jenkins interprets the default as nested folders `github` → `com/docker/app` (presumably due to thinking it is using Java style naming). In gotestyourself/gotestsum#50 I requested support for something in `gotestsum` itself but for now this will do. Signed-off-by: Ian Campbell <[email protected]>
Jenkins interprets the default as nested folders `github` → `com/docker/app` (presumably due to thinking it is using Java style naming). In gotestyourself/gotestsum#50 I requested support for something in `gotestsum` itself but for now this will do. Signed-off-by: Ian Campbell <[email protected]>
Jenkins interprets the default as nested folders `github` → `com/docker/app` (presumably due to thinking it is using Java style naming). In gotestyourself/gotestsum#50 I requested support for something in `gotestsum` itself but for now this will do. Signed-off-by: Ian Campbell <[email protected]>
Fixes gotestyourself#50. I would use this with e.g. `--junit-striplevels=2` and `--junitfile-prefix=unit/app` to replace `github.com/docker/app` with `app/unit` as the root path and I'd vary `unit` for other test runs (e.g. with coverage, with experimental enabled etc)
If I run tests on a package
github.com/ijc/foo/...
using-junitfile
then I get results with:...so far so good.
However if I feed this into Jenkins it creates me a directory named "github" and within that there are two entries "com/ijc/foo/bar" and "com/ijc/foo/baz", this is not really a desirable presentation.
It would be useful if gotestsum could allow fiddling with the name somehow. My preference would be to allow specifying a (common) prefix to be dropped from all the suite names (e.g. I would likely choose to drop
github.com/ijc/foo/
). A variant of that would be a-p«N»
option (cfpatch(1)
) to strip «n» path elements.I'm not sure if other transformations might be useful/better e.g.
tr . -
or some sort of escaping.Just stripping a prefix has the benefit of being nice and simple I think.
The text was updated successfully, but these errors were encountered: