Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Test results not showing up in Jenkins #1

Open
davisford opened this issue Apr 7, 2015 · 4 comments
Open

Test results not showing up in Jenkins #1

davisford opened this issue Apr 7, 2015 · 4 comments

Comments

@davisford
Copy link

I've got the plugin [email protected] and I've configured karma.conf.js as follows:

  reporters: ['mocha', 'jenkins'],
  jenkinsReporter: {
    outputFile: 'test-client-report.xml',
    suite: 'warehouse-web',
    classnameSuffix: 'browser-test'
  },

Which generates XML that looks like this:

<?xml version="1.0"?>
<testsuites>
  <testsuite name="PhantomJS 1.9.8 (Mac OS X)" package="warehouse-web" timestamp="2015-04-07T16:47:40" id="0" hostname="Daviss-MacBook-Pro.local" make_target="undefined" tests="28" errors="0" failures="0" time="0.046">
    <properties>
      <property name="browser.fullName" value="Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.8 Safari/534.34"/>
    </properties>
    <testcase name="should execute $resource to fetch current user" time="0.004" classname="..browser-test" package="warehouse-web PhantomJS 1.9.8 (Mac OS X)" parentSuites="SettingsCtrl"/>
    <testcase name="should tell the server to verify the email account on `$scope.verify`" time="0.001" classname="..browser-test" package="warehouse-web PhantomJS 1.9.8 (Mac OS X)" parentSuites="SettingsCtrl"/>

But when I look for the test results in Jenkins (build 1.607) it does not show them, only the number of tests and time it took:

screen shot 2015-04-07 at 1 08 34 pm

Am I missing something?

@davisford
Copy link
Author

It looks like the issue is this classname="..browser-test" -- jenkins doesn't know how to deal with that, the parent classname or package is a dot and it just can't parse it into the ui.

I switched instead to karma-junit-reporter and the results show up for me.

@timaschew
Copy link
Contributor

okay, seems that there are some case which doesn't work with this code: https://github.com/actano/karma-jenkins-reporter/blob/master/index.js#L97-L102

but how your report in jenkins looks like now? or what you're expecting instead of the .?

@TonyApuzzo
Copy link

Hi, I have this same issue. I suspect it is happening because I'm not specifying any output directory nor am I using browser folders. From the docs it sounds like something needs to be done with environment variables in order to construct the desired classnames??? I can't figure it out.

@timaschew
Copy link
Contributor

Sorry, I can't figure it out as well, we're not using this module anymore.
I add a DEPRECATED to the readme an will unpublish it in this week from npmjs.org

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants