Wednesday, May 6, 2015

Adding custom methods to an object

During an automation project, generally you work on same web application. And during this project you see that making a procedure is same on all of the test cases (like ensuring the synchronization of a web page). You can make use of shared function library to develop faster/easier/maintainable test scripts (Also you can check Extensibility plugin).

Thursday, February 26, 2015

Making external webservice call in C# rule

In a C# rule, you can also make external web service call. Before doing this first we have to make some configuration settings (like security and adding reference). If the security configuration is left as default you probably are going to get "System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission'" error.

Wednesday, February 25, 2015

Adding .Net Reference

You can write complicated C# codes in SV Designer. By default only System and System.Code references can be used while wirting your C# methods. Since you are mostly working with XML objects you are going to have to use System.Xml.XmlDocument reference.

When you add using System.Xml; line at the top of your code you are going to get "Xml does not exist in the namespace 'System'" error.

Enabling scripted rules

Because of heavy business schedule I wasn't able to submit new posts. Meanwhile I was mostly working on UFT and HP's Service Virtualization (SV). After the business hours it would be better for me to write some posts before forgetting what I learned. I am going to describe how to enable scripted rules in SV.

Sunday, September 7, 2014

Upgrading QC 11 to ALM 12.01

According to some QC admins upgrading and migrating to ALM may be very complicated. I am going to describe how we made this process in less than 3 hours for a project that is bigger than 40GB without any problem. No DBA needed for this operation :) Following the described procedures on this page is at your own risk! Do not blame me if something goes wrong :)

Monday, June 16, 2014

Changing proxy configuration automatically

For our automation scripts we are testing various type of applications. Some of these applications needs proxy configuration to access the application page while for some of them proxy mustn't be configured.
To solve this we use a function named "initAutomation" that takes application name as a parameter. This function is being called at the beginning of the test script and checks the application name and then decides to configure proxy settings before the execution.

Following piece of code accomplishes this functionality.

Disabling Smart Identification

Sometimes the "Smart Identification" functionality may become a pain for the automation scripts especially if you have dozens of test scripts. I prefer not to use this functionality because of slow identification and sometimes QTP mis-identifies the objects. For me it is better to get an "Object not found" error instead of waiting for the smart identification to find correctly desired object.