Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Monday, 19 October 2015

What is ISTQB

The International Software Testing Qualifications Board (ISTQB) is a software testing qualification certification organisation that operates internationally. Founded in Edinburgh in November 2002, ISTQB is a non-profit association legally registered in Belgium.
ISTQB Certified Tester is a standardized qualification for software testers and the certification is offered by the ISTQB. The qualifications are based on a syllabus, and there is a hierarchy of qualifications and guidelines for accreditation and examination. The ISTQB is a software testing qualification certification organization having over 350,000 certifications issued; the ISTQB® consists of 49 member boards worldwide representing 72 countries (date: June 2014).
Currently ISTQB® provides three levels of certification:
1.ISTQB Fundation level
2.ISTQB Advance Level 
3.ISTQB Expert Level

Note: More Details Click Here


ISTQB

Friday, 16 October 2015

QTP/UFT vs Selenium vs Selenium (Webdriver)

1. Licence type
QTP/UFT - Commercial software (Concurrent and per user licence)
Selenium - Open source.
Webdriver - Open source.
2. Software size
QTP/UFT - Around 1.5GB
Selenium - Set of Libraries, around 20MB (Need to include other supporting software)
Webdriver - Set of Libraries, around 20MB (Need to include other supporting software)
3. Software Support
QTP/UFT - From HP
Selenium - 
Saucelabs.comElement34 , Commercial Support
Webdriver - Same as Selenium
4. Identifying objects.
QTP/UFT -  Object properties, Repository objects
Selenium - Html ID, xPath, CSS, DOM, Link text
Webdriver - Html ID, xPath, CSS, DOM, Partial Link text, Class Name
5. Spying object
QTP/UFT - GUI Spy/API Spy
Selenium - There is no option, can record script in Selenium IDE, can spy objects using IE developer tool bar, FireBug and also using 
http://saucelabs.com/builder
Webdriver - Same as Selenium, there is no option of recording the scripts. With the introduction of built in developer tool bar from IE8 made thing easy for IE.
6. Scripting language
QTP/UFT - VB Script, C#(UFT API tests)
Selenium - Any language HTTP library (Java, C#, Python, Ruby...)
Webdriver - Java, .Net, Python, Ruby, Node JS
7. Environment.
QTP /UFT- Windows, MacOs
Selenium - Windows, OS X, Linux, Solaris.
Webdriver - Windows, Mac, Linux, iOS, Android
8. Browsers supported
QTP/UFT - IE, Firefox (Run scripts),safari,Chrome
Selenium - IE, Firefox, Safari, Opera
WebDriver - IE, Firefox, Safari, Opera, Chrome, Android, iPhone

11. Identifying objects
QTP/UFT - Browser.Page.Object.Method for each step.
Selenium - Directly execute methods, no browser page reference required.
WebDriver - Directly execute methods, no browser page reference required.

12. Debugging code (Setting breakpoints in the code)
QTP/UFT - Yes
Selenium - No (Need to read logs and understand the error)
Webdriver - No (Write wrapper around webdriver listener to read logs, from 2.15 it is automatically generating logs)

13. Control Opened browsers (Attach to running browsers)
QTP/UFT - Yes (Opened after QTP program)
Selenium - No (Session information is lost) .
Webdriver - No (Fix in Progress)

14. Supporting Applications
QTP - Web applications, SAP, Activex, VB, Windows...(Support provided using Addins)
Selenium - Only Web application.
Webdriver - Only Web application.

15. As performance testing tool
QTP/UFT - No, you can run one QTP application in one CPU.
Selenium - It can open many many browsers using GRID, many companies line PushToTest, BrowserMob, Gomez use selenium technology for running load test.
Webdriver - Same as Selenium, now we have GRID2.

16. Current Version
QTP/UFT – 12.5(
July 2015)
Selenium - 2.0
Webdriver - 2.48

17. Object not found timeout
QTP/UFT - It will wait till the timeout happen.
Selenium - If browser status is Done, it will through exception. In some cases it will wait for time out.
Webdriver - Same as Selenium, It has implicit and explicit timeouts.

18. Execute JavaScript
QTP/UFT - Yes
Selenium - Yes
Webdriver - Yes

19. Access page DOM
QTP/UFT - Yes
Selenium - Yes
Webdriver - Yes

20. Flex objects
QTP/UFT - Yes
Selenium - Yes  Selenium Flex
Webdriver - Yes  Selenium Flex

21. Scripting complexity
QTP/UFT - Simple, but implementing framework is complex.
Selenium -Simple, but implementing framework is complex.
Webdriver - Simple, but implementing page objects is slightly complex.

22. Cost
QTP - 9K USD per user (Approx) + Annual maintenance charges.
Selenium - FREE (Any number of users...)
Webdriver - FREE (Any number of users...)

23. IDE
QTP/UFT - Own IDE
Selenium - Any IDE (I prefer Eclipse)
Webdriver - Any IDE (I prefer Eclipse)

24. Flavors
QTP/UFT – QTP/UFT with different Add-in's


Selenium - Selenium core, Selenium IDE, Selenium RC, Selenium GRID.
Webdriver - Webdriver, GRID2.

25. Extendability
QTP/UFT - No
Selenium - Yes, you can customize and implement for new browsers.
Webdriver - Same as Selenium.

26. Exception Handling
QTP/UFT - Need to handle manually. Using .Exist, On error resume next, recovery scenarios. Script would stop in the middle by throwing run-time error if not handled properly. Programmer should have complete understanding where to use exception handling, else he suppress real errors.
Selenium - Handled automatically when used with TestNG, it will automatically move to next test case and user can implement Try...Catch to handle specific exceptions.
Webdriver - Same as Selenium. It has some extra exceptions like NoElementFound where code can be handled in a better way.

27. Reporting and Assertions(Checkpoints)
QTP/UFT - Reporting and checkpoints are built in the same package.
Selenium - Need to depend on testing frameworks like TestNG or Junit.
Webdriver - Same as Selenium.

28. Recording the script
QTP/UFT - Built in recorder that can generate script on IE.
Selenium - Selenium IDE as Firefox add on.
Webdriver - No

29. Script Execution
QTP/UFT - Just hit Run button.
Selenium - Need to run Selenium Server and it opens a separate window apart from the browser.
Webdriver - Just hit play button.

30. Page synchronization
QTP/UFT - Use .Sync method  to check the page load for every page navigation.
Selenium - Use Wait for page load. 
Webdriver - It is handle automatically, no method is required. 
 31. Handle AJAX calls
QTP/UFT - Manual
Selenium - Manual
Webdriber - Manual

32. XPath Support (Awesome technique to locate elements when there is no id or name)
QTP/UFT - Yes
Selenium - Yes (Very slow on IE)
Webdriver - Yes

33. Accessing windows objects (Folders, Excel, Notepad)
QTP/UFT - Easy (As it is developed in VB script native windows script. I hope this is one of the reason why qtp selected VB Script)
Selenium - Not so easy, need to depend on open APIs.
Webdriver - Same as selenium.

34. Code base
QTP/UFT - Huge, storing Actions occupy lot of space and more number of files. I prefer creating code in function libraries only (.vbs, .txt, .qfl)
Selenium - Small, text file with .java extension. Suitable with any configuration management tools.
Webdriver - Same as selenium.

35. Executing test on different systems
QTP/UFT - Need to setup QTP/UFT and copy the code execute it.
Selenium - Using ANT it is possible to compile into standalone jar file, so that it is easily executed from the command prompt.
Webdriver - Same as selenium.

36. APIs
QTP/UFT - Each object has methods and properties. QTP classified the objects into (WebEdit[Textbox], WebButton, WebList, WebRadio Button....). Objects are classified into Windows, Web, People soft, SAP, Visual Basic, Activex...., need to add extra licensed programs called Addin for supporting of the corresponding objects. Addin program can help QTP/UFT to identify the properties in specific environment. To identify an object on the screen, need to provide properties. Properties are classified into Mandate, Assistive and ordinal properties.

Selenium - Directory based API, all methods exist in one class. It is a table based API that contain 3 columns
Note: Browser, Page details are not required; its reference is automatically handled by Selenium session.
Webdriver - Complete OOPs.

37. Number of Methods
QTP/UFT - Each object has certain methods, most of the methods are unique like Set, Click, Select...
Selenium - Few methods.
Webdriver - You can complete most of the script using click and SendKeys.

38. Object Repository (Object information is stored separately during recording and can be edited if required)

QTP/UFT - Yes. Also provide option to define objects at code level called descriptive programming (DP).
Selenium - NO, only through code.
Webdriver - NO, only through code.

39. Page Objects Implementation
QTP/UFT - VB script don't supports complete OOPs, but can be achieved with Dual-Function Framework.
Selenium- I think no, it is not possible to move Selenium session from one class to another, but methods can be grouped as per the page by extending the Selenium interface.
Webdriver - Yes, support complete OOPs. (Planning to write a new post on this with an example).

40. Synthesizing events on the page
QTP/UFT - Synthesize events on DOM.
Selenium - Synthesize events on DOM.
Webdriver - Type looks very realistic as though real user is typing. I think they are sending the events to IE instance message queue. (Need to understand the technique used)
Over all comparison:
QTP -
Browsers - (IE/Firefox)
OS - (Windows)
Scripting - (VB Script)
Licence - ($8000 per user)

Webdriver -
Browsers - (IE, Firefox, Safari, Opera, Chrome, Android, iPhone),
OS - (Windows, Mac, Linux, iOS, Android)
Scripting - (Java, .Net, Python, Ruby, Node JS)
Licence - Free


VBS WebDriver

Selenium web driver supports a wide variety of client drivers implemented in different languages,but it does not support Vb script client drivers which is playing a key role in QTP/UFT automation. UFT and Selenium are the two widely used functional automation tools which are always different(in terms of licensing ,the languages they support for scripting). But now "VBS Webdriver" is an api used to implement selenium web driver using VB script(Now This is common for UFT & Selenium:)). Now one can automate their application using selenium ,choosing vbscript as their scripting language.

