Forum Discussion
We found that the videos were not the best solution for describing a failure condition to developers. The files can be quite large and the action goes through very quickly.
For this we are now using StepReporter (psr.exe), a "secret" part of Win10. This can create smaller files than Screen2Gif and the developers can go through the screenshots at their own speed. See:
So to start recording screenshots we just do this:
function StartStepsRecorder()
{
kill_PSR();
var stepFilePath = Project.Path + "..\\..\\SourceUIAutomation\\ExportedLogs\\StepRecorder\\";
aqFileSystem.CreateFolder(stepFilePath);
var stepFileName = stepFilePath + GetTestName() + ".zip";
var commandLine = "psr.exe /start /output " + "\"" + stepFileName + "\"" + " /sc 1 /gui 1 ";
WshShell.Run(commandLine, 1, true);
}
With this line command it will start taking screenshots of every keystroke until it is stopped, then send this to the mht file name you choose. It will keep the last x screenshots as configured. We added it into function GeneralEvents_OnLogError:
This stops the recorder if you want to keep the screenshots file:
function StopStepsRecorder()
{
WshShell.Run("psr.exe /stop");
}
This stops the recorder if you do not want to keep the screenshots file, say if the TC run completed ok: We added this into GeneralEvents_OnStopTest:
function DeleteStepsRecorderFile()
{
kill_PSR();
Delay(5000);
var stepFilePath = Project.Path + "..\\..\\SourceUIAutomation\\ExportedLogs\\StepRecorder\\";
var stepFileName = stepFilePath + GetTestName() + ".zip";
aqFileSystem.DeleteFile(stepFileName)
}
function kill_PSR()
{
Result = WshShell.Run("taskkill /f /t /im psr.exe ", 1, true)
Delay(3000);
Result = WshShell.Run("taskkill /f /t /im psr.exe ", 1, true)
Delay(3000);
}
This looks good, but it will take some good memory to store the results.
We are using HTML reports to capture the failures as well as the test case flow.
You can see that here https://community.smartbear.com/t5/TestComplete-General-Discussions/Automation-Execution-Report-Ready-to-Go/m-p/137035#M25544
- AlexKaras8 years agoChampion Level 3
One more option: https://community.smartbear.com/t5/TestComplete-Functional-Web/When-is-video-recording-being-supported-in-TestComplete/m-p/81528#M17920
Related Content
- 3 years ago
Recent Discussions
- 5 days ago
- 5 days ago