Commit f49f2414 authored by Kevin Bi's avatar Kevin Bi
Browse files

"Added more precise information about running tarantula from the command line...

"Added more precise information about running tarantula from the command line as well as the current issues with the command line execution"
parent 551acc0c
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -7,6 +7,9 @@ Test Program: Triangle
----------------------
Triangle.java is a short java program, there is a fault in line 18 of the program.
TestSuite.java is a suite with 33 tests for triangle, running the tests should report 4 failed tests.
There is a tarantula dir within the Triangle program which  contains the same code as the src dir 
but with a different package name. For some reason the Tarantula implmentation was unable to access this code. 
Until this problem is fixed the temporary solution will be to have the seperate tarantula dir in triangle.

GZoltar
-------
@@ -64,22 +67,23 @@ Evaluating bugs using Tarantula

2. Run Tacoco: The run-tacoco script runs tacoco and creates cp.txt files in both the system-under-test dir and the tacoco dir the script requires the absolute paths of the
the dir to be evaluated and the tacoco directory, see the script for more information 
 
	- ./run-tacoco /absoluteolute/path/to/repo/triangle /absolute/path/to/repo/tacoco

3. Run Jacoco.exec Analyzer: The run-jacoco script creates the jacoco.exec file and the .json files in the tacoco dir, the script will have to be run inside the tacoco dir so you can copy it into the tacoco directory, see the script for more information 

	- cp -i run-jacoco ../tacoco
	- cd /tacoco/
	- ./run-jacoco /absolute/path/to/repo/triangle triangle /absolute/path/to/repo/tacoco

4. Run TarantulaMain: TarantulaMain requires two args(see the file for more details), the first is the absolute path to the cov-matrix.json file, the second is the name of the Test class, if the test program belongs to a package make sure to specify the package, ex: Triangle.TestSuite.
	- java TarantulaMain /absolute/path/to/repo/tacoco/triange-compact-cov-matrix.json TestSuite
4. Compile the Tarantula classes.
	- javac -cp /lib/\* tarantula/\*.java

5.. Run TarantulaMain: TarantulaMain requires two args(see the file for more details), the first is the absolute path to the cov-matrix.json file, the second is the name of the Test class, if the test program belongs to a package make sure to specify the package, ex: Triangle.TestSuite. Interestingly however the during testing many errors came up regarding the json parser or main classes not found. In the end the only way to avoid the problems was through the following commands 
	- java -cp .:junit-4.11.jar:json-simple-1.1.1.jar tarantula.TarantulaMain abs/path/to/triangle-mvn-compact-cov-matrix.json triangle.tarantula.TestSuite
		- The above command means that the junit and json jars will have to be copied to the main dir until a better fix is found
	- TarantulaMain can also be run in eclipse simply, copy all the code tarantula dir into a new java project and use the Run Configurations option to allow for command line arguments, another option is to
hard code the files and classes, it is also easier (in my opinion) to set the build path since Runner and covMatrixReader both require imports. The needed jars, (junit and json-simple) are found in thelib repo or eclipse can easily add them. 

5. Clean the tacoco dir: Run clean-tacoco in order to clean the dir so it can be reused, this means tacoco will have to be recompiled
6. Clean the tacoco dir: Run clean-tacoco in order to clean the dir so it can be reused, this means tacoco will have to be recompiled
	- ./clean-tacoco
	- mvn clean package (in tacoco dir)