-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven plugin feature #4
Comments
The main change is: EvoSuite is now an external dependency we rely on in the botsing-reproduction module. I do not know how logging works with Maven, but we use Slf4J for logging so any compatible logging implementation should work. Here is an example of usage (I asked Pouria to remove that from the repo, so here is a copy just in case): public class SimpleCrashReproductionTest {
public static int target_frame_level = 3;
public static String user_dir = System.getProperty("user.dir");
public static String test_dir = Paths.get(user_dir,"src","test","java","eu","stamp","botsing").toString();
public static String log_dir = Paths.get(test_dir, "sample.log").toString();
public static String bin_path = Paths.get(test_dir, "sample_dep").toString();
private static String separator = System.getProperty("path.separator");
@Test
public void runtest(){
setLoggingLevel(Level.INFO);
BotSing botsing = new BotSing();
String[] prop = {
"-Dcrash_log="+log_dir,
"-Dtarget_frame="+target_frame_level,
"-projectCP",
getListOfDeps(),
};
botsing.parseCommandLine(prop);
}
public static void setLoggingLevel(ch.qos.logback.classic.Level level) {
ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) org.slf4j.LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
root.setLevel(level);
}
public static String getListOfDeps(){
String dependencies = "";
File depFolder = new File(bin_path);
File[] listOfFilesInSourceFolder = depFolder.listFiles();
for(int i = 0; i < listOfFilesInSourceFolder.length; i++) {
if (listOfFilesInSourceFolder[i].getName().charAt(0) != '.') {
Path depPath = Paths.get(depFolder.getAbsolutePath(), listOfFilesInSourceFolder[i].getName());
dependencies += (depPath.toString() + separator);
}
}
return dependencies;
}
} |
In addition to the information that Xavier provided, there is a config file in Botsing that you can use it to set the optional parameters of the search process. This config file is here. |
Hi @xdevroey @pderakhshanfar , excellent!!! Today we'll start to inspect the code in order to schedule our development activity! |
Hi @xdevroey @pderakhshanfar, |
Hi @xdevroey @pderakhshanfar, |
I will add them as separate feature to be implemented to better track their status. |
Characteristics
Description
Hi @luandrea @danzone !
Similar to dspot and descartes, I have created a maven sub-module dedicated to the botsing plugin. The main to call botsing is available here and the command line parameters are listed here. As you can see, we have drastically simplified the thing ;)
Please do a branch (or fork) and use a pull request for the Maven plugin. I will add a developer guide in the readme of the project. Please take a look at it.
Best,
Xavier
The text was updated successfully, but these errors were encountered: