Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to parameterize current date and system IP address (changed dyanmically) in virtualization

Nihar1991
Nihar1991 Posts: 52

Hi Team,

Can any one help me on how to parameterize the current date and Web IP address which is changed dynamically in soatest virtualization.

Thanks & Regards
Nihar Ranjan Arisal

Comments

  • pradeepkabali
    pradeepkabali Posts: 5

    Hi Nihar,
    I am also looking for an answer for parameterizing the date functionality in SOAtest..

    Regards,
    Pradeep K

  • OmarR
    OmarR Posts: 235 admin
    edited May 2018

    Check out the Data Generator tool. It was introduced in SOAtest 9.10.2. The Data Generator tool can generate dynamic test-data including current date/time and store it in a dataSource for use in other tools during runtime.

    For older versions of the tool, I recommend @Thomas Moore's script provided in
    https://forums.parasoft.com/discussion/comment/8533#Comment_8533

    As for capturing the IP of the machine where the request originated from, the IP information needs to be included as part of the request in order for it to be extracted/parameterized. The only other way that I know how to retrieve it is to enable monitoring for the Virtual Asset and view the request details under the Event Details Perspective.

    Why are you seeking to capture the IP address of the request? What is your use-case? I would appreciate your feedback so that I may pass along the information for a potential feature request.

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Omar,

    Thanks for the response.
    If you check my attached traffic file. in the request section there is
    172.29.181.126 and this ip address changed dynamically as our system configured as DHCP protocol.
    so in that case after virtualization with a particular IP, it won't work.
    i need some way to capture current IP address when ever any request send from system.

    eagerly waiting for your reply :smile:

    Thanks
    Nihar Ranjan Arisal

  • OmarR
    OmarR Posts: 235 admin
    edited June 2018

    Nihar1991,

    ...this ip address changed dynamically as our system configured as DHCP protocol. so in that case after virtualization with a particular IP, it won't work.

    The only case where it may not work is if you are specifically correlating your requests/responses based on the "WebIPAddress" element value where a static value is expected. If this is your case then I recommend that you instead correlate based on "CustomerPoNumber" and/or "VendorPartNumberr" as these values are unique to each request.

    If you would like to simply capture the "WebIPAddress" value from your request, you can use an XML databank to extract and store it in a variable for use in other tools.

  • Nihar1991
    Nihar1991 Posts: 52

    Hi Omar,

    thanks for your response.
    Now it's working fine after removing correlation with WebIPAddress.

    Thanks a lot for your advise. :smile:

    Thanks
    Nihar Ranjan Arisal