ray_mosley
13 years agoFrequent Contributor
Programatically Changing location of TestComplete execution logs
When TestComplete is running, you can double click on your project suite name, and a workspace tab with the project suite name appears. The Properties tab at the bottom of the page allows you to manually specify the TestComplete Log file location for this project suite.
How can I do the same thing programatically? That is, I want to generate a function to set my log file location. Pseudo-code for this function would be:
//Function: QASetLogLocation
//Description:
// programmatically establish location of TestComplete execution logs
//Parameters:
// rr (boolean)
// 0 = debug or temporary automated test log (use temporary location)
// 1 = "run for the record" automated test log (use archive location)
//Returns:
// NA
//Preconditions:
//Postconditions:
function QASetLogLocation(rr)
{
if (rr == 0)
{
// set the log file to a local temporary location C:\temp
}
else
{
if (rr > 1)
{
// set the log file to a permanent network archive location
}
else
{
//parameter error
Log.Message("Test Development Error passing parameter rr to function QASetLogLocation");
Log.Message("--expected 0 or 1; received \"" + rr + "\"");
// I would like to terminate TestComplete test execution here
}
}
return;
}
How can I do the same thing programatically? That is, I want to generate a function to set my log file location. Pseudo-code for this function would be:
//Function: QASetLogLocation
//Description:
// programmatically establish location of TestComplete execution logs
//Parameters:
// rr (boolean)
// 0 = debug or temporary automated test log (use temporary location)
// 1 = "run for the record" automated test log (use archive location)
//Returns:
// NA
//Preconditions:
//Postconditions:
function QASetLogLocation(rr)
{
if (rr == 0)
{
// set the log file to a local temporary location C:\temp
}
else
{
if (rr > 1)
{
// set the log file to a permanent network archive location
}
else
{
//parameter error
Log.Message("Test Development Error passing parameter rr to function QASetLogLocation");
Log.Message("--expected 0 or 1; received \"" + rr + "\"");
// I would like to terminate TestComplete test execution here
}
}
return;
}