Service Virtualization

  • 1.  How to get the row index of a data currenctly executing from Excel datasheet

    Posted May 10, 2017 02:53 AM

    Hi All,

     

    I need to find the Excel row number of a data which is being currently processed from the data sheet.

     

    Can you please help

     

    Thanks in Advance.

     

    Thanks

    Ram

    +91 9944997639



  • 2.  Re: How to get the row index of a data currenctly executing from Excel datasheet
    Best Answer

    Posted May 10, 2017 08:57 AM

    You can use java script step and write code to iterate/loop through data sheet column property (automatically become devtest property ) 

    you will be using testexec class from SDK (testExec.setStateValue, testExec.getStateValue )to achieve this.

     

    Thanks,

    Rajesh k Singh 



  • 3.  Re: How to get the row index of a data currenctly executing from Excel datasheet

    Posted May 10, 2017 09:03 AM

    Thanks Rajesh...

    I am not much aware of testExec class, can you please provide some more details about the class, methods and Objects in it.

     

    That will help me to understand which is for what and will help to write the script accordingly.

     

    Thanks

    Ram



  • 4.  Re: How to get the row index of a data currenctly executing from Excel datasheet

    Posted May 10, 2017 09:20 AM

    Refer SDK document for more details.

    The Test Exec Class - DevTest Solutions - 10.1 - CA Technologies Documentation  

     

    try below in script step by changing Groovy . it will list out all methods/events details for this class. 

    _logger.info("testExec: " + testExec.getClass() + ":" + testExec.metaClass.methods*.name.sort().unique())

     

    Thanks,

    Rajesh k Singh 



  • 5.  Re: How to get the row index of a data currenctly executing from Excel datasheet

    Posted May 12, 2017 01:07 PM

    Hi,

     

    You can use {{datasetname_RowNum}}, this will give you the current row number which is under process in excel sheet data set.

     

    Thanks.