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.

Wednesday 23 May 2018

When to Stop Testing and Testing Completion Criteria

Testing should be stopped when it meets the completion criteria. Now how to find the completion criteria? Completion criteria can be derived from test plan and test strategy document. Also, re-check your test coverage.
Completion criteria should be based on Risks. Testing should be stopped when - 
  • Test cases completed with certain percentage passed and test coverage is achieved.
  • There are no known critical bugs
  • Coverage of code, functionality, or requirements reaches a specified point;
  • Bug rate falls below a certain level, now testers are not getting any priority 1, 2, or 3 bugs.
As testing is a never ending process we can never assume that 100 % testing has been done, we can only minimize the risk of shipping the product to client with X testing done. The risk can be measured by Risk analysis but for small duration / low budget / low resources project, risk can be deduced by simply: - 
  • Measuring Test Coverage.
  • Number of test cycles.
  • Number of high priority bugs.

Write a VB Script to check whether a given number is prime or not?



Method-1

a = cint(Inputbox("Enter a number to check whether it is a prime number or not"))
count = 0
b = 1
Do while b<=a
aaaif a mod b = 0 Then
aaaaaacount = count +1
aaaEnd If 
b=b+1
Loop
If count = 2 Then
aaamsgbox "The number "&a& " is a prime number" 
Else 
aaamsgbox "The number "&a& " is not a prime number"
End if


Method-2


val=Inputbox("Please enter any number")
valprime = 0
For i=2 to Int(val/2)
aaaIf val mod I = 0 Then
aaamsgbox "The number"&val&" is not a prime number"
aaavalprime=1
aaaExit for
End If
Next
If valprime=0 Then
aaamsgbox "The number"&val&" is a prime number"
End If



Tuesday 22 May 2018

Difference between Action and Function?

♦ Action is a collection of Vb statements in QTP. It does not return any values.Function collection of Vb statements in QTP. It returns single value.
♦ We can call functions within actions but we can't call actions within functions
♦ Generally functions are saved with ".vbs" extention where as actions will save with ".mts".
♦ Every Action will have its own Datatable where as function does not.
♦ Action can have a object repository associated with it while a function can't. A function is just lines of code with  some/none parameters and a single return value while an action can have more than one output parameters.
♦ Action can contains Object Repository, Data table, Active screen etc. whereas function do not have these features.
♦ Action is internal to QTP whereas Function is just lines of code with some/none parameters and a single return value.
♦ Action can/can not be resuable whereas functions are always reusable.
♦ Action Parameter have default values whereas VB script function do not have any default values.
♦ Action parameter type are byvalue only where vbscript functions can be passed byref.
♦ Action can have multiple output(returning) values whereas function can return only single value.