I have a line of code where it will create an ExcelSheet with datetime added into the name in order to differentiate the files from each other. For example: “QATestResults_202309151125.xlsx”
I’m planning to have multiple test suites, each one testing a certain feature of a mobile app, and run them all sequentially in a test suite collection. All of those test suites will be creating their own worksheet but they will all share the same ExcelSheet (the aforementioned one).
My issue is that I think inputting the current datetime into the execution profile is inefficient and that I can probably make it more automatic by writing a line of code in a test case where it will save the current datetime+fileName into the execution profile like so:
Date todaysDate = new Date();
def formattedDate = todaysDate.format("ddMMMyyyyhhmmss");
//create excel file, then store into VariableCollections for later use (due to "formattedDate" naming format)
String excelFile = "D:\\work\\Katalon projects\\QA test results\\Booking Class Verification (" + formattedDate + ").xlsx"
//pseudocode for saving "excelFile" into Execution profile
//addIntoExcecutionProfile.add(ProfileVariableName, excelFile) or something like that
Is this at all possible or am I better off just inputting the Excel Sheet name into the Execution Profile manually?