简体   繁体   English

获取在 AVA 中运行的并发测试数

[英]Get number of concurrent tests running in AVA

I have test cases that are failing due timestamp differences as a result of a lot of tests running at once.由于同时运行大量测试,我的测试用例由于时间戳差异而失败。 I want to adjust the difference depending on the number of test cases running at point in time.我想根据在某个时间点运行的测试用例的数量来调整差异。

Is there a way to get the number of test cases that AVA is currently running?有没有办法获得 AVA 当前正在运行的测试用例的数量? It doesn't appear that a search has a lot of information on this issue.搜索中似乎没有关于此问题的大量信息。

No AVA does not provide this.没有 AVA 不提供此功能。

Why do you encounter timestamp differences?为什么会遇到时间戳差异? Might your tests be too brittle?你的测试可能太脆弱了吗?

Perhaps it'll help if you use test.serial() ?如果您使用test.serial()也许会有所帮助?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM