Skip to content

Commit

Permalink
Moved the documentation for Randoop coverage into the test directory,…
Browse files Browse the repository at this point in the history
… which contains the corresponding scripts.
  • Loading branch information
rjust committed Feb 3, 2018
1 parent e9f1961 commit b11efc3
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 80 deletions.
79 changes: 0 additions & 79 deletions README_COVERAGE.md

This file was deleted.

53 changes: 53 additions & 0 deletions framework/test/README.md
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,53 @@
Test and analysis scripts
----------------

* `test.include`: Constants and helper functions for test scripts.

* `test_tutorial.sh`: Runs the tutorial described in the top-level
[README](https://github.com/rjust/defects4j#using-defects4j).

Randoop coverage on the Defects4J defects
----------------
This section describes how to calculate Randoop code coverage over the Defects4J
defects (see the top-level
[README](https://github.com/rjust/defects4j/blob/master/README.md) for
more details about the defects and requirements).

### Getting started
1. Follow the instructions for setting up Defects4J in the top-level
[README](https://github.com/rjust/defects4j/blob/master/README.md#setting-up-defects4j)

2. Verify you have the perl package for DBI access to CSV files installed:
- `perldoc DBD/CSV.pm`

If this produces the man page for DBM::CSV you are ok, if not
you must install the package, e.g., using cpan:
- `cpan DBD::CSV`

### Running the coverage analysis
3. Please note you must use Java 7; Java 8 will cause failures.

4. Tell the tools which version of Randoop you wish to test:
By default, the system runs version 3.1.5 of Randoop.
(Located at "path2defects4j"/framework/lib/test_generation/generation/randooop-current.jar)
The randoop.jar you wish to test must be named randoop-current.jar.
- `export TESTGEN_LIB_DIR="path2directory-containing-randoop-current.jar"`

5. Run the test generation and coverage analysis:
- `./randoop_coverage.sh`

Currently, this does not generate tests for all the defects, just five in
each projects for a total of 30 tests. It takes about 90 minutes to run.
If you wish to override these defaults for `randoop_coverage.sh` you may
supply an optional project list argument followed by an optional bid list
argument.
The test scripts set `TMP_DIR` to */tmp/test_d4j*. If you wish to change
this, you will need to modify `./test.include`.

6. Display the coverage data:
The raw coverage data will be found at *$TMP_DIR/test_d4j/coverage*.
You may display the coverage results by running the perl script:
- `../util/show_coverage.pl`

This script will accept an optional argument of an alternative file location.
Invoke the script with -help for a full list of options.
2 changes: 1 addition & 1 deletion license.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
# #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (c) 2014-2015 René Just, Darioush Jalali, and Defects4J contributors. # Copyright (c) 2014-2018 René Just, Darioush Jalali, and Defects4J contributors.
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal # of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit b11efc3

Please sign in to comment.