Back To Normal

Subscribe To Our E-Mail Newsletter

Thursday, December 23, 2010

RFT BASIC

RFT is an GUI Automation tool. User can develop there script in Java or VB.net.
Here we can discuss about Java with RFT.
  •  RFT 6.0 or above version will install eclipse with RFT plug-in
  •  User can create the new workspace in eclipse. Workspace is like collection of project and folders.
  •  Configure Application For testing :
  •        Select the Application for testing from configure menu.
  •        Configure the Jar file java based application.
  • Enable Environments for testing.
  •             Web Browsers: Where user can configure the default browsers for web based application.  Ex: IE ..   mozilla..
  •             Java Environment : supported version of JRE to be configured and make it as enable and default.
  • After configuring the Enable environments , click the web browsers tab and click the "Test" button. it will launch the default browser and display message as "Success"..
Now user Can record and playback the script.
Read More


Find out second larget by using the Max..

Using this Query , U can find the 2nd larget value...

select Max (t2.column1) from table t2
where t2. column1 < (select max(column1) from table ) ;
Read More


Wednesday, August 11, 2010

Difference Between QTP and SilkTest?

Difference between Qtp and silk test are explained in following URL:


http://tips-testing.blogspot.com/2008/06/comparison-of-silktest-and-quicktest.html
Read More


Thursday, June 17, 2010

Find out nth Highest salary from Emp table

SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); Output : n=2 , it will display 2nd highest salary from table. Otherwise We can use rank statement to find second largest:
select column1
from
(
select column1 rank() over (order by column1 desc) rank from
(select distinct(column1) from table1)
)
where rank 2;

Simple Solution:
-----------------
 Select max(Column1) from table1 where Column1 < (select max(Column1) from table1)
Read More


Thursday, June 3, 2010

Define Priority and Severity?

severity defines the importance of defect with respective to functional point of view..

priority defines the importance of defect with respective to customer point of view
Read More


Tuesday, May 18, 2010

Change the column name of table in oracle?

alter table tablename rename column column1 to column2;
Read More


Send mail in Outlook through the vbs?

Dim objOutlook
Dim objOutlookMsg
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
objOutlookMsg.To = "test@domain.com"
objOutlookMsg.CC = ""
objOutlookMsg.BCC = ""
objOutlookMsg.Subject = " Build Notification Started"
objOutlookMsg.Body = "Dear ASP Manager, Build Notification Started"
 objOutlookMsg.Attachments.Add "D:\test.txt"
objOutlookMsg.Send
Read More


Thursday, May 6, 2010

Read the Log Files from server using Vbs?

Dim FileSystemObj
Dim NotepadObj,strLine,objFile
Dim ResultFilePath,sSearchMsg

REM Arguments Form Command Propmt

If WScript.Arguments.Count = 1 Then
 sSearchMsg = WScript.Arguments.Item(0)
Else
 sSearchMsg ="FAIL"
End If

REM For log File and Result File Creattion.
ResultFilePath ="D:\Automation Results\LatestResults.txt"
Set FileSystemObj = CreateObject("Scripting.FileSystemObject")
Set ResultdObj =FileSystemObj.CreateTextFile(ResultFilePath)
ResultdObj.Close
ReadDataFromTextFile("\\BD07860A\DDrive\rpm_scripts\TestResults\Status.log")
ReadDataFromTextFile("\\blrd1497\D\rpm_scripts\TestResults\Status.log")
ReadDataFromTextFile("\\vmlancer\D\rpm_scripts\TestResults\Status.log")
REM ResultdObj.Close

Function ReadDataFromTextFile(InputFile)

 Set objFSO = CreateObject("Scripting.FileSystemObject")
 Set objDictionary = CreateObject("Scripting.Dictionary")
Set objTextFile = FileSystemObj.OpenTextFile(ResultFilePath,8)

 Const ForReading = 1

 Set objFile = objFSO.OpenTextFile (InputFile, ForReading)
 i = 0
 Do Until objFile.AtEndOfStream
  strNextLine = objFile.Readline
  If strNextLine <> "" Then
    IF InStr(strNextLine, sSearchMsg)Then
     objDictionary.Add i, strNextLine
    
    End If
  End If
  i = i + 1
 Loop
 objFile.Close

