Why do we need to launch the application under test (AUT) after QTP is launched?
Have you ever wondered why do we need to launch the application under test (AUT) after QTP is launched?
When I started learning QTP I asked the same question to the trainer and he said he would get back on it, after some research i found the answer to my question , sharing here what i learnt ( few years back ) and found ( recently ) :
- QTP interacts with test applications using windows hooks.
- Therefore these hooks help QTP during recording and identifying objects
- Hooks can only be installed using DLLs
- These Hooks can be injected only during runtime when QTP is brought up.
"Hooks are basically interceptors in system". This example will clear it
User Clicks -> Windows OS determine which Application should get it -> Sends the click to the application.
Now hooks allow to intercept the message and take action accordingly
User Clicks -> Windows OS determine which Application should get it -> Installed Hook (Hook can decide to send the message or cancel it or record it or take some action based on event)->Sends the click to the application.
Happy Testing!
Comments
Post a Comment