Forum Discussion
lnd_amaral
11 years agoContributor
If you are working with TestItens in your project, you can use this:
//In this case, every error event will generate a log file with the name of the current test case
function main(){
Log.Error("Error");
}
function GeneralEvents_OnLogError(Sender, LogParams){
var LogErrorFile = aqFile.OpenTextFile("C:/logfileerror.txt", aqFile.faWrite, aqFile.ctANSI, true);
LogErrorFile.WriteLine("TestCase name: " + Project.TestItems.Current.Name);
}