Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20990

Rename test logs

$
0
0

Hi there,

our current situation is the following:

We start TestComplete via command line and specify a script in TestCompletes command line parameters to launch. We also added a few custom command line parameters that the script needs.

The script then decides according to those custom command line parameters which tests to start. There are reasons for this procedure so please don't comment on that one.

 

Now, all the logs are named "Script Test Log [Unit\Script]".

Now, we want to have another script that renames them according to the very same custom command line parameters as the current name is not very informative.

 

Getting those command line parameters is no problem but renaming the Log is.

 

We tried to use

var LogsCol = Project.Logs;
var LogCount = LogsCol.LogItemsCount;
var LogItem;
var newName;

if (LogCount>0){
  // Logs found
  LogItem = LogsCol.LogItem(LogCount-1);
  Log.Message("Previous log name: " + LogItem.Name);
  // Rename
  newName = "fancy new informative name";
  Log.Message(newName);
  LogItem.Name = newName;
  Log.Message("Log renamed to: " + LogItem.Name);
} else {
  // No logs
  Log.Message("Cannot rename logs: No logs found");
}

but LogItem.Name is read-only. Is there any other easy way to do this?

Greetings,

vat


Viewing all articles
Browse latest Browse all 20990

Trending Articles