Service Virtualization

  • 1.  TestRunException close workstation

    Posted Aug 31, 2017 05:30 AM

    Hello Team,

     

    From a CustJavaNodeInterface, how can I tell user that an error had occured without closing Workstation ?

    Today, I use a TestRunException, but on error, Workstation close without any information. User must search in logs files.

     

    Best regards,

     

    Benoit



  • 2.  Re: TestRunException close workstation
    Best Answer

    Posted Aug 31, 2017 04:36 PM

    Benoit,

     

    I take it that you have created a custom step that extends CustJavaNodeInterface? Is this right?

     

    The Workstation should never crash to desktop on an error or exception. It sounds like a memory leak of some sort. What are you seeing in the logs? And what exactly does your custom step do?



  • 3.  Re: TestRunException close workstation

    Posted Sep 01, 2017 05:12 AM

    Hello William,

     

    It is a custom step that implements CustJavaNodeInterface. 

    The logs : 

    2017-08-31 09:09:30,870Z (11:09) [AWT-EventQueue-0] INFO com.itko.lisa.test.TestCase - Name: 00-GenerateRRPairs Version: 5 created with LISA 10.1.0 (10.1.0.283)
    2017-08-31 09:09:31,910Z (11:09) [ProcDlgThreadCallbk@b9e7f24] INFO System.out - Creating file :scenario-1-req.xml
    2017-08-31 09:09:31,920Z (11:09) [ProcDlgThreadCallbk@b9e7f24] INFO System.out - Creating file :scenario-1-rsp.xml
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - java.io.FileNotFoundException: C:\Workspaces\LISA_10\NGUPI\svgpi-tuw-0.2\Data\rawtraffic\generated\servicesCatalogue.csv (Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at java.io.FileOutputStream.open0(Native Method)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at java.io.FileOutputStream.open(FileOutputStream.java:270)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at org.apache.commons.io.FileUtils.openOutputStream(FileUtils.java:367)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at org.apache.commons.io.FileUtils.writeLines(FileUtils.java:2209)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at org.apache.commons.io.FileUtils.writeLines(FileUtils.java:2150)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.ca.tools.rawtraffic.FromJavaRawTrafficTestReferentialGenerator.writeReport(FromJavaRawTrafficTestReferentialGenerator.java:291)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.ca.tools.rawtraffic.FromJavaRawTrafficTestReferentialGenerator.generateServiceCatalog(FromJavaRawTrafficTestReferentialGenerator.java:233)
    2017-08-31 09:09:31,930Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.ca.tools.rawtraffic.FromJavaRawTrafficTestReferentialGenerator.generateRRPairFromRawFiles(FromJavaRawTrafficTestReferentialGenerator.java:206)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at fr.pe.ca.lisa.custom.step.SLDRawTrafficToRRPairsStep.executeNodeLogic(SLDRawTrafficToRRPairsStep.java:38)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.test.CustJavaNode.execute(CustJavaNode.java:185)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.test.TestCase.execute(TestCase.java:1294)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1085)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:72)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:992)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - at java.lang.Thread.run(Thread.java:745)
    2017-08-31 09:09:31,931Z (11:09) [ProcDlgThreadCallbk@b9e7f24] ERROR System.err - Error during handle raw file
    2017-08-31 09:09:31,966Z (11:09) [LISA Environment Shutdown Hook : com.itko.lisa.gui.TestManager$2@741b3bc3] INFO com.itko.lisa.gui.TestAdmin - Detaching workstation ibbo8800@ibbo8800 from Registry tcp://sl00sa-applis-1.sii24.pole-emploi.intra:2010/RegistryQL
    2017-08-31 09:09:31,967Z (11:09) [LISA Environment Shutdown Hook : com.itko.lisa.gui.TestManager$2@741b3bc3] INFO com.itko.lisa.test.Environment - Disconnected test registry
    2017-08-31 09:09:31,988Z (11:09) [LISA Environment Shutdown Hook : com.itko.lisa.gui.TestManager$2@741b3bc3] INFO System.out - DevTest Workstation is closing down...
    2017-08-31 09:09:31,995Z (11:09) [Thread-13] INFO com.itko.lisa.net.ActiveMQFactory - Closing AMQ connections

     

    Nothing about memory leak. Juste an exception and a shutdown.

    The step create a new cvs file from a raw conversation (xml parsing and text file generating).

     

    Best regards,

     

    Benoit



  • 4.  Re: TestRunException close workstation

    Posted Sep 01, 2017 05:16 AM

    Wiliiam,

     

    My mistake, there is a awful "System.exit(1);" in the code.

    So I have to try TestRunException without "System.exit"... Thanks for your help.

     

    Best regards,

     

    Benoit