NOTE: For more details Click Here

Thursday, 15 October 2015

General UFT Interview Questions

1) You have some new releases and bug fixes in working module. So how will you ensure that the new bug fixes have not introduced any new bug in previous working functionality?
You need to test the previous functionality also. So will you test manually all the module functionality every time you have some bug fixes or new functionality addition? Well you might do it manually but then you are not doing testing effectively. Effective in terms of company cost, resources, Time etc. Here comes need of Automation.

– So automate your testing procedure when you have lot of regression work.
2) You are testing a web application where there might be thousands of users interacting with your application simultaneously. How will you test such a web application? How will you create those many users manually and simultaneously? Well very difficult task if done manually.
– Automate your load testing work for creating virtual users to check load capacity of your application.
3) You are testing application where code is changing frequently. You have almost same GUI but functional changes are more so testing rework is more.
– Automate your testing work when your GUI is almost frozen but you have lot of frequently functional changes.


Thursday, 8 October 2015

Can we use GetRoProperty method to get index or location of link in web application??

Answer : Yes



What is the difference between Repository Parameter and Repositories Collection ??

Repository parameters are enable you to specify that certain property values should be parameterized, but leave the actual parameterization to be defined in each test that is associated with the object repository that contains the parameterized test object property values.

Repository parameters are useful when you want to create and run tests on an object that changes dynamically.

