Skip to content

Commit 3b0209a

Browse files
committed
final update for Semester
1 parent c035eb9 commit 3b0209a

File tree

5 files changed

+32
-8
lines changed

5 files changed

+32
-8
lines changed

CASTS/src/Chooser.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
import javax.swing.JFileChooser;
22
import javax.swing.JFrame;
33

4+
/**
5+
* WORK IN PROGRESS - Handles the GUI element of the CASTS program
6+
* @author Jonathan Coffman
7+
*
8+
*/
49
public class Chooser extends JFrame
510
{
11+
private static final long serialVersionUID = -255844327078232716L;
12+
13+
/**
14+
* Creates the file chooser window
15+
* @author Jonathan Coffman
16+
*
17+
*/
618
public Chooser(String type)
719
{
820
super();

CASTS/src/Emma.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static Emma totalEmma()
4040
*/
4141
void EmmaRunner()
4242
{
43+
@SuppressWarnings("resource")
4344
Scanner scan = new Scanner(System.in);
4445
//Get the path to the jar file from the user
4546
System.out.println("What is the ABSOLUTE path to the .jar file?");

CASTS/src/Evo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ static Evo totalEvo()
3333
*/
3434
void EvoRunner()
3535
{
36+
@SuppressWarnings("resource")
3637
Scanner scan = new Scanner(System.in);
3738

3839
//Download EvoSuite to the casts directory

CASTS/src/MuJava.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ void MuRunner()
4545
boolean loop = true;
4646
while(loop)
4747
{
48+
@SuppressWarnings("resource")
4849
Scanner scan = new Scanner(System.in);
4950
//Get the path to the jar file from the user
5051
System.out.println("What is the ABSOLUTE path to the .jar file?");
@@ -71,7 +72,7 @@ void MuRunner()
7172
*/
7273
private void MuCommand() throws IOException
7374
{
74-
if(System.getProperty("os.name").matches("Mac OS X"))
75+
if(System.getProperty("os.name").matches("Mac OS X") && makeConfig())
7576
macMuCommand(path, jarPath);
7677
else
7778
winMuCommand(path, jarPath);
@@ -102,7 +103,7 @@ private boolean makeConfig()
102103
{
103104
String output = "MuJava_HOME=" + path + "\n Debug_mode=false\n";
104105
try{
105-
Writer w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("mujava.config"), "utf-8"));
106+
Writer w = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path + "mujava.config"), "utf-8"));
106107
w.write(output);
107108
w.close();
108109
return true;
@@ -177,7 +178,7 @@ private void macMuCommand(String muPath, String jarPath) throws IOException
177178
String[] exec = new String[2];
178179
exec[0] = "java mujava.gui.GenMutantsMain"; //Start MuJava GUI for generating mutants.
179180
exec[1] = "java mujava.gui.RunTestMain"; //Start MuJava GUI for running mutant tests options.
180-
Execute.getExecute().exec(exec);
181+
//Execute.getExecute().exec(exec);
181182
}
182183

183184
/**
@@ -190,6 +191,6 @@ private void winMuCommand(String muPath, String jarPath)
190191
String[] exec = new String[2];
191192
exec[0] = "java mujava.gui.GenMutantsMain"; //Start MuJava GUI for generating mutants.
192193
exec[1] = "java mujava.gui.RunTestMain"; //Start MuJava GUI for running mutant tests options.
193-
Execute.getExecute().exec(exec);
194+
//Execute.getExecute().exec(exec);
194195
}
195196
}

CASTS/src/Starter.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,23 @@ public class Starter
88
*/
99
public static void main(String[] args)
1010
{
11-
11+
//Create the working Directory
1212
CASTSDirectory.getCASTSDirectory().createDir();
1313

14-
//Evo.totalEvo().EvoRunner();
15-
//Emma.totalEmma().EmmaRunner();
14+
15+
System.out.println("\n*************************************************************************************\n\n"
16+
+ "Welcome to the Combined Automated Software Testing Suite.\n"
17+
+ "Please follow the prompts as EvoSuite, Emma, and MuJava (pulled from this version for \n"
18+
+ "further development) will combine to execute testing on your code. Be sure to provide\n"
19+
+ "ABSOLUTE paths to the requested items to prevent failures.\n"
20+
+ "\n*************************************************************************************\n");
21+
22+
23+
Evo.totalEvo().EvoRunner();
24+
Emma.totalEmma().EmmaRunner();
1625
MuJava.totalMu().MuRunner();
1726

1827
//TODO this removes the directory, WORK IN PROGRESS
19-
CASTSDirectory.getCASTSDirectory().removeDir();
28+
//CASTSDirectory.getCASTSDirectory().removeDir();
2029
}
2130
}

0 commit comments

Comments
 (0)