Sanity Testing V/S Smoke Testing

Following are the difference between sanity and smoke testing:-


Sanity Testing

Smoke Testing

Subset of Regression Testing.

Subset of Acceptance Testing

Used when bug fixes happen

Used when new build is delivered

Checks whether the bug fixes hasn’t affected the existing functionality of 
the AUT

Checks whether we can go with rigorous testing of the new build

Coverage is deep and narrow, so one-more components can-be tested 
thoroughly.

Coverage is wide and shallow, so most component can be tested

Verify that requirements are met

Verify normal health of the build for testing it

Regression v/s Re Testing 

How we can load function libraries at Runtime in UFT?

Loading function libraries at runtime was introduced in QTP-11. This feature enables loading of libraries when step runs instead of at the beginning of Run session.

This is helpful incase you need only particular set of function libraries based on the environment of AUT.

For example:- we are doing localization testing of our AUT, so instead of associating all the function libraries to the test, we’ll use only required set of libraries based on localization of AUT and that will be added at the run time.

Loadfunctionlibraries at Runtime in UFT


Syntax:-
LoadFunctionLibrary (Path of the function library)



Example:-

‘Loading function libaries based on the localization of AUT
Dim sLocal
‘Tkaing value of AUT Enviornment from Datatable or external database
sLocal= DataTable(“Enviornment_AUT”,1)

‘Based on the enviornment concerned library will be laoded at runtime
If sLocal=“Dutch” Then
    LoadFunctionLibrary(“C:FunctionsDutch.qfl”)
Else
    LoadFunctionLibrary(“C:FunctionsEnglish.qfl”)
End If

Important:-

  • As we are adding this at Runtime, so it wont be visible in Resources,Missing Resources,To do panes
  • Performance of UFT can be affected as Function libraries are getting loaded at Runtime
  • At the end of Run, all the dynamically loaded libraries are unloaded.
  • Incase function Name is same inthe associated and dynmically loaded libray than Dynamically loaded function will be given preference
  • Another way of loading libraries at runtime is using “ExecuteFile” statement in vbscript.
  • ExecuteFile “C:Functions.vbs” (Now all the functions inside this file are available for usage in the script)

Dictionary v/s Array?


What is the difference between Dictionary and Array?

Solution:-

1.For using Dictionary, we need to create its object using “CreateObject“, method, while Array is declared like normal variables using “Dim

Example:-

Creating Dictionary Object
Set obj = createobject(“scripting.dictionary”)

‘Declaring array 
Dim arr(0)


2.Dictionary is more flexible and is richer in terms of built-in functionality. (It has range of methods and properties like Items, remove, Keys,Exists)

Example:-

‘Creating Dictionary Object
Set obj = createobject(“scripting.dictionary”)
‘Using Add methods to add values to dictionary object
obj.Add “UFT”,“2012”
obj.Add “QTP11”,“2010”
obj.Add “QTP10”,“2009”


3.Dictionaries also work better when you want to locate items by their content rather than their position, so we use item property

Example:-

‘Locating items in Dictonary

MsgBox obj.item(“UFT”)

4.Array uses ReDim to vary the size while we don’t need this in  dictionary’s .

‘Declaring array 
Dim arr()
‘Resizing Array
ReDim arr(1)
arr(0) = “UFT”
arr(1) = “QTP11”
msgbox arr(0)

5.When you delete a particular item from a dictionary, all the subsequent items automatically shifts up

6.Most important of all is that Array can have index only as numeric (0,1,2..) while we can  use keys to identify dictionary items and Keys can be of any data subtype(String,integer), except an array or dictionary.

7.Dictionary can’t be multidimensional like Array’s


For more information on Dictionary object:-

Example Scenario’s

Interview Questions on Array’s?


Interview Question on Arrays in UFT

Please find some of the Questions related to Array’s in vbscripting :-


1. How many types of Array are there?

2. Can we redefine the index of an Array?


3. What is the difference between an Array and Dictionary Object?


4. How can we get lower index and upper index of an Array?


5. If Array is of index 10, how many variables it can store?


6. What will be the output of following code :-


Dim arr(3)
For i = 0 to 3
 arr(i) = i+1
Next
Msgbox arr(4)


7.Write a code for assigning values to a 2-D array?


8.Why we use “Preserve” keyword in Array?




More Interview Questions?

Interview Questions-Part-6

In one of the interview i was asked to write test cases on “Credit Card“, thought of sharing with testing community , please feel free to add and extend the cases.

Contact :- info@uftHelp.com






Physical appearance/Usability:- 
  • Test the color and size of the card
  • Bank name/type of card(Titanium,platinum)
  • Credit card number (16 digit)
  • Card provider (Master card/Visa card)
  • Name of the user on card, validity dates
  • 24 hour customer support numbers
  • Magnetic strip should be at proper place
  • Material used for card should not be harmful
  • Credit card width, height so that it can be swiped into card reader machine
Functionality:-
  • Credit card asks for pin after swiping into card reader
  • In case credit limit for month/day has reached no transaction is possible
  • On complete transaction, bank database is getting updated
  • On debit of amount phone message is received
  • In case card is blocked by user, it should not work
  • Expired card/broken strip doesn’t initiate transaction
  • Incase card has chip facility then both dip and swipe should work
  • Online transaction,  using paypal flow, try negative cases
    • Invalid credit card number/Expiry date
    • Session expiry


Image-based object identification in UFT(Insight Recording)

This is my first video on UFT, hope all the automation lovers gain something into the practical aspect of new feature (Image based identification ).

Please share your feedback or suggestions on info@uftHelp.com.

Sorry friends voice quality is not as good, i need to improve on my recorder thing .


Just a Brief summary of topics discussed:-

What is insight and how image based identification works. 

When to use this Feature:

  • UFT does not recognizes the AUT
  • Running on remote machine or non windows platform 


 Important points:– 


Example:

Browser(“Flash Calculator”).InsightObject(“imgsrc=:C:Users…Desktopufthelpcom.png”,”Index:=0”)
.Click




Learn object Spy
Selenium Tutorials

Mobile Testing in UFT?

For supporting Mobile testing in UFT , ExperiTest team came up with “SeeTest” addin .


This is a licensed addin and when selected in Addin Manager, it enhances the capablities of UFT to work with various mobile testing platforms

Key Highlights of this Addin are :-



  •   Extend UFT (QTP) to testing & monitoring of mobile devices
  •  Android, iOS, Blackberry and WindowsPhone – fully supported
  •  Test creation and editting from within UFT
  •  Object repository resides inside UFT
  •  Object identification done by the object properties
  •  Native, Web, Image and Text object properties supported – for all mobile platforms 
  •  Reports fully integrated including images of the actual physical device
  •  QC full integration
  • For more on SeeTest
  • 10 Day Trail is available
  • Detailed Document





How to check version of VB-Scripting?

Please follow the below steps to check which version is available on your systems operating system:-
Step1:- Go to “Start” >  in “Search program files” type “Vbscript.dll”

Vbscript version on your system, go to start and search vbscript
Step2:– Right click on “Vbscript.dll” > “Properties” > “Details”

Latest version of Vbscript on your system     
Windows-7
Latest version of Vbscript on windows 8
Windows-8