Repositoriescollection is a collection of object that enables you to programmatically manage the run-time collection of shared object repository files associated with the current action.


Can i record a web based application on Mozilla??

We can record but not as a web applications but a standard windows application

example:


Window("Mozilla Firefox").WinObject("MozillaWindowClass").Type "uft"


How can you execute javascript on QTP/UFT??

First we have to go this link 

HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Configuration_UI\ScriptMgr

Create a new String value with name AltProgID and value "Mercury.JSScriptMgr" and change the value of "Create" to 1

Create a new child key inside the key
HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Configuration_UI\ScriptConstants
{0ECD5785-BE7D-11d4-8EAF-11135659EC56}

Repeat the same steps for the below key
HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Configuration

Open
C:\Program Files\Mercury Interactive\QuickTest Professional\bin\QTEditor.ini
Add the below parameter to [General options]
AllowJavaScript = 1
DisableVBScript = 1


What are the disadvantages of smart identification.??

There are many out of which is time consuming it eats lot of time and some times it yields wrong results also in case of dynamic environment.


If u enable smart identification when particular object description is mismatched it will take much time to recognize that object. And for identifying which object decryption is mismatched we have to verify the qtp results.

If disable smart identification qtp will through error in that particular statement



Tuesday, 6 October 2015

Commonly asked Question from Vb-Script

