Forum Discussion

vkvijayakumar's avatar
vkvijayakumar
Occasional Contributor
12 years ago

How to Post 500 XML's together with unique ID changing ?

Hi Smartbear Support,

I want to post a set of 500 XML's one after another. I would like to create 5 XML's which should run for 100 times. Each time, an unique RFC ID in XML should get changed ( ex: xyz, xyz+1,xyz+2 etc.)
Let me know how to make this possible ?

Thanks in advance..
Vijaykumar VK

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3
    Hi,

    Not sure how you are doing.

    Here is possible way assuming that 5 xml to be requested on after other sequencially.

    Create a TestCase as following:

    1. groovy script step with following code(this setting a project level properties, you may change it to test case level if you need)

    testRunner.testCase.testSuite.project.setPropertyValue("UNIQUEID_1", System.currentTimeMillis().toString())
    testRunner.testCase.testSuite.project.setPropertyValue("UNIQUEID_2", System.currentTimeMillis().toString())
    testRunner.testCase.testSuite.project.setPropertyValue("UNIQUEID_3", System.currentTimeMillis().toString())
    testRunner.testCase.testSuite.project.setPropertyValue("UNIQUEID_4", System.currentTimeMillis().toString())
    testRunner.testCase.testSuite.project.setPropertyValue("UNIQUEID_5", System.currentTimeMillis().toString())

    2. Define 5 request steps. In each request, use the above id instead of a constant element value with ${#Project#UNIQUEID_#} , replace # value 1..5 in each request.

    Now you can try running TestCase, and see you are achieving what is required.

    Then define a load test, and run for 100 times.

    Hope this helps.

    Regards,
    Rao.