videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/conf/VCXMyVideosCollectionPluginTestRobustness.cfg
author William Roberts <williamr@symbian.org>
Mon, 08 Mar 2010 21:43:31 +0000
branchCompilerCompatibility
changeset 7 5794cea85c20
parent 1 6711b85517b7
permissions -rw-r--r--
Create CompilerCompatibility branch

#-----------------------------------------------------------------------------------
#
# STIF test script file for testing VCXMyVideosCollectionPluginTest.dll
#
#-----------------------------------------------------------------------------------

[StifSettings]
CapsModifier= IptvTestClientApiCapsMod.exe
[EndStifSettings]

[Define]
INCLUDE c:\TestFramework\VCXMVCollectionPluginTest.inc
INCLUDE c:\TestFramework\VCXDrives.inc
INCLUDE c:\TestFramework\VCXConsts.inc
INCLUDE c:\TestFramework\VCXErrors.inc
LOOP1000 1000
LOOP500  500
LOOP250  250
LOOP200  200
LOOP100  100
LOOP50   50
LOOP20   20
[Enddefine]

#************************************************************************************
# Sub Cleanup
# Removes all videos from the phone. Collection is opened.
#************************************************************************************
[Sub Cleanup]
print cleanup start
create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV RemoveAllMedia
delete VCXMV

print wait 30sec
pause 30000
print cleanup end
[EndSub]
#************************************************************************************

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX <not a test> Setup

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

// Remove all videos

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV SetPreferredMemory C_DRIVE
VCXMV SetSortingOrder EVcxMyVideosSortingNone

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV RemoveAllMedia

delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util

create VCXTestUtilModule Util
// Copies some known 3G AP to "Internet" destination with "Internet" name for the AP.
Util SetUsedDestination "Internet"
Util CopyMethod "Internet" "Internet" "Internet"
// Disable connection dialog for "Internet" destination.
Util SetConnectionMethodIntAttribute "Internet" "Internet" 507 2 // 507 is ECmSeamlessnessLevel
Util SetDefaultIapCenrep
delete Util

print OK!
[Endtest]

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Download 100 videos, one at a time

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START
create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create
VCXMV EnableStats "Download 100 videos, one at a time" "C:\logs\fusion\ETXXXXXstats.txt"

VCXMV SetAutoResume 0

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 100
    VCXMV Download 3G_AP SERVICE_SMALLVIDEOS 1 0 "mediacharger" "Buran_9o"
    VCXMV WaitForAnyMessage 5MINUTES KVCXMYVideosTestMessageDlSucceeded KVCXMYVideosTestMessageDlFailed KVCXMYVideosTestMessageDlGeneral
    waittestclass VCXMV // Dl complete
    print LOOP_COUNTER / LOOP100
    VCXMV CoolDown
endloop

VCXMV CoolDown

delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Download 100 videos 5 at once

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START
create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create
VCXMV EnableStats "Download 100 videos 5 at once" "C:\logs\fusion\ETXXXXXstats.txt"
VCXMV SetAutoResume 0

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 20
    VCXMV Download 3G_AP SERVICE_SMALLVIDEOS 1 0 "mediacharger" "Buran_9o"
    VCXMV Download 3G_AP SERVICE_SMALLVIDEOS 2 0 "mediacharger" "Buran_9o"
    VCXMV Download 3G_AP SERVICE_SMALLVIDEOS 3 0 "mediacharger" "Buran_9o"
    VCXMV Download 3G_AP SERVICE_SMALLVIDEOS 4 0 "mediacharger" "Buran_9o"
    VCXMV Download 3G_AP SERVICE_SMALLVIDEOS 5 0 "mediacharger" "Buran_9o"
    VCXMV CoolDown
    print LOOP_COUNTER / LOOP20
endloop

VCXMV CoolDown

delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Pause, resume and cancel download, 100 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START
create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create
VCXMV EnableStats "Pause, resume and cancel download, 100 times" "C:\logs\fusion\ETXXXXXstats.txt"
VCXMV SetAutoResume 0

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 100
    VCXMV Download 3G_AP SERVICE_2 1 0 "mediacharger" "Buran_9o"
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageDlRunning
    waittestclass VCXMV

    VCXMV PauseDownload SERVICE_2 1 0
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageDlPaused
    waittestclass VCXMV // Dl paused
    
    VCXMV ResumeDownload 3G_AP SERVICE_2 1 0 "mediacharger" "Buran_9o"
    VCXMV WaitForAnyMessage 5MINUTES KVCXMYVideosTestMessageDlRunning
    waittestclass VCXMV // Dl complete

    VCXMV CancelDownload SERVICE_2 1 0
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCommandComplete
    waittestclass VCXMV // Dl canceled
    
    print LOOP_COUNTER / LOOP100
    VCXMV CoolDown
endloop

VCXMV CoolDown

delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Sideload 100 videos, one at time

callsub Cleanup

// TESTCASE START

create VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Sideload 100 videos, one at time" "C:\logs\fusion\ETXXXXXstats.txt"

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 100
    print delete LOOP_COUNTER / 100    
    VCXMV CreateVideoFile IptvTestVideoMpeg4 C_DRIVE "video LOOP_COUNTER .mp4"
    VCXMV CoolDown
endloop

VCXMV CoolDown

print OK!
delete VCXMV
[Endtest]

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Sideload and delete 200 videos, one at time

callsub Cleanup

// TESTCASE START

create VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Sideload and delete 200 videos, one at time" "C:\logs\fusion\ETXXXXXstats.txt"

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 200
    VCXMV CreateVideoFile IptvTestVideoMpeg4 C_DRIVE "video LOOP_COUNTER .mp4"
    print Sideload LOOP_COUNTER / 200
    VCXMV CoolDown
    
    VCXMV DeleteMedia ANY_DRIVE 0 0
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageDeleteResp KVCXMYVideosTestMessageCommandComplete KVCXMYVideosTestMessageDeleteStarted KVCXMYVideosTestMessageMpxItemDeleted KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    
    print delete LOOP_COUNTER / 200    
    VCXMV CoolDown
endloop

VCXMV CoolDown

print OK!
delete VCXMV
[Endtest]

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Sideload and delete 300 videos, 30 at once

callsub Cleanup

// TESTCASE START

create VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Sideload 300 videos, 30 at once" "C:\logs\fusion\ETXXXXXstats.txt"

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 10
    VCXMV CreateVideoFile IptvTestVideoMpeg4 C_DRIVE "video LOOP_COUNTER .mp4" 0 30
    print Sideload LOOP_COUNTER / 10
    VCXMV CoolDown
    
    VCXMV DeleteMedias C_DRIVE 0 30 0
    VCXMV WaitForMessages 10MINUTES KVCXMYVideosTestMessageDeleteResp KVCXMYVideosTestMessageCommandComplete KVCXMYVideosTestMessageDeleteStarted KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    
    print delete LOOP_COUNTER / 10
    VCXMV CoolDown
endloop

VCXMV CoolDown

print OK!
delete VCXMV
[Endtest]

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Cancel delete 30 videos for 20 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV EnableStats "Cancel delete 30 videos for 20 times" "C:\logs\fusion\ETXXXXXstats.txt"

loop 20
    // Create sideloaded videos
    VCXMV EnsureDriveForVideos C_DRIVE 30 "video LOOP_COUNTER .mp4"
    VCXMV CoolDown
    
    VCXMV CancelNextOperation
    VCXMV DeleteMedias C_DRIVE 0 30 0
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCommandCanceled
    waittestclass VCXMV
    
    VCXMV CoolDown
    print LOOP_COUNTER / LOOP20
