Forum Discussion

neerajan's avatar
neerajan
Occasional Contributor
7 years ago

ReadyAPI log date manipulation

Hi,

 

I was wondering if it is possible to manipulate the date logged in 'ReadyAPI log' for a test request run. 

My scenario : - I need to log a past date after running a particular REST request test step, instead of the current system date.

 

I have attached an image of the date that I would like to be altered using a script or whichever means is possible.

 

Thanks,

Neeraja

 

 

  • nmrao's avatar
    nmrao
    7 years ago

    Thank you for the details.

     

    When a request is made for account details, there are two possibilities (of course, if the application works correctly) that either response contains the information about password expiry or may not contain that information.

     

    In order to test this, either it is required to have an account which is created 60 days ago or create an account now with back dated. But it needs to be checked if the application allows users to do so. While testing, it may not be possible to wait for 60 days to test such functionality and there must be an alternative way to achieve the same.

     

    So my suggestion is to check with application provider or with your team if developed internally how this functionality should be tested.

     

    The is another feature which can be implemented by the application that it automatically send notifications to the account holder saying their password is about to expire.

     

    However, I do not see any possibility to do it by changing logs as that is something which should be supported by application side and not from client side.

     

    Hope this is helpful.

  • nmrao's avatar
    nmrao
    Champion Level 3
    1. couldn't see any attachment.
    2. does not seem to be correct approach.
    3. why do you dependent on the log file to test something? I do not see any logic behind it.
    • neerajan's avatar
      neerajan
      Occasional Contributor

      Sorry , clueless about how I missed the attachment. Please find the image below.

       

      And yes it is pointless and not the right approach but just out of sheer curiosity I was wondering if it can be done.

       

      Thanks,

      Neeraja

      • nmrao's avatar
        nmrao
        Champion Level 3
        It is important to understand the use case, then we can see if there is other possible alternatives.