Question regarding Time Stamp comparison with SLA

Options
Chinnu
Chinnu Posts: 18 ✭

Scenario : I have this run time data saved using write file in a variable, eg: submission TZ : 2022-06-02T16:31:06.1880147Z
and I have SLA which is also captured during runtime and saving it using write file in a variable.
Now, I have to compare these 2 TZ and say if submission time stamp is > reported SLA then my message is late. Else if its equal then its on time .

Answers

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

    In case this helps, the XML/JSON Assertor tools have a "DateTime Difference Assertion". So, if you can reference the date-time value in a trivial XML or JSON document then you can use an Assertor to perform this check. You can also reference test variables using ${varName} syntax.

  • Chinnu
    Chinnu Posts: 18 ✭
    Options

    Thank you @benken_parasoft . But now i figured out a way to convert those 2 run-time time stamps from UTC to EST through data gen tool and writing it to 2 columns in a writable data source. But the ask here is :
    If i want to compare these 2 time stamps from that writable data source and if the submission TZ is > than reported SLA TZ, then i want to assert that this message is Late