cancel
Showing results for 
Search instead for 
Did you mean: 

Video Recording of Test Execution is Easy

Staff

Video Recording of Test Execution is Easy

Hi folks!

My name is Alexander Gubarev, and I'm one of the QA engineers who are responsible for the TestComplete quality. Today, I want to share the VideoRecorder extension for TestComplete with you, which I hope will be helpful in your job.

This extension enables you to record videos for your automated tests running in SmartBear TestComplete or TestExecute. It records a video for your test runs helping you to check the test execution and to understand what happened in your system and in the tested application during the test run. All of us know, sometimes, it is really difficult to find the cause of issues that occur during nightly test runs. Videos can help you with this.

The extension adds the VideoRecorder script object for starting and stopping video recording from your script tests, and the Start and Stop Video Recording keyword-test operations for doing this from keyword tests.

Start using the VideoRecorder extension is easy - you simply need to install the extension on your computer and add call of it from TestComplete.

INSTALL VIDEORECORDER
1. Download the VLC installer from https://www.videolan.org/.
2. Install the VLC media player on your computer. The installation is straight-forward. Just follow the instructions of the installation wizard.
3. Download VideoRecorder.tcx (it's attached to this article).
4. Close TestComplete or TestExecute.
5. Double-click on the extension and install it in TestComplete or TestExecute.

USE VIDEORECORDER
1. In Keyword Tests
Add the Start Video Recording and Stop Video Recording operations at the beginning and at the end of your test. You can find these operations in the Logging operation category.
 
record-video-in-keyword-test

 

2. In Scripts
Use the VideoRecorder.Start() method to start recording and VideoRecorder.Stop() to stop it. Code example:
//JScript
function foo() {
   // Start recording with High quality
   VideoRecorder.Start("High");

   //Do some test actions
   //….

   //Stop recording 
   VideoRecorder.Stop();
}

Find the recorded video in your project folder – the link to it is located in the Test Log panel.

FULL DOCUMENTATION
https://github.com/SmartBear/testcomplete-videorecorder-extension/blob/master/README.md

WANT TO IMPROVE THE VIDEORECORDER?
We put this script extension on GitHub, so you can take part in its development. Feel free to make pull requests which can make this extension better:
https://github.com/SmartBear/testcomplete-videorecorder-extension

LATEST VIDEORECORDER VERSION
Also, to make sure you have the latest version of the script extension, you can download VideoRecorder.tcx from the GitHub repository:
https://github.com/SmartBear/testcomplete-videorecorder-extension/releases/latest
 
Alexander Gubarev
TestComplete QA Engineer
26 REPLIES
Community Hero

Re: Video Recording of Test Execution is Easy

Hi Alexander,

 

Thank you a lot for the great post with the ready-to-use solution. Much appreciated!

 

For others who may be interested, there were several other threads over here dedicated to video recording:

https://community.smartbear.com/t5/TestComplete-Functional-Web/When-is-video-recording-being-support...
https://community.smartbear.com/t5/TestComplete-General-Discussions/Try-this-How-to-video-your-tests...
https://community.smartbear.com/t5/TestComplete-General-Discussions/Automation-Execution-Report-Read...
https://community.smartbear.com/t5/TestComplete-General-Discussions/Automation-Execution-Report/m-p/...

 

I did not look into extension's code yet, but the first link mentions Microsoft Expression Encoder that hopefully might be considered as an alternative option to be used within this script extension.

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Super Contributor

Re: Video Recording of Test Execution is Easy

Great! Sounds very promising, @AGubarev.

 

As @AlexKaras already mentioned I have posted a feature request for this some time ago... good to read that it's implemented now..

Community Hero

Re: Video Recording of Test Execution is Easy

Just as a side note:  

 

This was implemented as a ScriptExtension... which means, technically, it is not something that needed to be implemented by the SmartBear staff.  Anyone of us could have done it given the time and resource. :-) Again... this is what TestComplete brings to the table... it's open architecture with regards to plugins and extensions means that if you wish the tool to be able to perform some task, there is usually a way to do so without changing the core code of the tool. Smiley Happy


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.


I’ll be talking about “Hidden Treasures – TestComplete Script Extensions” at #SBConnect in October! Who’s joining me? Click here for tickets
Extensions available
Super Contributor

Re: Video Recording of Test Execution is Easy

I have installed Videolan Player, and the extension.

 

When the test is run, there is made a file with the extension .mp4, but it's only 1kb and it doesn't play Smiley Sad

 

Attached is the project file (in rar format). 

 

Anyone who can help me with this? Why it's not working...

Super Contributor

Re: Video Recording of Test Execution is Easy

extra info: Tested it with TestComplete 12.4 and VLC Player 2.2.8 32bit (64bit is not supported?)

Community Hero

Re: Video Recording of Test Execution is Easy

If the VCL player is 32-bit, then you need to make sure that you run the 32-bit version of TC 12.4.  It is installed, by default, in C:\Program Files (x86)\SmartBear\TestComplete 12\Bin.  Try running that version of TestComplete with the video recorder and see if it works better.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.


I’ll be talking about “Hidden Treasures – TestComplete Script Extensions” at #SBConnect in October! Who’s joining me? Click here for tickets
Extensions available
Super Contributor

Re: Video Recording of Test Execution is Easy


tristaanogre wrote:

If the VCL player is 32-bit, then you need to make sure that you run the 32-bit version of TC 12.4.  It is installed, by default, in C:\Program Files (x86)\SmartBear\TestComplete 12\Bin.  Try running that version of TestComplete with the video recorder and see if it works better.


@tristaanogre Tried the scenario you suggested. Ran TC in 32bit mode, with 32bit version of VCL. Got exactly the same result (video file of 1kb which can't be played).

 

@tristaanogre@AGubarev@AlexKaras can you play the attached TestComplete project on your machine(s) and see if it works on your machine? The project is opening a webbrowser, navigating to google and searching for Smartbear.

Please let me know your results! Smiley Happy

 

Super Contributor

Re: Video Recording of Test Execution is Easy

@AGubarev Created a new project in Jscript this morning. Got the same results (non-playing video file of 1kb). So in script it isn't working either.. Smiley Sad

 

Used TestComplete version:  12.42.3048.7 x86

Used VLC version: 2.2.8 (32bit)

 

Anyone got idea how to fix this? Is this even the right location for reporting bugs?

 

 

 

Staff

Re: Video Recording of Test Execution is Easy

Hi, @mgroen2

 

Hmm... it seems that something wrong in environment.

Could you, please, launch you test, pause it after 2-3 seconds click on the icon of vlc player in taskbar and copy the text. Maybe some errors will be there.

Alexander Gubarev
TestComplete QA Engineer
Top Kudoed Authors
Are You In?

Meet the Community Leaders!

SmartBear Connect is an excellent opportunity for training, in-person support, and networking.

GET YOUR TICKET WITH $100 OFF