Not necessarily - metrics data is generated whenever an event (HTTP request, WS connection, etc.) happens. Even if not a single iteration fully finishes, you’d still likely have some data, though maybe not all of the data you’d want.
Yes, if you don’t use the new k6 v0.27.0 features of multiple scenarios or the new executors in your test run, you can use the script duration shortcut option, via the
--duration CLI flag,
K6_DURATION environment variable, or
duration JS/JSON option. If you use
scenarios, you can specify the
duration option (
maxDuration for the iteration-based executors) in your particular scenario. More details at: https://k6.io/docs/using-k6/scenarios