Skip to main content

Posts

Showing posts from February, 2010

Initial QTP Scripts in CVS

In a QTP Test following files should be committed to cvs/svn – In Action – ObjectRepository.bdb Resource.mtr Script.MTS Root Folder – Default.xls Test.tsp Out of these files only “Script.MTS” is used by QTP tests for My App, but QTP still needs other files to open test, hence I had to add those as well. THanks, Tarun K

Deallocating memory in VB Script

I came across a few articles which talk about setting objects to 'Nothing' after its usages to release memory though I did not find any specific pointer about normal variables. I variable should be set to 'Empty' to deallocate memory, i.e. ****************************** Dim aVariable aVariable = 1 aVariable = Empty MsgBox IsEmpty(aVariable) Dim aObject Set aObject = CreateObject("Scripting.FileSystemObject") Set aObject = Nothing MsgBox aObject Is Nothing ****************************** For more on this refer here commented on - 16th Feb 2010 Looks like some one has different thought here

Using ExcelADO to fetch data from excel

We all are aware of externalizing test data from test scripts in test automation. We often stumble upon using excel as test data file, and I have seen crude ways of handling excel. i.e. - Creating Excel Application object Opening work book and fetching data Disadvantages of this approach are detailed on Microsoft website here - http://support.microsoft.com/kb/278973/EN-US/ In a gist following above mentioned approach would be process heavy and would make script execution (especially in case of long running test suites) slow Another crude way is to use sheet-name (which is still acceptable), Row and Column number (i.e. - (2, 5)), Row and Column range (B5, B10). Using row and column identifier is fragile as insertion of new data set in excel would break existing test scripts. A better approach to overcome these is to use ExcelADO along with name of Range in Excel. ExcelADO overcomes process over head and using Range to overcome fragility over Row and Column Range . In excel

Selenium Function Library

Poornima and I built collection of java Classes for selenium which provide capabilities which are not built in Selenium like - HTML Table Parsing, Custom Verification, Logging to name a few. This project is been existent from some time now, though I never had chance to write up on this. Whole project is available under "Repository" section of Veda for "Testing Competency" project and can be opened using java IDE like Eclipe. Best way to get acquainted with this API is to generate java doc your self which is no more than child's play. Make sure you have java 1.5 or higher and ANT 1.7.0 Configure System variable for Java and ANT, once having done this u should be able to see version of java and ant on your console on doing - "java-version" and "ant -verison" On Console navigate to path where Sel Library is check out, it turns out to be following for me - "D:\SelFunctionLibrary\SeleniumFunctionLibrary>" Execute following ANT