Forum Discussion

DevaV's avatar
DevaV
Contributor
10 years ago

Testing Video Files with test complete

Hi,



Do test complete provides solution to test video files for its quality, pixel ratio, etc.. of video files.



Thanks,

Deva Veluchamy.

7 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Deva,

     


    You can find all the specified attributes of a video file in its Windows Explorer's Properties dialog. I wrote a sample script that gets this data from the file. I use the GetDetailsOf method for this.


     


    Here is the script:




    //JScript


    function getMediaInfo()


        {


            var objShell = new ActiveXObject("shell.application");


            var objFolder = objShell.NameSpace("<FolderName>");


            if (objFolder != null)


            {


                var objFolderItem = objFolder.ParseName("<FileName>");


                if (objFolderItem != null)


                {


                    var objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 2));


                    Log.Message("Item Type: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 1));


                    Log.Message("Size: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 27));


                    Log.Message("Length: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 300));


                    Log.Message("Frame Width: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 298));


                    Log.Message("Frame Height: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 299));


                    Log.Message("Frame Rate: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 297));


                    Log.Message("Data Rate: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 302));


                    Log.Message("Total Bitrate: " + objInfo);


                    objInfo = aqString.Trim(objFolder.GetDetailsOf(objFolderItem, 28));


                    Log.Message("Bit Rate: " + objInfo);


                }


            }


        }



  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Deva,

     


    See my comments:


     


    >>- Download the video


    You can use the sample from our How To tutorial to download the media file: "Download a file from the Internet"


     


    >>- Check that video plays as source video without any noise or any


    Sounds like it should be an intelligence comparison that should be done by a human. I don't think that any third-party video comparison tool will give 100% results.


     


    >>- Check for all other parmeters like quality, pixel, etc.. is same as source video.


    It looks like this is what the sample above does.


     

    • kirk_bottomley's avatar
      kirk_bottomley
      Contributor
      Sounds like it should be an intelligence comparison that should be done by a human.

      It would be nice to have metrics that could measure "smoothness" and the like, but you're right. That won't likely be automatable until true AI is on tap.

      That being said, is there any way to log or capture video for the person who is reviewing the test log to evaluate?

  • karkadil's avatar
    karkadil
    Valued Contributor
    In general, I wouldn't recommend automating testing of videos. It will take so much effort and will be so unstable that you'll get tired maintaining your scripts. It doesn't worth it.
  • Thanks for your suggestion.



    But my requirement is to test videos through automation scripts, so could you please suggest if test complete tool supports it.
  • Hi Tanya,



    Thanks for your code details to read the video file details.



    The requirement is little tweaky like.

    - Download the video

    - Check that video plays as source video without any noise or any

    - Check for all other parmeters like quality, pixel, etc.. is same as source video.