Submit and vote on feature ideas.

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 do I pass current date in my XML Request

Options
ndonde
ndonde Posts: 3

XML request has - date from and date to tags, how do I pass current date for both tags using extension tool, or is there any other way to achieve this. I am using Parasoft 9.9

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    Options

    If you can upgrade to 9.10 then I'd recommend using the Data Generator tool. For 9.9 there is an older extension called the Date Math tool which is available on the Parasoft Marketplace .

  • ndonde
    ndonde Posts: 3
    Options

    Thanks for this info, is there any other way where we can script to read the current date from datasource

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    Options

    I prefer solutions that don't involve scripting. However, if you prefer to write a script then simply write code in your script to return the current date. For example, if you use Groovy then you can write code like what you see here.

  • ndonde
    ndonde Posts: 3
    Options

    I added the plug in for date math tool as adivsed, but unable to get any input/output from it. Is there any documentation on how to use this plug in?

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    edited August 2019
    Options

    Is there any documentation on how to use this plug in?

    The file you download from the Parasoft Marketplace is named com.parasoft.soavirt.tool.datemath-1.0.0-dist.zip. Do you see the DateMathTool.pdf file included in that zip file?