You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi John, @wakaleo
I am trying to integrate the file backup utility with serenity frame
work and I don't know the steps to customize the framework. I have written the code and invoke that method before executing the story file. It has certain limitations like need to invoke this method in each story. But i would like to integrate with framework so that it can take the backup of previous run results regardless of story. If i want to execute all stories together then this file backup utility is duplicate. So please guide how to implement this utility with framework. Any kind of help is much appreciable! Thanks in advance. filebackup.txt
public void fileCopy() throws IOException {
Date now = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss");
String time = dateFormat.format(now);
//System.out.println(dateFormat.format(now));
String folderName = ("CustomerRegistrationNegative_"+time);
String path = "P:/Execution_Archive/";
File dir = new File(path+folderName);
if (!dir.exists()) {
if (dir.mkdir()) {
System.out.println("Directory is created!");
} else {
System.out.println("Failed to create directory!");
}
File sourceLocation= new File("P:/wordspace_2/Digital/target/site/serenity");
File targetLocation = new File(""+dir);
FileUtils.copyDirectory(sourceLocation, targetLocation);
}
}
}
The text was updated successfully, but these errors were encountered:
Hi John,
@wakaleo
I am trying to integrate the file backup utility with serenity frame
work and I don't know the steps to customize the framework. I have written the code and invoke that method before executing the story file. It has certain limitations like need to invoke this method in each story. But i would like to integrate with framework so that it can take the backup of previous run results regardless of story. If i want to execute all stories together then this file backup utility is duplicate. So please guide how to implement this utility with framework. Any kind of help is much appreciable! Thanks in advance.
filebackup.txt
package com.serenity.digital.steps;
import java.io.File;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.commons.io.FileUtils;
public class fileBackup{
}
}
The text was updated successfully, but these errors were encountered: