Forum Discussion

Telmore_A_S_Sup's avatar
Telmore_A_S_Sup
New Contributor
13 years ago

[Open] how to generate reports when using SoapUIProTestCaseR

Hi,

I have been trying to find a solution on the net for my question w/o luck - so here goes my question.
I'm trying to get some reporting on my soapUI testSuites when running them from intellij.

Currently I'm running my testSuites like this from intellij:
public void runTestSuites() throws Exception{
SoapUITestCaseRunner runner = new SoapUIProTestCaseRunner();
runner.setOutputFolder("C:\\hjp\\soapUiTests.testRunner\\src\\test\\soapUiTestLog");
runner.setProjectFile("C:\\hjp\\soapUIprojects\\CommonAPI Test env-soapui-project.xml");
runner.run();

}
When I'm done running my testSuites in that project I'd like to generate reports in RTF/PDF format. Like you can do from the soapUI GUI - And with the same content.

How do I generate the reports in RTF/PDF format from intellij? Can it be done?

Thanks in advance.



/Henrik

5 Replies

  • Hi Erik,

    I don't get you in regards of the SoapUiProTestCaseRunner? I'm already using it?

    I still dont get the serReportFormats - Havent figured it out? How do I trigger it to actually create a report in RTF format?
    You mention the Jasper? How do I use that?

    When I use the setReportName for a JÙnitReport it's not naming my report what i have specified in setReportName..

    Can you help me get started on this?
  • Hi again!

    Sorry, but according to your code example it looks like you are using the
    SoapUITestCaseRunner 
    not the
    SoapUIProTestCaseRunner


    Also the report name only apply to Jasper reports.

    This should work:


    SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner();
    runner.setReportName(<enter name of the report here, for example Project Report>)
    runner.setReportFormats(new String[]{"RTF"});


    ---
    Regards
    Erik, SmartBear Sweden
  • Ahh yea, missed that part in the code example - It was changed after I copied the example


    This is my code right now - And it's not generating any RTF files.
    String projectFile = "C:\\hjp\\soapUIprojects\\CommonAPI Test env-soapui-project.xml";
    String outPutFolder = "C:\\hjp\\soapUiTests.testRunner\\src\\test\\soapUiTestLog\\";
    String sysdate = new SimpleDateFormat("dd-MM-yyyy HH-mm-ss").format(new Date());
    SoapUIProTestCaseRunner runner = new SoapUIProTestCaseRunner();
    runner.setProjectFile(projectFile);
    runner.setOutputFolder(outPutFolder + sysdate);
    runner.setReportName("Project Report");
    runner.setReportFormats(new String[]{"RTF"});
    runner.run();

    All I'm getting right now is .txt files in my outputfolder:
    Example: CVR_TestSuite-lookupCVR-lookupCvr-0-FAILED.txt

    What am I missing?

    /Henrik
  • Hey,

    I'm afraid this issue got a little bit lost in the forums. I'm bumping it back up, and we'll take a look at it and get back to you as soon as possible.

    Regards,

    Arian
    SmartBear Sweden