Service Virtualization

  • 1.  write to delimited file is not creating while running from centralize registry in linux.

    Posted May 12, 2017 01:18 AM

    I am running my test cases is linux using test runner and everything working fine except write to delimited file is not creating. We are writing all result in the file. We are using centralize registry.



  • 2.  Re: write to delimited file is not creating while running from centralize registry in linux.

    Posted May 12, 2017 02:10 AM

    Insure account you used in Devtest or Test runner has full access (read/write ) to folder /directly where you writing results. you can try without test runner and see if you can read/write in target location. 

     

    Thanks, 

    Rajesh k Singh



  • 3.  Re: write to delimited file is not creating while running from centralize registry in linux.

    Posted May 12, 2017 04:03 AM

    Hi Rajesh,

     

    We have checked all access things. But file is not getting created. Even though we have created file and tried to run. It is giving error like fine not found.

     

    ============================================================================
    | Error writing file: ******/Invoice.csv
    ============================================================================
    | Step:        SUCCESS File
    ----------------------------------------------------------------------------
    | Message:     ******/Invoice.csv (No such file or directory)
    ----------------------------------------------------------------------------
    | Trapped Exception: ******/Invoice.csv (No such file or directory)
    | Trapped Message:   java.io.FileNotFoundException: ******/Invoice.csv (No such file or directory)
    ----------------------------------------------------------------------------
    STACK TRACE
    java.io.FileNotFoundException:******/Invoice.csv (No such file or directory)
            at java.io.FileOutputStream.open0(Native Method)
            at java.io.FileOutputStream.open(FileOutputStream.java:270)
            at java.io.FileOutputStream.
    <init>(FileOutputStream.java:213)
            at java.io.FileOutputStream.
    <init>(FileOutputStream.java:133)
            at com.itko.lisa.utils.WritePropsNode.execute(WritePropsNode.java:246)
            at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
            at com.itko.lisa.test.TestCase.execute(TestCase.java:1283)
            at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
            at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
            at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1127)
            at com.itko.lisa.coordinator.Instance.run(Instance.java:204)



  • 4.  Re: write to delimited file is not creating while running from centralize registry in linux.

    Posted May 15, 2017 05:43 AM

    What sort of path are you using to the file? If it is a relative path, then the location will be relative to LISA_PROJ_ROOT which is a  dynamically created location, and therefore may not contain and sub-directories that you may have on your path.

     

    To be safe, when testing, you might want to either use an absolute path, or have no sub-directories on your path.



  • 5.  Re: write to delimited file is not creating while running from centralize registry in linux.

    Posted May 17, 2017 06:09 AM

    Our test case is running fine but all the places where we are creating file and not getting created in Unix/Linux. We are not getting what is the problem here. But surely not access issue.

    We tried to put log4j in debug but not getting debug log. Let us know to enable log and also what could be possible reason for file not creating.

    Now we are not getting error for file creation also but file not generating. Is there any possibilities that it can be created in Registry Server.



  • 6.  Re: write to delimited file is not creating while running from centralize registry in linux.
    Best Answer

    Broadcom Employee
    Posted May 19, 2017 08:48 AM

    When writing to a delimited file, the Data directory can be used as the location of the CSV file only.  The lads directory stores files temporarily while a test case or suite is running. So if you need to keep a dataset, you must put the data set in a common location outside the project or MAR.

     

    Here is a knowledge document I wrote if you need your output datasets to be visible from the Portal:

     

    How to Make an Output Data Set Visible on the DevTest Portal 



  • 7.  Re: write to delimited file is not creating while running from centralize registry in linux.

    Broadcom Employee
    Posted May 21, 2017 08:37 PM

    Hi Barun,

        Can you please tell us the path which you are using to save data to file. Are you running the test case from ITR or staging the test?. Can you please try by running a sample test "Devtest_config_info.tst" file from Devtest_home/example project and see whether you are getting same error. By executing this sample test case, it will generate a .txt file in <Devtest_Home>/example folder.

        If this test execution fails, please raise a support case and attach required logs for analysis.

     

    Thanks

    Srikanth



  • 8.  Re: write to delimited file is not creating while running from centralize registry in linux.

    Posted Jun 08, 2017 06:02 AM

    Thanks for your help.

     

    This is got resolve by mentioning Coordinator server as Local. As Default, it was taking server coordinator.