Search code examples
automated-testsrandoop

Randoop Time Limit


Is Randoop --time-limit for spending that time for generating tests for each class or for the entire project? For example if I set --time-limit = 180 for a project for over 100 class, Randoop will spend 180 seconds for all of the classes, or for each class it will spend 180 seconds to generate tests.


Solution

  • Per the Randoop manual, it is the time for the entire project:

    --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.

    If you are testing multiple classes, you might want to multiply the default time limit by the number of classes being tested.