Using Borland Silk For Test Automation
Using Borland Silk For Test Automation
Quick Ground Up Kit for Implementing Silk Test Automation
Introduction to Silk: Silk is not just another test automation tool by another vendor. But happens to be the best automation tool I have come across during my career. It comes from the world's most respected organization, i.e., Borland. I personally admire Silk and have heard similar views from so many users who have extensively used Silk. No surprises to know the significant penetration in the industry.
So lets get Started. I have used Microsoft Word for implementing Silk with an intention to reach broader audiences as everyone more or less knows Word and can focus on Tool/Silk.
Test Plan/Test Steps:
1. Invoke Silk.
2. The main screen will be displayed as shown in the features described.
3. Click the Record button.
4. will get minimized (only if specified; but a lot of Automation Tools do it as a
default behavior).
Go to Start->Programs
5. Invoke Microsoft Word.
6. Type a couple of words.
7. Save the Document as C:Test-Report-1.doc
8. Exit and observe the Code Window The Tool Generates the Code (which I am not pasting here due to the respect for the vendor)
9. Close Microsoft Word
Executing the Automated Test
1. Maximize the Test Tool.
2. Click the button Run, as shown in the Figure
3. Observe the Test Results.
4. Record the Test Results.
5. Save the Test Results.
Test Results:
1. Silk writes the code for you.
2. A sample code written(by the Test Automation Tool) is written below:
Just a couple of generic lines (pseudo code goes something like this: set_window ("", 3);
button_press ("Start");
# BaseBar
set_window ("BaseBar", 15);
toolbar_select_item ("ToolbarWindow32", "Microsoft Office;Microsoft Office Word
2003");
# Document4 - Microsoft Word
set_window ("Document4 - Microsoft Word", 3);
obj_type ("Microsoft Word Document","");
# Microsoft Office Word
set_window ("Microsoft Office Word", 0);
button_press ("No");
3. Now What? Run the Script.
4. Observe the results, wow it works.
Is that really so simple?
Unfortunately it is not? Read on to know why.
Attention to Detail: go to the folder where Silk has recorded and saved the results.
Observe the directory structure.
Pitfalls: Take the test tool is not installed on the target machine. What do you do, buy another
license and install.
Now run the script. Will this work? Well it depends (on various dependencies).
Processor Configuration (this one might vary and might not be true for all the test automation tools out there.
Software configuration needs to exactly match with the machine on which the automation.
Test Automation script was generated (this includes right from the Operating System version to where the test program has been generated to where the targeted Test program (that needs to be tested) has been installed. But why? Here are the tips.
Importance of Checks:
What is a check, anyway ???
· A check can be defined something similar to Objects, which is identified by the Test Automation Tool.
Technical Jargon associated with Test Developers and Tool Vendors as well as the Users and/or Test Engineers like us.
· The most popular Test Automation Tools available work on the principle of
checks.
· While you keep clicking buttons for the test steps.
· What the test tool does is captures all the events and saves them as checks.
· There are some standard checks that most of the Automation Tools use are:
1. BMP Checks
2. UI/ Checks
3. Text Checks
4. Co-ordinate Checks and so on....
So as you keep hitting the Test Steps, the associated Test Automation Tool keeps recording
the steps as checks and writes the code for the test steps. TSL is the Scripting language associated with the Test Tool being evaluated.
A couple of Proofs:
Allows you to select another application's objects that you want available in your code by setting a Reference to that application's Object Library.
Dialog Box Options/ Available References: Lists the references available to your project.
1. After you set a Reference to an object library by selecting the check box next to its name, you can find a specific object and its methods and properties in the Object Browser.
2. If you are not using any objects in a referenced library, you should clear the check box for that Reference to minimize the number of object references Visual Basic must resolve, thus reducing the time it takes your project to compile. You can't remove a Reference for an item that is used in your project.
3. If you remove a Reference to an object that your are currently using in your project, you will receive an error the next time you refer to that object.
4. References not in use are listed alphabetically.
For a broader level understanding, lets do 1 more implementation.
Prerequisite: Invoke Silk and click the record button.
Test Plan:
Test Case 1: Invoke the Calculator App via Start-->All Programs-->Accessories-->Calculator.
Expected behavior: The app should get invoked.
Test Case 2: Click the Scientific view.
Expected behavior:
Test Case 1: Click 12345679*8 and hit the return key.
Expected Expected Results: should display 98765432
Test Case: Exit Calculator
Expected Behavior
Test Results: PassFail
Stop Recording
Run the Test using the Silk Record button.
Observe the results.
Result: It works.
Problem 1: Keep the Calculator Application Open, and Run the test.
Test Results: it will display the following error.
The Problem: its not been able to recognize the Object.
Workaround: As the conventional Test tools are based on Object and checks based concepts, we need to ensure that we bring in the kind of generic-ness that is required to ensure that it runs successfully in 1 go, no matter what.
Even if one instance of any application is open which was not there when the Test was
recorded, it will fail.
If the machine has different Operating System/Display settings and so on, it will still fail.
There are tonnes of other similar issues, and the list is endless.
Permanent Solution: Silk has got its own scripting language associated with it. Which is pretty intuitive and backed up with good amount of support from the vendor.
It has all the debugger support available, and it is very intuitive and user friendly.
A screen cap is attached below. It has highlighted the debugger controls.
Then where is the problem/ Identification/Isolation the Problem.
1. Were we prepared to debug the Test App, or just record and play?
2. Were we prepared to learn the scripting language associated with Silk?
3. Were we ever told the cost of the tool that we have sourced.
4. Were we ever told that in case you really want to learn the points 1 and 2, there are so many open source languages available with little or no cost implication.
Here goes the Brain of Silk.
Silk also uses the Objects concepts Invoke the Tool.
Implementation: Using Silk
1. Create a new project.
2. Click the Record button.
3. Record the Test Steps
4. Stop.
5. Run.
Observe and record the results.
One very great and impressive functionality of silk, in one go you can add a test script as well as the case, which automatically takes care of manual cross-mappings which is the most tiresome and monotonous for testers.
Feature 2: Create Project Dialog Box
Important functionality and Considerations for implementing silk as a test automation tool.
Important Functional considerations are: bug free and it takes a while to understand Silk. Unlike other test automation tools.
Itself claims to have 150 known bugs in the latest silk release.
No wonder all the most popular media products test engineering teams are using Silk as de-facto standard.
This includes Adobe Systems and Quark.
Feature 3: Silk: Auto Test Case Updation Feature
Feature 5: Silk Test
Feature 4: Class
Feature 6: Workflow
Feature 7: Extension Support for Client Server Application
The Most Admired Features: Recovery Scenario, Options Tab Under Silk, ruggedness to automate professional graphic tools like photoshop and quark's products.
Abhinav Vaid
abhinav@indiantestingboard.com
Article Source: http://EzineArticles.com/expert/Abhinav_Vaid/15712
Article Source: http://EzineArticles.com/988149
_(By Abhinav Vaid).
Comments
Post a Comment