Forum Discussion

Shara's avatar
Shara
Occasional Contributor
16 years ago

Report design not valid error

Hi,

I have a few problems with the reporting function. I notices the "Add Report Template" button don't work. But I have updated the existing templates (mainly just the Test Suite Template, and various subreports). I've got the Test Suite report to generate before and after test cases execution.

However, when I run a Test Case separately and then close that Test Case's tab. Then return to my Test Suite to run another report.
soapUI gives me the following exception.

ERROR:net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. Class not set for parameter : TestSuiteCoverage
net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :
1. Class not set for parameter : TestSuiteCoverage
at net.sf.jasperreports.engine.design.JRAbstractCompiler.verifyDesign(JRAbstractCompiler.java:258)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:140)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)
at com.eviware.soapui.reporting.engine.jasper.GenerateJasperReport.a(SourceFile:588)
at com.eviware.soapui.reporting.engine.jasper.GenerateJasperReport.createReport(SourceFile:446)
at com.eviware.soapui.reporting.engine.jasper.GenerateJasperReport$ReportFillWorker.construct(SourceFile:416)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:140)
at java.lang.Thread.run(Unknown Source)

Note: I don't have Test Suite Coverage enabled. I have actually removed that parameter and I still get this same error.

And on a separate note, I tried using the "Reload all global report and template from disk" which then causes NullPointerExceptions.

I am using soapUI Pro 3.5.1 Build dist-97-2010-04-12

Any help or direction to debug this issue is much appreciated.

Thanks.

3 Replies

  • LChristian's avatar
    LChristian
    Occasional Contributor
    I investigated a bit more and I think I've found a solution. In your parent report template (not a subreport)
    add in this line into the top of the parameter section (for me it was between <template> and <pageHeader>):


    <parameter name="TestSuiteCoverage" class="com.eviware.soapui.reporting.reports.support.ExportableJRBeanCollectionDataSource"/>


    You can change the name to whatever parameter it's bitching about, usually based on what kind of report you're generating.
  • LChristian's avatar
    LChristian
    Occasional Contributor
    Ain't soapUI grand?

    I've found that a good ol' restart of soapUI always works for fixing the dreaded "Class not set for parameter: blank blank Coverage"
    Then, it will usually stay functional for up to ~5 minutes ..on a good day. Rinse and repeat.

    Another good idea is to compile your reports externally rather than letting soapUI try to coax jasper reports into thinking "subreport:MySubreport" is a valid URL.

    Example java to compile .jrxml to .jasper:

    JasperDesign jasperDesign = JRXmlLoader.load("MyReport.jrxml");
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
    JRSaver.saveObject(jasperReport, "MyCompiledReport.jasper");


    Example of new <subreportExpression> usage in the parent jasper report:

    <subreportExpression class="java.lang.String">"C:\\MyCompiledReport.jasper"</subreportExpression>
  • Shara's avatar
    Shara
    Occasional Contributor
    Unfortunately, I am trying to avoid a restart of soapUI, or in particularly closing any of the opened window.

    Since the reporting depends on the state of the Test Suite Results, closing the Test Suite window or soapUI itself means I need to re-run the whole test suite again. [and on some occasions, this is not an option or not possible].

    I understand it is entirely possible to write custom modules or scripts to bypass the whole running-test-again-when-soapUI-crashes-or-needs-a-restart and report generation, but it goes against the original reason for using soapUI reporting, which is saving time

    But, thanks for the suggestion.