Wednesday, 24 July 2013

QTP- When to associate a library file with a test and when to use execute file?

When to associate a library file with a test and when to use execute file? 

 

  • When we associate a library file with the test, then all the functions within that library are available to all the actions present in the test.
  • When we use Executefile function to load a library file, then the function are available in the action that called executefile. 
  • By associated a library to a test we share variables across action (global variables basically), using association also makes it possible to execute code as soon as the script runs because while loading the script on startup QTP executes all the code on the global scope.
  • We can use executefile in a library file associated with the test to load dynamic files and they will be available to all the actions in the test.

QTP AOM Script : Launch QTP, Create new test and Save it


QTP AOM Script : Launch QTP,  Create new test and Save it
===============================================
dim qtpapp

set qtpapp=createobject("quicktest.application")

qtpapp.launch

qtpapp.visible=true

qtpapp.new

qtpapp.test.saveas "C:\qtpapp"

qtpapp.visible=true

qtppapp.quit

set qtpapp=nothing


Spring Boot : Exception Handler 14