Monday, April 15, 2013

Use QC OTA to update Scripts

Thought of sharing a script which may be useful for you.
At some point of time you may have faced situation when all automation scripts are uploaded to QC or in File system , but then little change in approach like to associate one new Object Repository  or  need to have association of new library file or need to have association of Recovery scenarios to every script.

There are two way to update script
1. Open script one by one and perform manually associations
2. Use QC OTA to make this happen with script

The task can be easy if scripts are less in number but lets imagine user has more than 100 scripts. Its also cumbersome even if script are more than 50. So instead of doing association manually user can use OTA which we open script one by one and perform the required task.

Please find the following code to associate new OR to every single script in given QC node.




Wednesday, April 3, 2013

How to create Object Repository in absence of application:


Projects are going towards agile day by day and automation is becoming challenging. It is always good to start automation parallel with development. The problem is how to create script in absence of application. Well, its not impossible to create a script without application. All we need is user stories/screen sketch of GUI application. Yes I know you have question on object properties but hold your breath i am coming to that point latter. 

We had requirement in past to start with automation parallel with development process. The team was ready with framework and other prerequisite activities for automation but we still had to wait to see first version of GUI application. all we had was user stories diagrams. We decided to use our free time for script creation in absence of application. there are number of ways to create objects with dummy properties:

1. Using Excel sheet
2. Using XML Lets see one by one :

1. Using Excel sheet

Basic understanding of framework is required in order to understand this approach. Lets see the example of log in functionalities. We know that log in page has 2 web edit buttons for entering user name and password and 1 web button for log in. The things which we don't know is properties of this objects.

As we normally create script in keyword driven framework user follow the same approach. In properties column user can provide dummy properties as we don't know yet the actual properties.

Once application is available then user can change the dummy properties to actual ones. That's the only change required and script will run perfectly.


2. Using XML

This approach can be used in any framework.


XML file can be created for store dummy objects. user can add object name and its properties in text editor and then save it as XML. once the application is available then user can change the dummy properties to actual ones.