Code Monkey home page Code Monkey logo

Comments (12)

duncangrist avatar duncangrist commented on August 21, 2024

We're seeing this too. It's causing our Bamboo server to miss tests as many tests appear to be named the same in the generated junit xml file.

Downgraded to [email protected] for now as this doesn't exhibit this issue.

from karma-junit-reporter.

NeverwinterMoon avatar NeverwinterMoon commented on August 21, 2024

Same problem for us on Bamboo - with latest reporter version, out of 750 tests, Bamboo, after parsing, shows only 570 tests. With 2.2.2 Bamboo was showing a more realistic number (still not everything).

from karma-junit-reporter.

dignifiedquire avatar dignifiedquire commented on August 21, 2024

Thanks for the report

from karma-junit-reporter.

developit avatar developit commented on August 21, 2024

+1 would love to see a fix for this, or a tip on where to look if I were to try a PR ;)

from karma-junit-reporter.

gunnx avatar gunnx commented on August 21, 2024

I noticed this too after upgrading, the classname used in the XML is only the top level "describe" any nested "describe" names are omitted, so tests group under the one level instead of splitting out.

from karma-junit-reporter.

marty-buly avatar marty-buly commented on August 21, 2024

This error was introduced by e4f7ebd. In order to generate Sonar compatible report, one have changed generation of classname parameter from result.suite.join(' ') to result.suite[0].

from karma-junit-reporter.

phillipj avatar phillipj commented on August 21, 2024

Played with this locally and found that prefixing the test description with the parent suite names, ended it with the @osherx expected output test name.

From line #125

var spec = suites[browser.id].ele('testcase', {
  name: result.suite.join(' ') + ' ' + result.description, // was result.description
  time: ((result.time || 0) / 1000),
  classname: getClassName(browser, result)
})

I could possibly open a PR with that fix if @dignifiedquire thinks it looks good?

from karma-junit-reporter.

jpaulin avatar jpaulin commented on August 21, 2024

👍 for the idea of getting the nested describes working. We are also for now resorting to 0.3.3 downgrade most likely soon. I am writing a simple test for testing whether I could extinguish the bug; made by using that older working result.suite.join(' ') with enough sanity testing also so not to introduce new creepers. :) But so relative-newbie still (mostly in the tooling and philosophy of practical opensource) that I'll most likely be having a PR earliest 2016, if any.

from karma-junit-reporter.

dignifiedquire avatar dignifiedquire commented on August 21, 2024

@phillipj sorry for the late reply but yes that sounds good

from karma-junit-reporter.

jpaulin avatar jpaulin commented on August 21, 2024

Can this be tested by test suites within the reporter? Ie. does karma-junit-reporter itself have tests? I was also a bit hesitant in putting forward a blind PR.

from karma-junit-reporter.

jpaulin avatar jpaulin commented on August 21, 2024

@dignifiedquire Hi, has there been progress in this individual issue either through fix or the latest version containing changes? There's at least one pull request but the thing is that it should be tested with at least some known instances where the buggy 0.3.3 (-> onwards) name flattening happens. I didn't have test data at hand to test the PR.

from karma-junit-reporter.

karniemi avatar karniemi commented on August 21, 2024

+1

from karma-junit-reporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.