Introduction to GUI Level Testing (video)
Introduction to GUI level testing.
This video will demonstrate the use of GUI level testing in Silk Performer – from creating a simple Silk Test test case to running that test case in Silk Performer as a load test.
Open Silk Test and create a new project. Choose the classic agent. Give the project a name.
I am going to record a very simple test case against notepad. The main reason I am using notepad is because it exists on every windows machine so if you are new to GUI level testing you can follow the steps in this demo exactly.
Open Notepad and click on enable extensions – refresh the list and choose notepad from the list.
Now set a recovery system. This is the state the application will return to in the event an error occurs during execution.
Now record the test case. I am just adding some text to notepad and stopping the recording. Click on paste to editor and update the window declarations.
The important thing about GUI level testing is getting the configuration right. Once a simple script like this runs you can replace the Silk Test package with any scenario you need.
Run the test case to ensure it works without errors.
Next I need to export the test case. For simplicity I am going to choose the desktop. Options to include are Export to single Silk Test package and Compile before exporting. Also include extend.ini file. All other options should be unchecked.
That completes the Silk Test portion of the scenario.
Steps to follow in Silk Performer.
Create a new project and choose GUI level and Silk Test as the application type.
Now click on model script and browse for the Silk Test package on the desktop.
Choose the script file to load and the test case to use. Now click on Add.
Also choose the use project attributes for session login check box.
You will notice that the generated script contains only 5 functions.
The first two functions access the project attributes and load the username and password for the session login.
The STInitSession function handles the login.
STLoadProject loads the Silk Test package.
STExecuteTestcase triggers the actual execution against the application under test.
Clicking on Project | Project Attributes
This is a useful feature because it means passwords are obfuscated and not hard coded in the script.
Please note that a domain is usually required for the username and should be added as seen here.
Run a tryscript. The tryscript is successful.
It is important to note, tryscript are run on the local machine within the logged on users session. This is not the same scenario as would occur during a test. During a test a windows terminal server session is used so tryscript cannot be used to verify that you have configured your terminal services correctly.
Lets fast forward through the workflow and run a test, I have chosen 1 user queuing workload with simulation time. This is the same as running a tryscript on an agent except that windows terminal services will not be used.
Since we are running within a terminal services session we don’t get to see the replay running any longer.
In this scenario the test is successful and the results show no errors and transaction response times are within the expected range.
You can still verify that a windows session is actually being created and the correct applications are launched. Click on START | ADMIN TOOLS | terminal services manager. This is called remote desktop services in windows 2008 onwards. Click on the session tab then restart the test. You will see a new session getting created. Now move to the processes tab. You can see partner.exe which is SilkTest, notepad which is the application under test and the SilkPerformer agent all running as expected.
Thanks for watching.