objTextFile.WriteLine("*****START LOG Machine :" &  InputFile  &"******************************")
objTextFile.WriteLine(" ")
objTextFile.WriteLine(" ")
 For Each strLine in objDictionary.Items
  objTextFile.WriteLine(strLine)
 Next
objTextFile.WriteLine("*****END LOG Machine :" &  InputFile  &"******************************")
objTextFile.WriteLine(" ")
objTextFile.WriteLine(" ")
 objTextFile.Close
End Function
Read More


Find out Difference between two Excels using Vbs?

 
 
  Dim sExcelFile1
  Dim sTextFile1,FSO
  Dim TextStream,TextStream1
  Dim S,fso1,s1,ResFile,sDiff
  Dim File,File1
  Set fso1 = CreateObject("Scripting.FileSystemObject")
  Set ResFile = fso1.CreateTextFile("D:\diffFile.txt", True)
 
  sExcelFile1 ="C:\Documents and Settings\vgurusam\Desktop\reliance.xls"
  sExcelFile2 ="C:\Documents and Settings\vgurusam\Desktop\Copy of reliance.xls"
  sTextFile1 ="D:\testfile.txt"
  sTextFile2 ="D:\testfile1.txt"
  Call ReadExcel (sExcelFile1,sTextFile1)
  Call ReadExcel (sExcelFile2,sTextFile2)
 
  Set FSO = CreateObject("Scripting.FileSystemObject")
  Set File = FSO.GetFile(sTextFile1)
  Set File1 = FSO.GetFile(sTextFile2)
  Set TextStream = File.OpenAsTextStream(1)
  Set TextStream1 = File1.OpenAsTextStream(1)
  
   Do    While Not TextStream.AtEndOfStream
      S =  TextStream.ReadLine & NewLine
      s1=  TextStream1.ReadLine & NewLine
      If (S <> s1) Then
        sDiff="Different Cell:: " & " String1 ::" & S & " String2 ::" & S1
'       WScript.Echo (S1)
       ResFile.WriteLine(sDiff)
      End If
      s1 =""
      S=""
      sDiff=""
   Loop
   TextStream.Close
TextStream1.Close
ResFile.close
 

  Function ReadExcel(sExcelFile,sTextFilePath)

   Dim fso, MyFile
   Set fso = CreateObject("Scripting.FileSystemObject")
  ' Set MyFile = fso.CreateTextFile("D:\testfile.txt", True)
    Set MyFile = fso.CreateTextFile(sTextFilePath, True)
    Dim sExcelPath 'As Variant  'Excel file
    '********** Excel object declaration **********'
     ' Excel Application object
    Dim objExcel 'As Excel.Application
    Dim objXLWorkbooks 'As Excel.Workbooks
    Dim objXLWorkbook 'As Excel.Workbook

    Dim WorkSheetCount 'As Variant  'Work sheets count in a excel
    Dim CurrentWorkSheet 'As Excel.Worksheet    ' Current worksheet
    Dim objCells 'As Excel.Range
    Dim objCurrentCell 'As Variant
    Dim objFont 'As Variant

    ' Result contents
    Dim sCellText 'As Variant
    Dim sFontName 'As Variant
    Dim sFontStyle 'As Variant
    Dim iFontSize 'As Variant
    Dim iCellTextColorIndex 'As Variant
    Dim iCellInteriorColorIndex 'As Variant
    Dim sResult 'As Variant
    Dim sChartFile 'As String


    ' Row and Col integer variables
    Dim iUsedRowsCount 'As Integer
    Dim iUsedColsCount 'As Integer
    Dim iTop, iLeft 'As Integer
    Dim iRow 'As Integer     'Row item
    Dim iCol 'As Integer     'Col item
    Dim iCurRow 'As Integer
    Dim iCurCol 'As Integer


    If (sExcelFile = "") Then
            sExcelPath = "D:\excel.xls"
    Else
            sExcelPath = sExcelFile
    End If

    If (iSheetIndex = "") Then
        iSheetIndex = 1
    End If


