Testing an Application Using SilkTest - Testing Tools

To start testing an application in SilkTest, follow the steps given below.

Step 1: Start SilkTest.
Start -> Programs -» SilkTest ->SilkTest

Step 2: In SilkTest, the Quick Start Wizard is displayed automatically. It can also be invoked by selecting "New" option from File menu. File -> New and select the Quick Wizard icon.

The Quick Start Wizard helps you in executing the above-mentioned four steps fast. Invoke the wizara! by selecting QuickStart Wizard icon as shown in Figure.

selecting QuickStart Wizard icon

Step 3: On clicking the "Quick Start wizard" icon, the dialog box shown in Figure opens.

clicking the

Step 4: Click "Next" to proceed further. The dialog shown in Figure is displayed. By default the name of the test plan is given as "Sample"Browse the folder where the test plan has to be saved and enter the name of the test plan. The test plan will have the extension "pin". Click the "Next"button to proceed further.

dialog shown in Figure

Step 5: On clicking the "Next" button, the dialog shown in Figure is displayed.
Select the "New Test Frame" option and click the "Next" button.

On clicking the

Step 6: Quick Start Wizard lists all the running applications (which are not minimized). Let us now see how to perform testing using SilkTest. Let us consider the "Calculator" application for the testing purpose.

Step 7: Open the "Calculator" application, and click on the tittle bar of the Quick Start Wizard window. The Calculator is now added to the list of applications, as shown in Figure

Calculator is now added to the list of applications

Select the Calculator and Click Next.

Step 8: The test plan is successfully completed. The next step is to create the TestFrame. To capture the Calculator window, click on the Calculator window.

Select the Calculator and Click Next.

Step 9: The test plan is successfully completed. The next step is to create the TestFrame. To capture the Calculator window, click on the Calculator window.

Step 10: When the user clicks the "Next" button, the dialog shown in Figure is displayed prompting you to move the cursor on the application, whose windows are to be captured.

When you move the mouse pointer on a window, the wizard records all the declarations SilkTest needs, in a file called frame.inc (saved in the same directory of your testplan). The "inc" file contains the test script that is automatically generated by the QuickStart wizard. The screen shown in Figure is displayed. You should make sure that all the windows are opened so that the wizard records all the declarations.

Capturing new windows

Step 11: Once all the windows in the application are captured, click the "Return toWizard" button to return to the "Quick Start wizard".

Capturing new windows

Enter the Testcase name and Testcase Description, which helps you understand the purpose of the test case. Click Next to record the test case.

Step 12: The record status dialog as shown in Figure is displayed. Start recording the actions. All the events that are performed are recorded. To pause the record­ing, click "Pause Recording" and to again begin recording click "Resume Re­cording
Once all the actions to be tested are recorded, click "Done" button to stop the recording.

Capturing new windows

Step 13: When you stop the recording Quick Start Wizard displays the "Creating a Testcase" dialog. It displays the Testcase name and Testcase Description as shown in Figure

Testcase name and Testcase Description

Step 14: When you click the "Next" button the wizard displays "Running the test" dialog as shown in Figure

Running the test

Step l5:The "Congratulations!" dialog is displayed as shown in Figure. It displays details of the test recorded.

Congratulations!

Step 16: Select the Testcase and click the ^ J button to run the test case as shown in

Testcase and click the ^ J button

Wizard reports the result, whether the test has passed or failed. The result of your script is saved in .res file and the testplan is saved in .pin with the corresponding test plan name.Wizard sets the application state to Default Base State (initial state).

Till now we have described the general procedure of how to record test case, execute it and then interpreting the results. Now we will demonstrate a few test cases. Here we use the standard calculator for our testing purpose. So in order to test the application (Calculator) efficiently, design your test cases so that each and every button in the GUI is pressed at least once.

The GUI of the standard calculator application is shown in Figure

GUI of the standard calculator application

To test this application, we generate the test cases as shown in Table.

generate the test cases

For each test case, the expected result is also given in this table.

Test case #1: To test the Inverse operation (inverse of 4 using 1/x button)

Step 1: Open the Silk Test - Quick Start Wizard.

Step 2: Open the "Calculator" application.

Step 3: Follow the steps to capture the windows of the Calculator application as
specified in the "Testing an Amplication Using Silkiest "section.

Step 4: Start recording the following steps:

  1. Click "4" on the Calculator
  2. Click the "1/x" button on the Calculator to find the inverse of 4.
  3. The result, 0.25 will be displayed on the Calculator.

Step 5: Stop the recording by clicking "Done" button on the "Record Status" window.

Step 6: Follow the steps of the Quick Start wizard.

Step 7: Select the "Byx" test case and click the I button to run the test. Step 8: The results of the test case are displayed.
The wizard gives the time, date, elapsed time, percentage of test passed, as shown in Figure

GUI of the standard calculator application

You can view the test script generated by the wizard. To view this, click on the in the "Byx.pin" window. It displays three files under "header" section "usepath","usefiles", "framefile". Open the file specified at the section to see the events that are recorded as shown in Figure.

specified at the section to see the events that are recorded

Test Case #2: To test the operation Square root of -6. The test script shown in Figure is generated:

test script shown

So, we have completed using all the buttons in the Calculator. Since, you are testing a standard application which does not have any bugs, all the tests have passed. When the software is in development stage, you need to give these test cases repeatedly and keep testing the software given by the development team. In such cases, you don't need to keep entering the test cases manually; you can create the test scripts and run them in unattended mode. Even if the application fails in between some tests, it will automatically recover and continue with other test cases. However, note that how well the application is tested depends on how well you design the test cases. Even for the calculator application, we have given only some sample test cases, you need to generate more number of test cases.

You can appreciate the importance of using the tool for repeated testing. You can store all the test cases and execute them in one shot.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Testing Tools Topics