Archive for the 'Code' Category
My Blog’s Graph

I was reading Griner’s Blog over at TheSocialPath.com and his latest post had an interesting image of a graph the blog. Of course, I got curious and decided to graph out my blog using this cool web page graphing site:

Webpages as Graphs

I am not sure what exactly it all means, but it sure looks purty.

Updating ActiveX Datagrids in QTP

In my recent testing efforts, I have comes across a desktop windows form (written in VB6) involving updating a data grid and then calculating another field’s value based on those updates. In order to achieve this functionality, the development staffs implemented two events (AfterColUpdate and LostFocus) that, when triggered, would fire off the calculation method.

None of this is obvious to the end user when testing, all they see is enter a number into the grid column and the total field automatically updates with the sum of all values in the column. Easy peasy.

I created my reusuable action in QuickTest Pro and record the entering of data, which yielded the following code:

VbWindow(”frmMain”).VbWindow(”frmChildWindow1″).VbWindow(”frmChildWindow2″).AcxTable(”PaymentGrid”).SelectCell 1,4

VbWindow(”frmMain”).VbWindow(”frmChildWindow1″).VbWindow(”frmChildWindow2″).AcxTable(”PaymentGrid”).SetCellData 1,4, “30.00″

(more…)

Using QTP to Connect to an Oracle Database with Instant Client

Using QTP to Connect to an Oracle Database with Instant Client

by Geoffrey Rodgers
Need a light-weight ODBC connection to an Oracle database for you QTP scripts? Oracle Instant Client is just the ticket, assuming you have Oracle version 10g for your database. Please read the information provided by Oracle to make sure Instant Client is right for your needs.
The Instant Client Driver

I’m not going to rewrite everything provided by Oracle, but I will quickly say (for those of you that did not click on the above link) that Instant Client is a very quick installation and contains less overhead than the full client software that was previously required to connect to an Oracle database using something other than the Microsoft ODBC for Oracle driver.
Instant Client Driver Setup:

(more…)

Description Objects

When creating reusable actions in QuickTest Pro, there are times you may come across the need to dynamically access an object within your application that may or may not exist within your Object Repository. One approach to handling this opportunity is through the use of Description Objects.

I could spend a lot of time attempting to explain how to go about implementing description objects, but I have found that QTP’s help files do a good job explaining exactly what you need to do. To find what you are looking for, search for “Using Description Objects for Programmatic Descriptions” within the help file.

(more…)

Selecting “SQL_Latin1_General_CP1_CI_AS” Collation in SQL Server

Recently, I have had to install a named instance of SQL Server 2005 along side a default instance of SQL Server 2000. The 2000 server had the following collation configured: SQL_Latin1_General_CP1_CI_AS. For testing purposes, we had to make sure the new instance had the same collation setting.

(more…)

Determine SQL Database Collation Setting

If you want to determine the Collation setting for a particular database in SQL Server:

  1. Open Query Analyzer (or SQL Management Studio)
  2. Select your database
  3. Execute the following query:

SELECT DATABASEPROPERTYEX(db_name(), 'Collation') SQLCollation;
Hope this helps.

Check SQL Collation Setting

I have needed to check my SQL Server Collation settings recently. Here is a SQL Query to find your server’s collation setting.
SELECT SERVERPROPERTY('Collation') AS 'Collation'
Hope this helps.

Programmatically Create User Groups

I have recently come across the need to create user groups on my local machine for a current project. I have researched and come up with a straightforward VBScript file that I can use as my basis for creating many user groups on each fresh testing installation.

(more…)

.NET Framework and the Wiimote

Any of you have a Wii? Any of you wondered if you could use the Wiimote with your PC and code an application to use the Wiimote? If so, this site is for you. It includes links to useful information, instructions to sync your Wiimote to your Bluetooth enable device, and the Managed Library to communicate with the Wiimote.

How cool is that??

Coding4Fun : Managed Library for Nintendo’s Wiimote

Enjoy and happy coding!

Using External Libraries in QTP

I’ve found it necessary to create my own code libraries in QuickTest Pro to handle scenarios that aren’t generally covered by the typical QTP or VBScript APIs. This is a useful process for creating reusable functions that are accessible to your entire automation suite. (more…)