'    Call FileDeleteAndCreate (gsLogFile)

    'XL file check
'    If (FileExists(sExcelPath) <> 0) Then
'        Call LogWrite (gsLogFile, "The Excel file " & Chr(34) & sExcelPath & Chr(34) & " does not exit!")
'        Exit sub
'    End If

    Set objExcel = CreateObject("Excel.Application")
    objExcel.Workbooks.Open sExcelPath, False, True

    On Error Resume Next


    WorkSheetCount = objExcel.Worksheets.Count

    Set objXLWorkbook = objExcel.ActiveWorkbook


    Set CurrentWorkSheet = objExcel.ActiveWorkbook.Worksheets(iSheetIndex) 'iSheetIndex worksheet

    iUsedRowsCount = CurrentWorkSheet.UsedRange.Rows.Count
    iUsedColsCount = CurrentWorkSheet.UsedRange.Columns.Count
    iTop = CurrentWorkSheet.UsedRange.Row
    iLeft = CurrentWorkSheet.UsedRange.Column

    CurrentWorkSheet.UsedRange.Columns.AutoFit()
    ' Cells object
    CurrentWorkSheet.Cells.Activate


    For iRow = iTop To iUsedRowsCount   '(iUsedRowsCount - 1)
            'Read All rows
            For iCol = iLeft To iUsedColsCount  '(iUsedColsCount - 1)

                    sResult = ""
                    Set objCurrentCell = CurrentWorkSheet.Cells(iRow, iCol)
                    sCellText = objCurrentCell.Text


                    If ((sCellText = Empty)) Then


                            sResult = "Reading Cell {" & CStr(iRow) & ", " & CStr(iCol) & "}^" &"  "& "^" & "  " & "^" & "  " & "^" & "  " & "^" & "  " & "^" & "  "

                            Call LogWrite (gsLogFile, sResult)

                    Else
                            Set objFont = objCurrentCell.Font
                            sFontName = objFont.Name
                            sFontStyle = objFont.FontStyle
                            iFontSize = objFont.Size
                            iCellTextColorIndex = objFont.Color
                            iCellInteriorColorIndex = objCurrentCell.Interior.ColorIndex



                            If (sFontName = Empty) Then
                                    sFontName = "empty"
                            End If
                            If (sFontStyle = Empty) Then
                                    sFontStyle = "empty"
                            End If
                            If (iFontSize = Empty) Then
                                    iFontSize = "-99999999"
                            End If
                            If (iCellTextColorIndex = Empty) Then
                                    iCellTextColorIndex = "99999999"
                            End If
                            If (iCellInteriorColorIndex = Empty) Then
                                    iCellInteriorColorIndex = "99999999"
                            End If

                            sResult = "Reading Cell {" & CStr(iRow) & ", " & CStr(iCol) & "}^" & sCellText & "^" & CStr(iCellInteriorColorIndex) & "^" & sFontName & "^" & CStr(sFontStyle) & "^" & CStr(iFontSize) & "^" & CStr(iCellTextColorIndex)

'                            Call LogWrite (gsLogFile, sResult)
                            MyFile.WriteLine(sResult)

                    End If

                    Set objCurrentCell = Nothing


            Next

    Next
    MyFile.Close
   
    objExcel.ActiveWorkbook.Saved = True
    Set CurrentWorkSheet = Nothing
    objExcel.Quit
    Set objExcel = Nothing
End Function   
Read More


Monday, May 3, 2010

Stored Functions in SQL Server?

A function always return a value,and it is called inside the sql statements like normal functions.

Examples:

CREATE FUNCTION CALC_AVERAGE (n1 INT, n2 INT)
  RETURNS INT
   DETERMINISTIC
    BEGIN
     DECLARE avg INT;
     SET avg = (n1+n2*2+n4*4)/8;
     RETURN avg;
    END|
Read More


What is Stored Procedure in SQL Server?

Stored Procedures:

Stored procedures are extremely similar to the constructs seen in other programming languages.
They accept data in the form of input parameters that are specified at execution time.

Benifits of Stored Procedures:
1. PreComplied execution
2. Efficient reuse
3. Enhanced security controls

