This is a migrated thread and some comments may be shown as answers.

Date and time verification

3 Answers 167 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stan
Top achievements
Rank 1
Stan asked on 30 Mar 2017, 04:07 PM

Hello,

The product looks fantastic, thanks for your work so far :)

I will have a need to verify dates. Unfortunately, these will be dates that result from testing, so I won't be able to compare against a fixed value. In addition, there will be slop in the date and time due to processing time.

For example, if the test is run on 2017-03-28 12:00:00pm (not the actual format of the date text), the application may calculate a date and time relative to the current date and time, say add ten days, and come up with something like 2017-04-07 12:00:03pm. If the test is run on 2017-02-28 12:00:00pm it might come up with something like 2017-03-10 12:00:02pm. Note that the date/time _interval_ is the same, but the day numbers are differ due to the calendar, and the seconds differ due to processing time.

So, we need to verify date ranges that respect the calendar, and also allow for the dates to vary by a certain amount, yet still be considered correct.

Is there anything besides regex matching that might be available to help with this?

If not, it would be nice if we could plug in some custom verification code. Is this possible?

Thanks!

 

3 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 04 Apr 2017, 12:23 PM
Hi Stan,

Thank you for your feedback and warm words! I am glad to hear you are satisfied with Test Studio and would like to note that our customers' opinion is always appreciated and welcome! 

Let me get back on the topic.If I understand you right you are talking about Test Studio for APIs. All you have listed is correct and there is not much currently to add on our end. In general the described scenario could be accomplished with a coded solution which is unfortunately still not available. 

The good news is that including the coded steps functionality in Test Studio for APIs is now in progress and will be introduced in an upcoming release in the near future. I hope you will stick around to find out what further possibilities will be published with our future product versions! 

Thanks for your understanding! 

Regards,
Elena Tsvetkova
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stan
Top achievements
Rank 1
answered on 04 Apr 2017, 01:09 PM

Hi Elena,

Thank you for the response.

I'm happy to hear that you are adding coded steps - that will provide a great deal of flexibility.

For others who are looking here for a similar solution, we decided that we could work around this issue by writing a small web service to handle the date matching. In Test Studio, we could place the date to check in a variable, and use that variable to construct a request to our service to verify the date. The verification step in Test Studio would check the response from the service.

More generally, such a web service could provide any kind of coded verification that you might want. The downsides are having to write the service, setting it up where it can be used, and also you've just created another piece of software to test :).

Thanks again,

Stan

 

0
Elena
Telerik team
answered on 06 Apr 2017, 03:18 PM
Hi Stan,

Thank you for sharing your experience and knowledge! I hope this could be useful for someone else as well. 

Thanks once again! 

Regards,
Elena Tsvetkova
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Stan
Top achievements
Rank 1
Answers by
Elena
Telerik team
Stan
Top achievements
Rank 1
Share this question
or