Timestamps in reports

Timestamps in reports

Home Forums Ask Expert Timestamps in reports

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #32381
    Alan Carr
    Participant

      Hi

      Is there any way of producing a timestamp when showing when a test was actioned, currently I am using a custom report associated with an if statement

      Thanks

      #32382
      Sasha ZAP
      Moderator

        Hello alan.carrr,

        Basically you are already getting timestampד when the test starts its execution and ends it, also you can get as required timestamps using the “StartTransaction” and the “EndTransaction” methods:
        All the mentioned timestamps will appear in the test’s execution report.

        If the above does not help you please advise for what purpose do you need the timestamp.

        Thanks,
        ZAPTEST Team

        #32383
        Alan Carr
        Participant

          My API testing using GUI mode has a series of tests and assertions I wanted to know when each test occurred such that if a test fails I can further analyze to see if anything else may have occurred at that time to make the test fail.

          I added at the start of each test zap utility “Start Transaction” that added the text to the report however No timestamp appeared at that step. I guess somehow I need to add variable for time however I’m not sure how to do this.

          What resolution is available for the timestamps “Start Transaction”

          #32384
          Alan Carr
          Participant

            Screenshot

            #32385
            Sergey ZAP
            Keymaster

              Hello Allan,

              Each “Start Transaction” must have corresponding “End Transaction” step. This reports number of seconds between ‘Start” and “End” steps.
              For getting current time value, please consider using “Zap.Common.GetFormattedDateValue” step.

              #32386
              Alan Carr
              Participant

                Thanks for the reply, how can I get “Zap.Common.GetFormattedDateValue” the time of my step into my report ?

                #32387
                Sergey ZAP
                Keymaster

                  In the Step view you need two steps
                  – assign current time value to a variable
                  – include the variable in the CustomReport step

                  In the Script view the steps are:
                  cTime = Zap.Common.GetFormattedDateValue(“”, “hh:mm:ss”)
                  Application(“Application”).CustomReport True, “Timestamp”, cTime
                  timestamp.png

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.

                Virtual Expert

                ZAPTEST

                ZAPTEST Logo