Example:
 CREATE PROCEDURE sp_GetQuantity
 @Name varchar(10)
 AS
 SELECT Product, Quantity
 FROM Product_Table
 WHERE Product = @Name

For executing the above Procedure:
  EXECUTE  sp_GetQuantity 'A7'
Read More


What is Index in the databases?

Index is a set pointers reference to the specific row in the table.It will make Sql search as much more fast.
 
  Example:
  CREATE INDEX IndexName
  ON TableName (ColumnName1,ColumnName2).

For More information:
http://www.databasejournal.com/features/mysql/article.php/1382791/Optimizing-MySQL-Queries-and-Indexes.htm
Read More


Thursday, April 29, 2010

Difference between Subquery and Joins?

Sub query is also query which returns one or more values,we
can retrieve the data based on the condition...

Join is used to join the two tables and used to retrieve the
data from one or more tables.
Read More


What is Primary and Foreign key in databases?

Primary key:
   Each table can have one primary key, which uniquely identifies each row in a table and ensures that no duplicate rows exist.
 
   Foreign Key:
   On whichever column you put FOREIGN KEY constraint then the values in that column must refer to existing values in the other table. A foreign key column can refer to primary key or unique key column of other tables.
Read More


Wednesday, April 28, 2010

Explain about the following things in Databases?

1. What is foreign key and Primary key , how do you differentiate?
2. What is Index in the table?
3. How do we differentiate producer and function in Database?
4. What is trigger in Databases?
Read More


what is view in SQL Server?

A view is a virtual table that consists of columns from one or more tables. Though it is similar to a table, it is stored in the database. It is a query stored as an object. Hence, a view is an object that derives its data from one or more tables. These tables are referred to as base or underlying tables


syntax:
CREATE VIEW vwCustomer
AS
SELECT CustomerId, Company Name, Phone
FROM Customers


For more information, see the below link..



http://www.sql-server-performance.com/articles/dev/views_in_sql_server_p1.aspx
Read More


Thursday, April 8, 2010

How to take backup in oracle?

 For Exporting the Database :
exp file=RPM62B13.dmp userid=devusr/Usrdev1234@RPM62B13.symphonysv.com fully=y
log=AgileExpBackup.log

For Exporting the tables :
exp  file=empdept.expdat  userid=devusr/Usrdev1234@RPM62B13.symphonysv.com tables=(EMP,DEPT) log=empdept.log
Read More


Drop and truncate in Database?

drop table tablename;
  It will  delete per-mentally the table and data.
 truncate table tablename;
  it will delete the data from the table.
Read More


How to copy the table in oracle?

  •  Copy the table structure with data
        create table emp_copy as
          select *
            from Employee;

  •   Copy the table structure with out data  
            CREATE TABLE Table2 AS 
               SELECT * FROM Table1 WHERE 1=0;
       Note: if condition is not validating then it wont copy the data. 
  •  Copying selected columns from another table
                   CREATE TABLE newTable
                        AS (SELECT empno, ename
                                    FROM emp);
Read More


constraints in Oracle

They are five integrity constraints are available in Oracle.
  1. Not Null
  2. Primary key
  3. Foreign key
  4. Check
  5. unique    
For more information , Refer the following URLs
 http://www.oracle-dba-online.com/sql/integrity_constraints.htm

Read More


Monday, March 15, 2010

Skills Required For Automation Engineer?

  1. Automation tool knowledge (Silk Test, QTP)
  2.  Unix/Linux user level commands & Shell scripts
  3. DB concepts & Oracle SQLPlus queries
  4. QA&QC Concepts
  5. Manual Testing technique (including, Write TCs, Log issues and QA Metrics). 
  6. Last but not least, soft skills especially spoken English should be strong.
Read More


Tuesday, March 9, 2010

To list out all files under Folder and Sub Folders in Windows ?

   Command : dir /s /B
Read More


Monday, March 8, 2010

What is the use of opt and ini file?

Ini file is specific to that project. Instead of creating the two project like IE6.vtp and IE7.vtp, user can reset the default options through the opt file.

