Forum Discussion

esoysal's avatar
esoysal
New Contributor
2 years ago
Solved

How to manipulate system date

When I run an API, it automatically gets system date and enters 'created_date' into the related DB table. Is there a way to manipulate it, so it'd look like I did it yesterday?

  • I'm pretty certain that is correct...  because it is a virtual machine, you can't run a NodeLocked license.

3 Replies

  • The obvious way would be to manually update the record using something like SQL Developer.

     

    If you want to do this as a step as part of a ReadyAPI test, either a test step or test startup script or teardown script, you can use Groovy script to create an JDBCobject, log into db and run the SQL.

     

    The easiest way would be an JDBC Test Step within your test.  This looks after creating the JDBC object and logging into your db.  Just configure it and add your query and you're good.

     

  • It is also possible that the data in the table gets cached in memory, then just updating table might not be helpful.

    So, full use case would help to understand the problem.

    If there is no inmemory used in the application, then you should implement what ChrisAdams suggested.