Auto generate current date/time into an XML request

LegacyForumLegacyForum Posts: 1,669 ✭✭
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

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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

Sign In or Register to comment.