Another way of looking at option files is to look at the partner.ini file. This file contains all of the options (Agent, Runtime, Extensions, ect.) that get loaded when you start up SilkTest. An .OPT file is an .INI file that contains items from the partner.ini file that you want to have changed when you open that option set.
 
Why? -- Suppose you have 2 projects that you work on. Each have different extensions being used and frame files used. Instead of manually typing the frame file into the Use Files part of the Run time Option dialog each time you want to switch to testing another app, you could have all the options you need stored in an .OPT file.

  To open the .opt file
    1. open the silk test
    2. Navigate to the options menu and click the open new options set.
   
  For Example:
    Excel 2003 and 2007  -- Change or reset the extensions through the opt file.
Read More


Where help files are located in Silk Test?

4test.inc This file have all default types information and Browser type related information
4Test.t Have information about the all liberties methods and functions. if user update the 4 Test.t file
, it will update the library browser.
4test.help default Chm file type.
Read More


Thursday, March 4, 2010

Define FrameWork and Types of Framework?

Framework may be designed as a set of abstract concepts, processes, procedures and environment in which automated tests will be designed, created and implemented.this framework definition includes the physical structures used for test creation and implementation, as well as the logical interactions among those components.

It is Classified as
  1. First Generation Frame work
      a. Linear Frame Work
  2. Second generation Framework(hybrid Framework)
      b.Functional Decomposition
      c.Data Driven Framework
  3.Third Generation Frame Work
      d.Key word Driven Framework
  4.Fourth Generation Frame Work
      e.Model Based Frame Work.

For Detail:
http://www.automatedtestinginstitute.com/home/index.php?option=com_content&view=article&id=69:frameworks-introduction&catid=91:frameworks-introduction&Itemid=75
Read More


Wednesday, March 3, 2010

How do we represent the bussiness logic ?

Bussiness logic may be represented by following ways
  • Flow Chart
  • Decision table
  • State machine
  • Use case
Read More


how do we combine the various test values for each test data element?

1. Exhaustive
2.one data at time
3.Deductive / analytical
4.orthogonal arrays.
Read More


Types of test data design techniques?

1. Boundary Value analysis
     Test the planned limits of the software. Test the valid ,last possible and invalid data just outside the boundary.
    Boundary types;
  • numeric
  • Character
  • Position
  • Quantity
  • Speed
  • location
2. Equivalence partitioning

     An equivalence class or partition is a set of test cases that test the same thing or revals the same bug.

3. special value

     select the test data on the basis of features of a function tester use the domain knowledge or prior experience or error guessing.

4. Error based

Generate the test cases based on
  • programmer histories
  • programmer complexity
  • knowledge of error prone syntactic construct
Guess error based on data type

5. Input/output domain.
  • Looking from input sides , generate inputs to map to outputs
  • also ensure that you look from output side to ensure that you have generated all possible inputs.
Read More


Types of Test Design techniques?

1.use specification
2.use structure of code
3.Use past historical data
4.learn from each test execution cycle( domain knowledge)
Read More


Define Test Scenario:

Test scenario is a thread of operational use at any level of testing.
  1. At system level , the operational use is one such use/abuse by the end customer
  2. Scenarios are long at system level and short at unit test level.
Example ;Login screen

TS1 : Ensure that an invalid user is disallowed tobe logged in
  1. tc1: invalid name - Name is null
  2. tc2: name is too long
  3. tc3: name contains illegal character
  4. tc4: name is not a registered user name.
Read More


Define Testcase:

Testcase may be defined as an input-output pair with an expected result.
Read More


How to set the recoverysystem in Silk Test?

