Service Virtualization

 View Only
  • 1.  Counting Dataset Error in Subprocess

    Posted Sep 17, 2015 07:02 PM

    Has anyone seen or had trouble executing a Test Case that calls a subprocess which has a counting dataset from the Invoke API? 

     

    Executing this scenario using DevTest 8.0.1.

     

    I have a Test Case (TC-A).

    TC-A invokes a subprocess and passes parameters (serial number & reference id).

    Subprocess A (Sub-A) takes these values and, based on a database select query, creates a LISA property {{prop_rowcnt}}.  prop_rowcnt = the number of rows in the resultset returned by the database query.

    Sub-A then has to loop.  Sub-A uses a Counting Dataset (declared as LOCAL) that counts from 1 by 1 until the dataset is greater than {{prop_rowcnt}}.

     

    I create a MARI on TC-A with Run1User1Cycle as the Staging Document.

    Then, I create a MAR on TC-A from the MARI.  The subprocess was packaged in the MAR.

     

    1) If I run S-A in ITR (raw Test Case) using the default values, S-A executes correctly.

     

    2) If I open TC-A (raw Test Case) and run it in ITR mode using the default values for the parameters, TC-A and subprocess S-A execute correctly.

     

    3) If I open TC-B and asynchronously fire test case TC-A's MAR using the RESTful Invoke 2 0 interface, the

    http://localhost:1505/lisa-invoke/runMar?marOrMariPath={{LISA_RELATIVE_PROJ_ROOT}}%2FTests%2FDRS_Repair.mar&async=true

    The test executes in the Coordinator,

    But, the test case dies a very painful death as soon as it enters Sub-A.

     

    4) It also dies if TC-B asynchronously fires the Test Case, Staging doc, and Config using Invoke 2 0;

    hhttp://localhost:1505/lisa-invoke/runTest?testCasePath={{LISA_RELATIVE_PROJ_ROOT}}%2FTests%2FDRS_Repair.tst&stagingDocPa…

     

    5) If I perform Step 3) from a VSM, the test case also dies.  Ultimately, I need to launch the Test case asynchronously from a VSM because of customer requirements.

     

     

    The abbreviated exception I see in the Reporting Console looks like this (full exception from Reporting Console attached):

     

    sub_iRepairs_Async_Flow :

    ============================================================================

    | Error executing sub process: C:/Users/nesjo02/lisatmp_8.0.1/lads/329C08B85D8811E5B512B6F620524153/VSM_TestCase_Launch/Tests/Subprocesses/sub_iRepairs_Async_Flow.tst

    ============================================================================

    | Step:        sub_iRepairs_Async_Flow

    ----------------------------------------------------------------------------

    | Message:    Error doing random data sets

    ----------------------------------------------------------------------------

    | Trapped Exception: Error doing random data sets

    | Trapped Message:

    ===========================================================================

    | Message:    Error reading dataset [CntDS] definition

    | Exception:

    ============================================================================

    | Message:    Increment can not be positive for a decreasing counter. 

    (This is strange because the DS is set to count from 1 by 1 until it reaches the the value of {{prop_rowcnt}} which in ITR mode contains a valid, positive numeric value.)

    ----------------------------------------------------------------------------

    ============================================================================

    :

    :

    STACK TRACE

    ============================================================================

    | Exception:

    ============================================================================

    | Step:        CntDS

    ----------------------------------------------------------------------------

    | Message:    Error reading dataset [CntDS] definition Please make sure any dependent file(s) are available at the path specified in the test case on the host named NESJO02W7.

      at com.itko.lisa.test.CounterDataSet.checkValid(CounterDataSet.java:276)

      at com.itko.lisa.test.CounterDataSet.initialize(CounterDataSet.java:218)

    Attachment(s)



  • 2.  Re: Counting Dataset Error in Subprocess
    Best Answer

    Posted Sep 18, 2015 10:14 AM

    Update:

    Although I never figured out exactly what caused the error, I re-engineered the sub-process and it seems to be working.  So, maybe this was just an EBKAY (error between keyboard and user) situation.