Service Virtualization

  • 1.  Reading specific row from excel

    Posted Feb 13, 2018 06:42 AM

    Hi,

    I have a excel sheet with test data, where each row defines test data for for a single test case. The problem is when I run any test case i have to loop the data to reach the required row before executing test steps.

     

    Is there a way through which i can define which row to read from the sheet for a particular test case.

    I am using Devtest 10.2

     

    Thanks,

    Anurag Srivastava



  • 2.  Re: Reading specific row from excel
    Best Answer

    Broadcom Employee
    Posted Feb 13, 2018 07:50 AM

    Historically (perhaps 8 years ago), I was using JDBC-ODBC drivers, and accessing Excel as a JDBC data source to query for data in specific rows. I don't believe that mechanism is supported in recent versions of Java, and that bridge was never really fast enough or stable enough (or cross-platform) for operationalising.

     

    There are a few options open to you:

    There are various JDBC drivers for Excel available for download (some free, some paid) that you could try, accessing your data as a JDBC datasource.

    You could implement your own scripted dataset to do exactly what you want, if you're able to script and you understand the Apache POI API.

    You could use CA TDM to read excel as a datasource, properly operationalising it and providing test data on demand using its advanced data management functionality.

     

    Warnings:

    Excel isn't very fast at this, and it's not great at multi-user access, so it's far from ideal.

    You need to be concerned about making sure your test data is read from a place that will always be available, regardless of whether you're running a test in ITR, from quick-stage, from a full-stage or from CVS.

    If you're using the data in a virtual service, you also need to make sure it's accessible from VSE.

    All of these data location, performance & provisioning problems are solved by real test data management solutions. Excel just isn't designed to give performant, network-based random access to test data.