} catch (CoreException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}
// The Input Activity
Activity activity = prepareTestGeneration();
// Boost UnitTest
IFile boostfile = project.getFile("PluginOutput.cpp");
// Ask user for parameters
properties.setProperty(PathSearch.PROPERTY_MAX_PATHLENGTH, "40");
properties.setProperty(PathSearch.PROPERTY_MAX_NO_PATHS, "-1");
properties.setProperty(SatisfiablePathSearch.PROPERTY_SOLVER, "cplex");
properties.setProperty(SatisfiablePathSearch.PROPERTY_UNCHECKED_STEPS,
"2");
if (!isAMPLinstalled()){
MessageDialog.openError(null, "Ampl not installed", "Sorry I was not able to start an AMPL process. Please check wheather you have installed AMPL correctly. Download the free Student version of AMPL from \n"
+ "http://www.ampl.com/DOWNLOADS/index.html \n "
+ "unpack it and add the unpacked folder to the PATH variable of your machine. \n\n"
+ "Background Information: \n"
+ "AMPL and the bundled constraint solvers are used to solve the OCL constraints in the model wich results in test data.");
return null;
}
ActivityTestGenUserDialog dialog = new ActivityTestGenUserDialog(null,
properties);
// dialog.create();
if (dialog.open() == Window.OK) {
properties = dialog.getActivityTestGenProperties();
Job job = new TestGenerationJob("Generating C++ unit tests from "
+ activity.getName(), activity, boostfile, properties);
job.setUser(true);
job.schedule();
}
return null;