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

New: Add classname attribute to JUnit testcase (refs #11068) #11683

Merged
merged 3 commits into from May 27, 2019

Conversation

Projects
None yet
7 participants
@hspazio
Copy link
Contributor

commented May 7, 2019

What is the purpose of this pull request? (put an "X" next to item)
This PR is a follow up from the discussion in issue #11068.
With this change we are adding classname attribute to the <testcase> item.

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain: Add new attribute to JUnit formatter

What changes did you make? (Give an overview)

The value of classname is defined as the file path without extension.
Similar implementation to TSlint: palantir/tslint#4327

example:

<?xml version="1.0" encoding="utf-8"?>
<testsuites>
  <testsuite package="org.eslint" time="0" tests="1" errors="1" name="/path/to/foo.js">
    <testcase time="0" name="org.eslint.foo" classname="/path/to/foo">
      <failure message="Unexpected foo.">
        <![CDATA[line 5, col 10, Error - Unexpected foo. (foo)]]>
      </failure>
    </testcase>
  </testsuite>
</testsuites>

Is there anything you'd like reviewers to focus on?

Does this schema also need to be updated? https://eslint.org/docs/user-guide/formatters/#junit

@eslint eslint bot added the triage label May 7, 2019

@jsf-clabot

This comment has been minimized.

Copy link

commented May 7, 2019

CLA assistant check
All committers have signed the CLA.

tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this pull request May 17, 2019

tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this pull request May 17, 2019

@hspazio

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

@not-an-aardvark @platinumazure Is there anything missing with this PR that I can help? Thank you.

@platinumazure
Copy link
Member

left a comment

LGTM, thanks! I would like another team member (or more than one) to review before merging.

@ilyavolodin
Copy link
Member

left a comment

Changes looks good to me. Can you rebase on the latest master please?

@hspazio hspazio force-pushed the hspazio:add-classname-to-junit-testcase branch from 9a5e73c to a7449e9 May 27, 2019

@hspazio

This comment has been minimized.

Copy link
Contributor Author

commented May 27, 2019

Thank you @ilyavolodin. Rebased.

@ilyavolodin ilyavolodin merged commit d662b17 into eslint:master May 27, 2019

5 checks passed

commit-message PR title follows commit message guidelines
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
@dosuken123

This comment has been minimized.

Copy link

commented May 28, 2019

Awesome! @hspazio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.