Service Virtualization

 View Only
  • 1.  Index out of bounds:String index out of range

    Posted Jun 04, 2019 09:39 AM
    Hi All,

    From the JDBC step result, I'm extracting few values and saving them as filters.

    Based on the SQL query, sometimes these filters doesn't contain any value and at that time I'm getting the warning message as " Index out of bounds:String index out of range: 4" and "Index out of bounds:String index out of range: 6".

    Please clarify me on, How to resolve this. 
    JDBC Step, Test Events screen


  • 2.  RE: Index out of bounds:String index out of range

    Posted Jun 24, 2019 09:01 AM
    Hi @Srikanth Gajawada@Danny Saro​ ​ @Sankar Natarajan

    Please help me to resolve this issue. ​


  • 3.  RE: Index out of bounds:String index out of range

    Broadcom Employee
    Posted Jun 24, 2019 09:10 AM
    I couldnt understand the ask here. Do you want to suppress the warning and stop it from influencing your test results ?

    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 4.  RE: Index out of bounds:String index out of range

    Posted Jun 24, 2019 09:25 AM
    Hi Sankar,

    I would like to know two things here. 

    1) When will these kind of warnings will trigger ?. (I assume, these warnings are triggered, due to no value is fetched from the SQL Query.)
    2) How to suppress the warning message.


  • 5.  RE: Index out of bounds:String index out of range

    Broadcom Employee
    Posted Jun 24, 2019 09:45 AM
    Hi Surya
                If it is a test case, you could conveniently ignore warning by un-selecting this property 'Include warnings with errors and failures' in your staging document. 

    regards
    Sankar





  • 6.  RE: Index out of bounds:String index out of range
    Best Answer

    Broadcom Employee
    Posted Jun 24, 2019 10:06 AM
    Hi, 
        To avoid these warning messages, add a "check empty resultset" assertion so that if the assertion is true, route the step to next step or any other step according to your logic.
        So that, if sql query returns empty result set, this assertion will take care.

    Thank 
    Srikanth Gajawada