1. Given Number is Prime or not?

Maths: A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself.
Logic: Starting from 2 divide the given number till half of the number, if the remainder is zero then the number is not a prime number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
userInput = Inputbox ("Enter any number")
i=2
Do While i < userInput/2
    If userInput Mod i = 0 Then
        flag = 1
        Exit Do
    End If
    i=i+1
Loop
If flag = 1 Then
    Msgbox userInput & " is not a Prime number"
Else
    Msgbox userInput & " is a Prime number"
End If
Output:
5 is Prime number

2. Find the factors of a given number?

Maths: The factors of a number are all those numbers that can divide evenly into the number with no remainder.
Logic: starting from 1 divide the given number till half of the number, if the remainder is zero it is a factor of the given number.
1
2
3
4
5
6
7
userInput = Inputbox ("Enter any number other than Prime number")
For i = 1 to userInput/2 
    If userInput Mod i = 0 Then 
        print i 
    End If 
Next 
print userInput
Output:
1
2
4
5
8
10
20
25
40
50
100
200

3. Find factorial of given number?

Maths: Factorial is the product of all the numbers from 1 to n, where n is the user specified number.
1
2
3
4
5
6
factorialValue = 1
userInput = Inputbox ("Enter any number")
For i = 1 to userInput
    factorialValue = factorialValue * i 
Next 
Msgbox  factorialValue
Output:
120

4. Find greatest of three numbers?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
number1 = Inputbox ("First number: Enter any postive number")
number2 = Inputbox ("Second number: Enter any postive number")
number3 = Inputbox ("Third number: Enter any postive number")
 
If number1 > number2 AND number1 > number3 Then
    Msgbox "First number: " & number1 & " is greatest"
 
ElseIf number2 > number1 AND number2 > number3 Then
    Msgbox "Second number: " & number2 & " is greatest"
 
ElseIf number3 > number1 AND number3 > number2 Then
    Msgbox "Third number: " & number3 & " is greatest"
 
Else
    Msgbox "All numbers are equal"
End If
Output:
Second number: 587 is greatest

5. Swap 2 numbers without a temporary variable
1
2
3
4
5
6
7
8
9
10
11
12
number1 = Inputbox ("First number: Enter any postive number")
number2 = Inputbox ("Second number: Enter any postive number")
 
Print "Before swapping number 1: " & number1
Print "Before swapping number 2: " & number2
 
number1 = number1 - number2
number2 = number1 + number2
number1 = number2 - number1
 
Print "After swapping number 1: " & number1
Print "After swapping number 2: " & number2
Output:
Before swapping number 1:45
Before swapping number 2:65
After swapping number 1:65
After swapping number 2:45

6. Write a program to find sub datatype of a variable

1
2
3
4
5
6
7
8
9
10
11
12
13
14
userInput1 = 44
Msgbox TypeName(userInput1)
 
userInput2 = "44"
Msgbox TypeName(userInput2)
 
'Anything in the double quotes is considered as string.
'For integers Don't use double quotes
 
userInput3 = "TestNBug"
Msgbox TypeName(userInput3)
 
userInput4 = True
Msgbox TypeName(userInput4)
Output:
String

7. Write a program to generate Random Number

We have a predefined formula for random number generation
You need to enter the minimum and maximum limits.
1
2
3
4
5
min = 1
max = 100
Randomize
rNumber = Int((max-min+1)*Rnd+min)
Msgbox rNumber
Output:
66