Direct way to capture start and end time

Is there way\metrics to capture the start and end time of a particular test run?

Depending on what you mean by “start” time, here are some things you can do:

For the end time, it’s a similar situation, though a bit more limited. You can get the current time in teardown() or handleSummary() and use this inside of k6, or get the time in a shell script after k6 finishes running the whole test.

1 Like