Skip to content
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

[JENKINS-26276] Implemented JUnitStep ("archiveTestResults") #9

Closed
wants to merge 2 commits into from

Conversation

akbertram
Copy link

Here is a first attempt at a workflow step that returns test summary results to the caller.
Can be used as follows:

def tests = archiveTestResults()
if(tests.failCount > 0) {
  // take action!
}

Feedback welcome!

Can be used as follows:

def tests = archiveTestResults()
if(tests.failCount > 0) {
  // take action!
}
@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@jglick
Copy link
Member

jglick commented Jan 5, 2015

The problem with doing this in junit is it means we cannot then bundle an update to this plugin in jenkins.war unless workflow-step-api is also bundled, which seems a big step. On the other hand the junit plugin is the most logical place for it. A compromise could be a new plugin inside the workflow-plugin repo depending on junit.

@DataBoundSetter
public void setLocation(@Nullable String location) {
this.location = location;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this. If location is defined in a @DataBoundConstructor, it should be final and there should be no @DataBoundSetter.

@akbertram
Copy link
Author

Thanks for the feedback! Will try to submit fixes by the end of next week.

- Renamed JUnitStep.location to JUnitStep.testResults to be consistent
  with JUnitResultArchiver
- @Whitelisted getters on TestResultSummary
- Added config.jelly for JUnitStep
- Removed updates to build status - caller can set build to error or
  unstable if desired.
@omehegan
Copy link
Member

Any plans to continue work on this?

@miguelaferreira
Copy link

+1 on this feature

@oleg-nenashev
Copy link
Member

@jglick Are you fine with the current impl? If yes, I'll try to integrate it

@olivergondza
Copy link
Member

The problem with doing this in junit is it means we cannot then bundle an update to this plugin in jenkins.war unless workflow-step-api is also bundled, which seems a big step.

How about make it an optional dependency? I would vote for that even if junit were not bundled...

@olivergondza
Copy link
Member

Also, the feature is untested.

@abayer
Copy link
Member

abayer commented Jan 12, 2016

+1 for resurrecting this - it'd be a handy feature.

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Sep 24, 2016

@abayer Are you working on it in #47?

@ziru
Copy link

ziru commented Feb 7, 2017

Any update on this PR? No go?

@oleg-nenashev
Copy link
Member

@ziru IIRC @abayer tried to implement something in #47, then @jglick -1'ed the approach. I suppose there is not much progress now

@abayer
Copy link
Member

abayer commented Nov 8, 2017

Closing - I added a junit step (replacing the junit @Symbol) in #76

@abayer abayer closed this Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants