Service Virtualization

  • 1.  Can anyone explain completely about subprocess with any example.

    Posted Sep 11, 2017 11:24 PM

    Hi Team,

     

    I am using subprocess to compare the two different excel files. I just want in-depth knowledge on it. Currently my step is doing comparison the first record of first excel file with first record of second excel file and also with all the balance records in second excel file. I am in need of "First record of first excel with first record of second excel", then "Second record of first excel with second record of second excel".... "nth record of first excel with nth record of second excel". Please guide me where i am wrong. Thanks much..

     

    Main Step :

     

    Step1 : I am using "OutputLogMessage" and connect with DataSet "Read Rows from ExcelFile1" to read records from Excel File. Then, i used filter to store property values.

    Step2 : I am connecting step 1 with Subprocess Step. From Sub-process, i looped back to the data set. it should iterate from the Excel Sheet till the end of the records. Once reached the last record, it should come out of the loop.

     

    Subprocess Step :

     

    Step 1 : I am using "OutputLogMessage" and connect with DataSet "Read Rows from ExcelFile2" to read records from Excel File. Then, i used filter to store property values. Created assertion for validating the rowcount.

    Step 2 : I am using "OutputLogMessage" and i used assertion for validating the property values which i stored in Step1 of MainStep and Step1 of Subprocess Step.It should iterate as per the row matches from Main and Subprocess step. 

     

    It is doing iteration correctly and picking the values also correctly. But, i want to neglect the comparison of all the records from Second excel with single record of First excel in each iteration.

     

    Thanks,

    Preethi R

     

     



  • 2.  Re: Can anyone explain completely about subprocess with any example.

    Broadcom Employee
    Posted Sep 12, 2017 10:57 AM

    Hi Preethi,

    Let's start up one more level please.  What program are you using?  DevTest or TDM or ARD? 

    Thanks!
    Les



  • 3.  Re: Can anyone explain completely about subprocess with any example.

    Posted Sep 12, 2017 11:31 PM

    Hi Dover,

     

    Its DevTest 9.5.1.



  • 4.  Re: Can anyone explain completely about subprocess with any example.
    Best Answer

    Posted Sep 13, 2017 06:29 PM

    Hello Preethi,

     

    Have you had the chance to take a look at the DevTest Documentation:

    Create a Subprocess Test Case - DevTest Solutions - 10.1 - CA Technologies Documentation 

    Subprocess Example - DevTest Solutions - 10.1 - CA Technologies Documentation 

    Execute Subprocess - DevTest Solutions - 10.1 - CA Technologies Documentation 

     

    There is also this document with an example using a subprocess inside a VSM for a specific case:

    How to reset a dataset for each transaction 

     

    Hope it helps.

    Heloisa



  • 5.  Re: Can anyone explain completely about subprocess with any example.

    Posted Sep 18, 2017 11:36 PM

    Thanks Heloisa, I have gone through those docs while searching steps / procedure for sub-process.

     

    One of my friend helped me in providing the steps. I will explain it here too for good understanding.

     

    Step 1 : Create a Output Log Message utility step and read the data from excel sheet. 

    Step 2 : Never provide it as "Local / Random". As, we are going to Assert the rowCount. If rowCount matches with main step and subprocess step then comparison will start.

     

    2 Excel sheet have following headers "Desc", "Product_ID"

     

     

    Step 3 : Create a TestCase under Subprocess Section. Create 2 Output Log Message utility step. 1 for Read Data from 2 excel (Keep it as local), and other for Comparison using "Ensure properties are equal" Assertion

     

    Step 4 : Mark the checkbox as enable "Thisis a subprocess". You can able to see two paramters (Subprocess Input and Subprocess Output).

     

     

    Step 5 : Enter the Excel Sheet headers in "Subprocess Input parameters" as mentioned below You can add / modify / delete . "Prospective Input Parameters" will get autopopulate. U cannot add / modify /delete. "Subprocess Output properties" will get autopopulate from the main step "properties", which we are enabling

     

    Step 6 : Navigate to "main TestCase" and click on "Subprocess Step". Right side, you will identify the "Result properties". Enable the properties Desc, Product_ID. This will get displayed in "Subprocess Output Properties" of "Subprocess TestCase".

     

    Step 7 : Create Filters for storing the property from  2 Excel sheet. (Store property from one key to another) 

    For Sheet 1 : Desc_1, Product_ID_1;

    For Sheet 2 : Desc_2, Product_ID_2;

     

    Create a "Ensure properties are equal "Assertion in Subprocess TestCase for validiting the "RowCount" in "OutputLogMessage" Step.

    Create 2 more assertions to validate Desc_1, Desc_2 are equal and Product_ID_1, Product_ID_2 are equal.

     

     

     

     

    Step 8 : Now, Execute the "main TestCase". For the first iteration, it will take the first excel sheet and read 1st row and navigate to subprocess step, it will pickup the second excel sheet and read 1st row. 

    a) It will validate "rowCount" are equal. If yes

    b) It will validate the property for the first row (Desc_1, Desc_2 and product_ID_1, product_ID_2)

    If no, it will fail and end the test.

     

    For the second iteration, it will take the first excel sheet and read 2nd row and navigate to subprocess step, it will pickup the second excel sheet and read 2nd row. 

    a) It will validate "rowCount" are equal. If yes

    b) It will validate the property for the second row (Desc_1, Desc_2 and product_ID_1, product_ID_2)

    If no, it will fail and end the test.

     

    goes on till end.