To set the recovery system:
  • Make sure the application that you are testing is running.
  • Click Set Recovery System on the Basic Workflow bar. If the workflow bar is not visible, choose Workflows/Basic to enable it.
  • From the Application list, click the name of the application that you are testing. All open applications that are not minimized are listed. This list is dynamic and will update if you open a new application. If you are connected to the Open Agent, only those applications that have extensions enabled display in the list.

  • If you selected a non-Web application as the application: the Command line field displays the path to the executable (.exe) for the application that you selected.the Working directory field displays the path of the application you selected.
  • If you selected a Web application, the Start testing on this page field displays the URL for the application you selected. If an application appears in the list, but the URL does not display in this field, your extensions may not be enabled correctly. Click the Enable Extensions button in the Basic work flow bar to automatically enable and test extension settings.
  • Optionally, in the Frame file name field, modify the frame file name and click Browse to specify the location in which you want to save this file. Frame files must have a .inc extension. By default, this field displays the default name and path of the frame file you are creating. The default is frame.inc. If frame.inc already exists, SilkTest appends the next logical number to the new frame file name; for example, frame1.inc.
  • Optionally, in the Window name field, change the window name to use a short name to identify your application.
  • Click OK.Click OK when the message indicating that the recovery system is configured appears.
  • A new 4Test include file, frame.inc
Note: Source taken from Borland help
Read More


To load and Run Silk test From Command Propmt

To load SilkTest, type:
partner

To run the test.s suite, type:
partner -r test.s on system "sys1"

To run the test.t script, type:
partner -m sys1 -r test.t

To run the test.t script with arguments, type:
partner -r test.t arg1 arg2

To run the tests marked by the query named query3 in tests.pln, type:
partner -query query3 -r tests.pln

To run tests.pln, and export the most recent results set from tests.res to tests.rex, type:
partner -q -resexport -r tests.pln

To edit the test.inc include file, type:
partner test.inc
Read More


How to read and Write data from Text File using Silk Test?

Silk Test is providing Default functions to read and write data into text Files.
For Reading data from Text File:
ListRead (lsList, sFileName, frType)
Note : Each item in the list can be a maximum of 512 characters.-
For Writing data into Text File:
ListWrite (lsList, sFileName, ftType)


But if you want to update the data into Text file. user has to write new functions for that.
Function writedataintotextFile(sFileFullPath,lsTest)
{
 HFILE hNoteFile
 Int iCount
 List of STRING lsTest

 hNoteFile =FileOpen(sFileFullPath,2) // 2 For Write , 3:Update 1: Read
 for iCount =1 to ListCount(lsTest)
   FileWriteLine (hNoteFile,lsTest[iCount])
 FileClose (hNoteFile)
}
Read More


Thursday, February 11, 2010

DataBase with Silk test ?

    [ ]    STRING sDeptName
    [ ]    HDATABASE hdbc
    [ ]    HSQL hstmnt
    [ ]  LIST of ANYTYPE lATemp
    [ ]
    [-] do
        [ ]
        [ ]    // connect to SQL 2000 Server Test DB
        [ ]    hdbc = DB_Connect ("dsn=RPM611B1;PWD=Usrqa1234;UID=qausr")
        [ ] 
        [ ]    // retrieve info from Department table
        [ ]    hstmnt = DB_ExecuteSql (hdbc, "SELECT * FROM GROUP_MASTER")
        [ ] 
        [ ]    // process the information that came back
        [ ]    print ("Here's the info in the Department table:")
        [ ]    print (hstmnt)
        [+] //    while (DB_FetchNext (hstmnt, id, sDeptName, sDeptName))
            [ ] //   print ("Dept: {id}  Name: {sDeptName}  Head: {iheadID}")
        [-] while (DB_FetchNext (hstmnt, lATemp))
            [ ] resprintList("List",lATemp)
            [ ]
        [ ] 
        [ ]    // release resources (unneeded really
        [ ]    // because immediately followed by disconnect)
        [ ]    DB_FinishSQL (hstmnt)
        [ ] 
        [ ]    // disconnect
        [ ]    DB_Disconnect (hdbc)
    [+] except
        [ ] ExceptLog()
Read More


Wednesday, February 3, 2010

When Browser Content are not identified , Please Check the Tools Options?

Solution 1:
  1.  Navigate to Tools -> Options and Advanced tab.
  2. In browsers Check the options : Enable third- party browser extensions 
Solution 2:
  1.  Navigate to Tools -> Options and Programs -> Manage addons tab.
  2. In add on list enable the borland  "QAPHLprObj class" add on.
Read More


560 Free Online Courses

Top 200 universities launched 500 free online courses.  Please find the list here .