Recall & Review
beginner
What is a timestamp in software testing?
A timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day.
Click to reveal answer
beginner
How can you generate a current timestamp in Postman?
You can generate a current timestamp in Postman using JavaScript code like
var timestamp = Date.now(); which returns milliseconds since January 1, 1970.Click to reveal answer
intermediate
Why use timestamps in API testing?
Timestamps help track when requests are sent or responses received, ensure data freshness, and avoid replay attacks by making each request unique.
Click to reveal answer
intermediate
What is the difference between Unix timestamp and ISO 8601 format?
Unix timestamp is a number representing seconds or milliseconds since 1970-01-01 UTC. ISO 8601 is a readable string format like
2024-06-01T12:00:00Z representing date and time.Click to reveal answer
intermediate
How to use timestamps in Postman pre-request scripts?
In pre-request scripts, you can create a timestamp and save it as an environment variable to use in your request, for example:<br>
pm.environment.set('currentTimestamp', Date.now());Click to reveal answer
Which JavaScript method returns the current timestamp in milliseconds in Postman?
✗ Incorrect
Date.now() returns the current time in milliseconds since January 1, 1970.
Why is it useful to add a timestamp to API requests?
✗ Incorrect
Adding timestamps helps ensure each request is unique and can prevent replay attacks.
Which format is a Unix timestamp?
✗ Incorrect
Unix timestamp is a numeric value counting seconds or milliseconds from 1970-01-01 UTC.
How do you store a timestamp in Postman environment variables?
✗ Incorrect
Use pm.environment.set() to save a value like a timestamp in environment variables.
What does Date.now() return?
✗ Incorrect
Date.now() returns the number of milliseconds elapsed since January 1, 1970 UTC.
Explain how to generate and use a timestamp in Postman pre-request scripts.
Think about JavaScript code and environment variables in Postman.
You got /3 concepts.
Describe why timestamps are important in API testing and give an example.
Consider security and data freshness.
You got /4 concepts.