Service Virtualization

  • 1.  Can we have pass unique values to different instances for a test step when performing a load test using a data file or property file

    Posted Oct 10, 2017 05:35 PM

    Hi

      Currently i have few test cases and the scenario that i'm looking for is common across all the tests.

    Scenario: I have devtest selenium integrated test case, where a user logs in to the application and adds a file  example name of the file is "file1". 

    For the scenario above, when i run the test case as a load test, and number of instances 5, there is a possibility that 1st instance will create file1 and 2nd instance will try to create file with same name as file 1, since it is hard coded in the test step.

     

    Is there a way we can use properties to read from a datafile and make 1st instance write file name as file1 and 2nd instance make filename as file 2.

    I want to provided filenames in a file, this is not just specific to just file names, i want to add other data too like project name.

     

    Can you let me know if this can be possible.



  • 2.  Re: Can we have pass unique values to different instances for a test step when performing a load test using a data file or property file
    Best Answer

    Broadcom Employee
    Posted Oct 11, 2017 10:06 AM

    Hi, Try using a Random code Generator Data set or Unique Code Generator Data set have some unique values and append these values to the filename. This way you should have unique filenames.

     

    Please refer the below for more information.

     

    Random Code Generator Data Set - DevTest Solutions - 10.1 - CA Technologies Documentation 

    Unique Code Generator Data Set - DevTest Solutions - 10.1 - CA Technologies Documentation 

     

    If you need help with the complete working scenario of your test case, please open a support case.

     

    Thanks,

    Prema



  • 3.  Re: Can we have pass unique values to different instances for a test step when performing a load test using a data file or property file

    Posted Oct 12, 2017 09:43 AM

    Generator Data set or Unique Code Generator Data set may not work if you have specific data values.

     

    1. Create your input file with specific data sets in each row.

    2. Use staging doc/instances to control the data usage by each instance.

     

    e.g. if you give instance as 5, it is possible to read 5 different rows at a time, one each per instance. (For more details, check ca docs)

    you can even try it by quick staging and increase the # of instances and check the results

     



  • 4.  Re: Can we have pass unique values to different instances for a test step when performing a load test using a data file or property file

    Posted Oct 12, 2017 10:54 AM

    Hi Abhinav,

          Thanks for the response, can you provide me respective links from CA Docs for this, does the documentation have example on "e.g. if you give instance as 5, it is possible to read 5 different rows at a time, one each per instance. ". If so please do provide that or the closest reference.

     

    Thanks



  • 5.  Re: Can we have pass unique values to different instances for a test step when performing a load test using a data file or property file

    Posted Oct 12, 2017 11:02 AM

    In your data set make sure it is global, then each instance set in the staging doc will consume a thread against the dataset.  In other words, if 5 instances, then 5 simultaneous rows will be read from dataset...etc...etc