Forum Discussion

esoysal's avatar
esoysal
New Contributor
10 months 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?
  • ChrisAdams's avatar
    10 months ago

    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.