Giter VIP home page Giter VIP logo

Comments (7)

rdmueller avatar rdmueller commented on August 14, 2024

just noticed that I got one html report for one of two specs. But it is not regenerated when I re-run my current tests. The report shows a Success rate of 100%...

let me run an additional test: it seems that reports are generated fine when test are ok, but no report is generated at all for a spec if an assertion fails or the test throws an exception...

At least in my case...

from spock-reports.

renatoathaydes avatar renatoathaydes commented on August 14, 2024

I have never tested spock-reports with Grails. Would you be able to setup a very simple project that I can use to test this, and hopefully fix it?

from spock-reports.

rdmueller avatar rdmueller commented on August 14, 2024

I'll try to come up with an example over the weekend...

from spock-reports.

rdmueller avatar rdmueller commented on August 14, 2024

here is the first project:
https://github.com/rdmueller/grails-petclinic/tree/spock-reports
I've created two dummy specs which even have currently nothing to do with the project, but they demonstrate the problem. One produces a report, the other one does not.

Command to start the test:
grailsw dev test-app functional:

from spock-reports.

renatoathaydes avatar renatoathaydes commented on August 14, 2024

I found out what's going on.

With spock-reports version 1.2, there was a bug which made spock-reports throw an Exception (no current iteration) if your test failed with an Exception in the setup method. This was fixed in 1.2.1.

However, the individual specs reports are not being created when using spock-reports 1.2.2 because you're using Groovy 2.0.8, and spock-reports requires at least version 2.1.0 (due to this problem: http://stackoverflow.com/questions/16692196/groovy-javadocs-is-there-a-since-version-label-for-xmlutil).

If you can, please upgrade your Groovy version and this problem will go away.

If you cannot, I can remove the problematic method call and publish a patched version to work with older versions of Groovy, at the cost of not properly displaying some text in the reports (notably, things like < and > will not be escaped, potentially breaking the html file.

from spock-reports.

renatoathaydes avatar renatoathaydes commented on August 14, 2024

I decided to just implement the escapeXml method myself based on the Groovy implementation, so that Groovy 2.1 is not required anymore... I tested with Groovy 2.0.8 but spock-reports should probably work with any Groovy 2.+ version now.

from spock-reports.

rdmueller avatar rdmueller commented on August 14, 2024

Thanx for the quick help! It works now!

from spock-reports.

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.