随机时间限制

Randoop Time Limit

Randoop --time-limit 是否花时间为每个 class 或整个项目生成测试?例如,如果我为超过 100 个 class 的项目设置 --time-limit = 180,Randoop 将为所有 class 花费 180 秒,或者对于每个 class花费 180 秒生成测试。

the Randoop manual,是整个项目的时间:

--time-limit=int. Maximum number of seconds to spend generating tests. Zero means no limit. If nonzero, Randoop is nondeterministic: it may generate different test suites on different runs.

The default value is appropriate for generating tests for a single class in the context of a larger program, but is too small to be effective for generating tests for an entire program.

如果您正在测试多个 类,您可能需要将默认时间限制乘以被测试的 类 个数。