randoop.main
Class GenTests
Object
CommandHandler
GenInputsAbstract
GenTests
public class GenTests
extends GenInputsAbstract
| Fields inherited from class GenInputsAbstract |
agent, alias_ratio, all, always_use_ints_as_objects, capture_output, check_object_contracts, classlist, clean_checks, clear, comm_port, compare_checks, componentfile_ser, componentfile_txt, coverage_instrumented_classes, debug_checks, dont_output_tests, dontexecute, expfile, fail, forbid_null, init_routine, inputlimit, junit_classname, junit_output_dir, junit_package_name, literals_file, literals_level, log, long_format, maxsize, mem_megabytes, methodlist, noprogressdisplay, null_ratio, observers, offline, omitmethods, output_branches, output_components, output_cov_witnesses, output_covmap, output_nonexec, output_tests, output_tests_serialized, outputlimit, pass, print_diff_obs, progressinterval, public_only, randomseed, remove_subsequences, repeat_heuristic, silently_ignore_bad_class_names, small_tests, string_maxlen, system_props, test_classes, testclass, testsperfile, timelimit, use_object_cache, visitor |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
system_test_run
public static boolean system_test_run
progress
public static SimpleLog progress
GenTests
public GenTests()
handle
public boolean handle(String[] args)
throws RandoopTextuiException
- Specified by:
handle in class CommandHandler
- Throws:
RandoopTextuiException
write_junit_tests
public static List<File> write_junit_tests(String output_dir,
List<ExecutableSequence> seq,
List<String> additionalJUnitClasses)
- Writes the sequences as JUnit files to the specified directory.
additionalJUnitCLasses can be null.
execute_init_routine
public static void execute_init_routine(int phase)
- Execute the init routine (if user specified one)
read_sequences
public static List<ExecutableSequence> read_sequences(String filename)
- Read a list of sequences from a serialized file
write_sequences
public static void write_sequences(List<ExecutableSequence> seqs,
String outfile)
- Write out a serialized file of sequences
generate_clean_checks
public void generate_clean_checks(String outfile)
- Run Randoop again and generate checks for the sequence.
This ensures that the checks match the state that will be
in the final tests (because the global state used to create the
checks will match that of the final tests)
remove_diff_checks
public void remove_diff_checks(String seq_file)
- Runs Randoop again and generates new checks for the list of
sequences stored in seq_file. Any checks that do not match
are presumed to be non-deteministic and are removed. The resulting
sequence is written back into seq_file.
This is run in a new JVM so that the initial global state for the
second run matches the initial global state for the first run.
getContractsFromAnnotations
public static List<ObjectContract> getContractsFromAnnotations(Class<?>... classes)
dump_seqs
public static void dump_seqs(String msg,
List<ExecutableSequence> seqs)