Forum Discussion

JGibson's avatar
JGibson
Occasional Contributor
11 years ago

[Resolved] Report Reference Material

I'm having trouble mapping out what options are available from within reports and subreports. Looking at the various example reports included in SoapUI, and through trial-and-error myself, I have discovered some of the parameters and fields that can be used, but I've only scratched the surface. There must be a document of some kind somewhere that lays out the options.

Examples of information I need and can't find:
When you create a custom Report Template in Soapui (under MyProject > Reporting > Available Reports), you are asked to select a "Report Type", which can be TestCase, TestSuite, Common, etc. What are the differences? Most seem to accept the variable: $F{name} , but there are others depending on the type. Can I get a list of those for each Report type?

Similarly, there are a few options when creating SubReports. Report Type and Data Source seem the most relevant. What parameters and fields are available for the different types of Data Sources? Just as an example, I tried out two subreports with Data Sources "Test Cases" and with "TestCase Results". In order to get the TestCases' names, I seem to have to declare:
<field name="name" class="java.lang.String"/>

For the "Test Cases" Data Source and
<field name="testCaseName" class="java.lang.String"/>

for the "TestCase Results" Data Source. Guessing what's available and how to get at it doesn't really seem like an acceptable option.
Thanks for your help.

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Thanks for the suggestion. I completely agree our documentation on the Report & sub reports is a bit hard to follow and not complete. I have created a task for it (SOAPUI-4665) and will get back to you once we have updated the document.

    Shadid
    SmartBear Sweden.
  • NFox's avatar
    NFox
    Occasional Contributor
    Hello,

    I was just wondering if there had been any progress with this.

    I am in the process of building custom reports, and have made reasonable progress, but am unable to get past a particular sticking point.

    I have created a duplicate of the ProjectReport.
    This has a customised version of the ModelItemListReport as a Subreport to display all the TestSuites in the project. This subreport then has it's own subreport which is supposed to display all the TestCases within that TestSuite.

    However, I cannot seem to find the information anywhere which I need to create the datasource for the last subreport.
    I have tried various things such as:
    $P{REPORT_DATA_SOURCE}
    $P{REPORT_DATA_SOURCE}.cloneDataSource()
    $P{REPORT_DATA_SOURCE#TestCases}
    $P{REPORT_DATA_SOURCE#TestSuiteTestCases}
    $P{REPORT_DATA_SOURCE.TestCases}
    $P{REPORT_DATA_SOURCE.TestSuiteTestCases}
    $P{REPORT_DATA_SOURCE}.{TestCases}
    $P{REPORT_DATA_SOURCE}.{TestSuiteTestCases}
    $P{REPORT_DATA_SOURCE}.$P{TestCases}
    $P{REPORT_DATA_SOURCE}.$P{TestSuiteTestCases}
    etc, but nothing seems to work.

    I just get the following error for the middle report:
    Mon Mar 31 18:23:11 BST 2014:ERROR:net.sf.jasperreports.engine.JRException: Error loading object from URL : subreport:ModelItemListReport2

    I feel like I am very close, but am missing a crucial piece of information to enable me to get the array of TestCases for a TestSuite as a suitable datasource to use in the reports.

    Please please please could someone get back to me and let me know, as this is becoming a big issue for me.



    Kindest Regards
  • JGibson's avatar
    JGibson
    Occasional Contributor
    Hi NFox,
    I'm also confused on this point. Nesting subreports is something I have done with JasperReports in other contexts, but in those places the fields and parameters available are known, and it was just a matter of arranging things correctly.

    I notice that this thread has now been marked Resolved, though I can find no expanded report reference section on the website. Nor can I find SOAPUI-4665, which I assume is an internal Jira issue. I'm just trying to avoid wasting time, if you folks have a put up a list of the fields exposed by each datasource, and the parameters exposed to each of the main report types when they are called, let me know.

    If you have decided not to pursue putting that up, please let me know!

    PS- I thought it might be amusing to point out that on page http://www.soapui.org/Reporting/reporti ... cture.html , you tease us with the promise of the list of fields for just a single DataSource:

    As you can see the subreportExpression uses a soapUI-specific "subreport:" URL-syntax which soapUI uses to locate the specified SubReport template. The fields exposed by the TestSuiteMetrics DataSource are correspondingly defined in the MetricsReport template:
    1.......

    But someone thought better of it at the last minute, and seems to have replaced this list with the text "......." .