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.

Auto generate current date/time into an XML request

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
I want to generate Date and Time automatically using AUTO option in FORM INPUT XML.
When i use AUTO for the DATE and TIME elements, date and times are generated randomly and it is not consisyent. i.e. for each run, it is generating different Date and Time.

Could anyone let me know how to get the correct date and time.

Thanks,
Raj
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Hi Raj,

    The 'Auto' option generates a random value that conforms to the schema. So if the input parameter is a date, then the 'Auto' option will generate a random date. However, running a test with the 'Auto' option will generate a new value for each iteration. So if you are performing regression tests, it will fail because the value continually changes.

    If I am understanding your question correctly, you would like to use input as a date that is randomly generated that stays the same(static). Currently, the only possible solution is to use a data source(Excel for example), store a random date and use the data source as input. If this is not what you are trying to perform, would you mind giving more clarification? Thanks.

    Best Regards,
    -Dwight
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Thank You for the response.

    I want to generate teh current date and time in the XML using AUTO option.
    As of now i am using manual entry.

    as per your response, AUTO option will not generate fixed date and Time. Then what is the option to generate the current date and Time.

    Thanks in advance,
    Raj

    Hi Raj,

    The 'Auto' option generates a random value that conforms to the schema. So if the input parameter is a date, then the 'Auto' option will generate a random date. However, running a test with the 'Auto' option will generate a new value for each iteration. So if you are performing regression tests, it will fail because the value continually changes.

    If I am understanding your question correctly, you would like to use input as a date that is randomly generated that stays the same(static). Currently, the only possible solution is to use a data source(Excel for example), store a random date and use the data source as input. If this is not what you are trying to perform, would you mind giving more clarification? Thanks.

    Best Regards,
    -Dwight

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Hi Raj,

    SOAtest doesn't have an option to generate a fixed random date, let alone the current date. As stated before, the only option is to use a datasource, store the date and use the date as input to your test. I know that Excel has options to generate random dates as well as the current date(do a quick search and lots of options should popup). Hope this answers your question.

    Best Regards,
    -Dwight
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Thanks Dwight.

    Regards,
    Raj

    Hi Raj,

    SOAtest doesn't have an option to generate a fixed random date, let alone the current date. As stated before, the only option is to use a datasource, store the date and use the date as input to your test. I know that Excel has options to generate random dates as well as the current date(do a quick search and lots of options should popup). Hope this answers your question.

    Best Regards,
    -Dwight

Tagged