context.attempt


套件的尝试次数。此值从零开始,因此第一次尝试是 0,第二次尝试是 1,依此类推。此属性在与 --test-rerun-failures 选项结合使用时,可用于确定当前运行的尝试次数。

🌐 The attempt number of the suite. 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 the attempt number of the current run.