endloop

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Move video 200 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Move video 200 times" "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 100

    VCXMV EnsureDriveForVideos E_DRIVE 0 
    VCXMV EnsureDriveForVideos C_DRIVE 1 "video LOOP_COUNTER .mp4"

    VCXMV MoveMedia C_DRIVE 0 E_DRIVE 0
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageMoveResp KVCXMYVideosTestMessageCommandComplete KVCXMYVideosTestMessageCopyOrMoveStarted
    waittestclass VCXMV
    VCXMV CoolDown
    
    VCXMV EnsureDriveForVideos C_DRIVE 0 
    VCXMV EnsureDriveForVideos E_DRIVE 1 "video LOOP_COUNTER .mp4"
    
    VCXMV MoveMedia E_DRIVE 0 C_DRIVE 0
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageMoveResp KVCXMYVideosTestMessageCommandComplete KVCXMYVideosTestMessageCopyOrMoveStarted
    waittestclass VCXMV
    VCXMV CoolDown
    
    print LOOP_COUNTER / 100
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Move 20 videos 100 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Move 20 videos 100 times" "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 50
    VCXMV EnsureDriveForVideos E_DRIVE 0 
    VCXMV EnsureDriveForVideos C_DRIVE 20 "video LOOP_COUNTER .mp4"
    VCXMV CoolDown

    VCXMV MoveMedias C_DRIVE 0 20 E_DRIVE 0
    VCXMV WaitForMessages 10MINUTES KVCXMYVideosTestMessageMoveResp KVCXMYVideosTestMessageCopyOrMoveStarted KVCXMYVideosTestMessageCommandComplete
    waittestclass VCXMV
    VCXMV CoolDown
    
    VCXMV EnsureDriveForVideos C_DRIVE 0 
    VCXMV EnsureDriveForVideos E_DRIVE 20 "video LOOP_COUNTER .mp4"
    VCXMV CoolDown

    VCXMV MoveMedias E_DRIVE 0 20 C_DRIVE 0
    VCXMV WaitForMessages 10MINUTES KVCXMYVideosTestMessageMoveResp KVCXMYVideosTestMessageCopyOrMoveStarted KVCXMYVideosTestMessageCommandComplete
    waittestclass VCXMV
    VCXMV CoolDown

    print LOOP_COUNTER / 50
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Cancel move of 30 videos 50 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Cancel move of 30 videos 50 times" "C:\logs\fusion\ETXXXXXstats.txt"

    // Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 50
    VCXMV EnsureDriveForVideos E_DRIVE 0 
    VCXMV EnsureDriveForVideos C_DRIVE 30 "video LOOP_COUNTER .mp4"
    VCXMV CoolDown
    
    VCXMV CancelNextOperation
    VCXMV MoveMedias C_DRIVE 0 30 E_DRIVE 0
    VCXMV WaitForMessages 2MINUTES KVCXMYVideosTestMessageCommandCanceled
    waittestclass VCXMV
    VCXMV CoolDown

    print LOOP_COUNTER / LOOP50
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Copy video 200 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Copy video 200 times" "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV CreateVideoFile IptvTestVideoMpeg4 C_DRIVE "video0.mp4"
VCXMV CoolDown

loop 200
    VCXMV CopyMedia C_DRIVE 0 E_DRIVE 0
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCopyResp KVCXMYVideosTestMessageCopyOrMoveStarted KVCXMYVideosTestMessageCollectionItemChanged KVCXMYVideosTestMessageCommandComplete KVCXMYVideosTestMessageCollectionCategoryChanged
    waittestclass VCXMV
    print LOOP_COUNTER / 200
    VCXMV CoolDown
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Copy 20 videos 100 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Copy 20 videos 100 times" "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 100
    VCXMV EnsureDriveForVideos C_DRIVE 20 "video LOOP_COUNTER .mp4"
    VCXMV EnsureDriveForVideos E_DRIVE 0
    VCXMV CoolDown
    pause 60000

    VCXMV CopyMedias C_DRIVE 0 20 E_DRIVE 0
    VCXMV WaitForMessages 10MINUTES KVCXMYVideosTestMessageCopyResp KVCXMYVideosTestMessageCopyOrMoveStarted KVCXMYVideosTestMessageCommandComplete
    waittestclass VCXMV
    VCXMV CoolDown
    
    print LOOP_COUNTER / LOOP100
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Cancel copy of 30 videos 50 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Cancel copy of 30 videos 50 times" "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 50
    VCXMV EnsureDriveForVideos E_DRIVE 0 
    VCXMV EnsureDriveForVideos C_DRIVE 30 "video LOOP_COUNTER .mp4"
    VCXMV CoolDown
    
    VCXMV CancelNextOperation
    VCXMV CopyMedias C_DRIVE 0 30 E_DRIVE 0
    VCXMV WaitForMessages 2MINUTES KVCXMYVideosTestMessageCommandCanceled
    waittestclass VCXMV
    VCXMV CoolDown

    print LOOP_COUNTER / LOOP50
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX GetMediasByMpxId - 50 videos, 100 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "GetMediasByMpxId 50 videos, 100 times" "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV CreateVideoFile IptvTestVideoMpeg4 C_DRIVE "video.mp4" 0 50

