VB.NET script takes longer to execute when called from a Visual test in comparison to a Visual Test called from a Visual Test
Consider the following two tests:
Test 1: Is a Visual Test which iterates through a loop 100 times, each iteration calls a “VB.NET” script that accepts the incremented value from the parent test.
Test 2: Is a Visual Test which iterates through a loop 100 times, each iteration calls another “Visual” test that accepts the incremented value from the parent test.
For example the performance of a single execution of Test 1, reported the following:
Stop Timer reported a time of 222.35
Total run time 3 minute 43 seconds
Average time for executing each iteration of the (Stop Timer 2 = 2.07 seconds)
For example the performance of a single execution of Test 2, reported the following:
Stop Timer 1 reported a time of 112.969
Total run time 1 minute 54 seconds
Average time for executing each iteration of the test (Stop Timer 2 = 0.97 seconds)
The reason why there is such a performance differences between running the “Visual Test which called a child Visual Test” and the “Visual Test which called a VB.NET” script is because in SilkTest 13 and prior versions; each time the child VB.NET script is called from the Visual Test it has to be first loaded from the database and then later compiled.
However with the release of SilkTest 13.5; the SilkTest Workbench will now only load the VB.NET script once per session; meaning the VB.NET is loaded during the first iteration of the test and not for all subsequent 99 iterations. Internal tests and tests by customers has resulted in significant improvement in the execution times; especially if the database in question is either remote or under load.
Additionally a change request has been logged for SilkTest to compile the VB.NET scripts only once per playback session, the official RPI number is: 1085827 and this enhancement will be implemented in future versions of the SilkTest Workbench.