context.attempt
- 类型:<number>
测试的尝试次数。此值是从零开始的,因此第一次尝试是 0,第二次尝试是 1,依此类推。此属性与 --test-rerun-failures 选项结合使用时,可用于确定测试当前正在运行第几次尝试。
🌐 The attempt number of the test. This value is zero-based, so the first attempt is 0,
the second attempt is 1, and so on. This property is useful in conjunction with the
--test-rerun-failures option to determine which attempt the test is currently running.