VCXMV CoolDown

loop 100
    // Almost all.
    VCXMV GetMediasByMpxId 2 48
    VCXMV WaitForMessages 10MINUTES KVCXMYVideosTestMessageGotMediasByKMpxId
    waittestclass VCXMV

    VCXMV RefreshContents
    VCXMV WaitForMessages 10MINUTES KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV

    // Only first.
    VCXMV GetMediasByMpxId 0 1
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageGotMediasByKMpxId
    waittestclass VCXMV
    
    VCXMV RefreshContents
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    
    // Only last.
    VCXMV GetMediasByMpxId 19 20
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageGotMediasByKMpxId
    waittestclass VCXMV

    VCXMV RefreshContents
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    
    // Only every second one.
    VCXMV GetMediasByMpxId -3 50
    VCXMV WaitForMessages 10MINUTES KVCXMYVideosTestMessageGotMediasByKMpxId
    waittestclass VCXMV
    
    VCXMV RefreshContents
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV

    print LOOP_COUNTER / LOOP100
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]


#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Get media full details for 10 videos for 500 times.

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Get media full details for 10 videos for 500 times." "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV CreateVideoFile IptvTestVideoMpeg4 C_DRIVE "video.mp4" 0 10

VCXMV CoolDown

loop 500
    VCXMV GetMediaFullDetails ANY_DRIVE 0
    VCXMV GetMediaFullDetails ANY_DRIVE 1
    VCXMV GetMediaFullDetails ANY_DRIVE 2
    VCXMV GetMediaFullDetails ANY_DRIVE 3
    VCXMV GetMediaFullDetails ANY_DRIVE 4
    VCXMV GetMediaFullDetails ANY_DRIVE 5
    VCXMV GetMediaFullDetails ANY_DRIVE 6
    VCXMV GetMediaFullDetails ANY_DRIVE 7
    VCXMV GetMediaFullDetails ANY_DRIVE 8
    VCXMV GetMediaFullDetails ANY_DRIVE 9
    
    print LOOP_COUNTER / 500
endloop

VCXMV CoolDown

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]

#------------------------------------------------------------------------------------
#
#
#------------------------------------------------------------------------------------
[Test]
title ETXXXXX Repeat category change 200 times

create VCXTestUtilModule Util
Util CreateMobilecrashWatcher

callsub Cleanup

// Setup all origins

create VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create
VCXMV SetSortingOrder EVcxMyVideosSortingName

VCXMV SetFileCheck 0

VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

VCXMV OpenLevel EVcxMyVideosAllVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

// Create some video objects.
VCXMV CreateVideoFile IptvTestVideo3Gp C_DRIVE "a.mp4"
VCXMV CreateVideoFile IptvTestVideo3Gp C_DRIVE "b.mp4"
VCXMV CreateVideoFile IptvTestVideo3Gp C_DRIVE "c.mp4"
VCXMV CreateVideoFile IptvTestVideo3Gp C_DRIVE "d.mp4"
VCXMV CreateVideoFile IptvTestVideo3Gp C_DRIVE "e.mp4"

VCXMV CoolDown

VCXMV SetAutomaticRefresh 0

VCXMV CreateCopyOfMedia ANY_DRIVE 0
VCXMV SetMediaDetail EVcxTestMapping_KMPXMediaGeneralTitle "OriginOther"
VCXMV SetMediaDetail EVcxTestMapping_KVcxMediaMyVideosOrigin EVcxMyVideosOriginOther
VCXMV OutsideMediaUpdate
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionItemChanged
waittestclass VCXMV

VCXMV CreateCopyOfMedia ANY_DRIVE 1
VCXMV SetMediaDetail EVcxTestMapping_KMPXMediaGeneralTitle "OriginCamera"
VCXMV SetMediaDetail EVcxTestMapping_KVcxMediaMyVideosOrigin EVcxMyVideosOriginCapturedWithCamera
VCXMV OutsideMediaUpdate
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionItemChanged
waittestclass VCXMV

VCXMV CreateCopyOfMedia ANY_DRIVE 2
VCXMV SetMediaDetail EVcxTestMapping_KMPXMediaGeneralTitle "OriginDownloaded"
VCXMV SetMediaDetail EVcxTestMapping_KVcxMediaMyVideosOrigin EVcxMyVideosOriginDownloaded
VCXMV OutsideMediaUpdate
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionItemChanged
waittestclass VCXMV

VCXMV CreateCopyOfMedia ANY_DRIVE 3
VCXMV SetMediaDetail EVcxTestMapping_KMPXMediaGeneralTitle "OriginSideloaded"
VCXMV SetMediaDetail EVcxTestMapping_KVcxMediaMyVideosOrigin EVcxMyVideosOriginSideLoaded
VCXMV OutsideMediaUpdate
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionItemChanged
waittestclass VCXMV

VCXMV CreateCopyOfMedia ANY_DRIVE 4
VCXMV SetMediaDetail EVcxTestMapping_KMPXMediaGeneralTitle "OriginRecording"
VCXMV SetMediaDetail EVcxTestMapping_KVcxMediaMyVideosOrigin EVcxMyVideosOriginTvRecording
VCXMV OutsideMediaUpdate
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionItemChanged
waittestclass VCXMV

VCXMV SetAutomaticRefresh 1

VCXMV GetAllMediaFullDetails

delete VCXMV

pause 2000

// TESTCASE START

create  VCXMyVideosCollectionPluginTest VCXMV
VCXMV Create

VCXMV EnableStats "Repeat category change 200 times" "C:\logs\fusion\ETXXXXXstats.txt"

// Get list of videos
VCXMV OpenCollection VCXCollectionMyVideos
VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
waittestclass VCXMV

loop 200
    
    // All videos.
    
    VCXMV OpenLevel EVcxMyVideosAllVideos
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CheckMediaCount ANY_DRIVE 5
    
    VCXMV CloseLevel
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CoolDown
    
    // Downloads
    
    VCXMV OpenLevel EVcxMyVideosDownloads
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CheckMediaCount ANY_DRIVE 1
    
    VCXMV CloseLevel
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CoolDown
    
    // Recordings
    
    VCXMV OpenLevel EVcxMyVideosTvRecordings
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CheckMediaCount ANY_DRIVE 1
    
    VCXMV CloseLevel
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CoolDown

    // Captured videos.
    VCXMV OpenLevel EVcxMyVideosCapturedVideos
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CheckMediaCount ANY_DRIVE 1

    VCXMV CloseLevel
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CoolDown

    // Other videos.
    
    VCXMV OpenLevel EVcxMyVideosOther
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CheckMediaCount ANY_DRIVE 2    
    
    VCXMV CloseLevel
    VCXMV WaitForMessages 1MINUTE KVCXMYVideosTestMessageCollectionOpened
    waittestclass VCXMV
    VCXMV CoolDown

    print LOOP_COUNTER / LOOP200
endloop

print OK!
delete VCXMV

Util CheckMobilecrashes
pause 1000
delete Util
[Endtest]