12/1/2015
Day 1:
- Automation scripts could be used for functional and system
testing, Release 1 features being used for Release 2
- More test coverage -- using multiple browser and
parameterization
- Before automation - validate the application manually
- UFT - could be used for API testing
- Generally API does not have front end application, that is
difficult test. UFT = API+QTP
- Can we integrate Rally with QTP?
- Web services ex: When you give zip code, to the service,
response it will give weather condition
- Service virtualization:(Non GUI)
-> request -> Virtualization tool -> Service
UFT takes care of Service virtualization as a whole.
Here in virtualization tool, you need not have service to
test, you can create mock up service.
If you wanted to test service down scenario, you need not
make service down to test, just use virtualization
- That is how UFT covers GUI and Non GUI
- UFT Insight- Image based automation?
- UFT Mobile - Extended support for mobile testing?
- HP Lab Management - with the help of Jenkins
Traditional Client execution:
HPClient Remote Host
||
Server Server
- UFT compatable with Jenkins, will save time in virtual
machine execution
- Run Debug mode -- is newly introduced in UFT???
Ex: object.method.debugmode
- Tool home page:
Menu bar, tool bar, document tabs, canvas, solution explorer
pane, Data pane
- UFT new test -> GUI, API, BPT, BPF??
- Tabs displayed in the Record and Run settings, is based on
the addins that you selected during the initial stage
- UFT/QTP records in Mozilla, Chrome also???—yes, you could
see chrome and Mozilla in and Record and Run settings window.
- Low level recording -- is also for conitinous mouse
movements based on coordinates
- Insight Recording - Images. Appearance. Not image
comparision.
- In Amex laptop, windows recording even if it is defualt is
showing dimensions.
- Captche -- cannot be automated, better disable it and then
test application
- Insight recording - expecially for image look and feel.
Icons are stored here.???
- How API testing is done using QTP??
Open test as API
Load WSDL(get it from the website)
Methods are displayed in explorer
drag the methods to canvas
you could see xml(Request and response parameters) on the
right side - properties window
Give the input values to the xml in the request xml
Run the tool
You could see result in response xml tags on the right side
window
In the result you could clearly see request and response
xmls
Note - Web Service url- WSDL file
Note: Authorization error when you try to import the WSDL
file to UFT??
- UFT mostly uses ordinal identifier by default..looks like?
- UFT costs 8000 to
12k per seat
- Pefromance of other applications will be reduce while
running UFt
- UFT does not work on all browser versions --- so testers
use patch file
- UFT works with Mac…if it is on remote machine???
- Selenium supports more browsers but UFT does only Mozilla, chrome and IE
- Selenium supports more browsers but UFT does only Mozilla, chrome and IE
- Selenium used only for web but UFT could be used for
web and windows
- UFT does continuous integration using Jenkins or ALM, but
selenium uses many tools to do continuous integration
- Image based tests easy in UFT(using insight recording),
but in selenium its bit tough
- Integrating with Jenkins for Selenium, you can use more
reporting concepts than QC has.
- what is testing
scroll and tab functionality called as?
- Editors view or expert view the same. Keyword view gives
the object- value details. Using toggle you can move the respective object in
keyword view to the respective object in the editors view.
- If object has html
id then it will always be unique.
- Preference:
UFT identifies objects based on the following order
Mandatory property -> Assistive property -> Ordinal
identifier
-
Native property(could be found only in object spy not in object repository)(Browser
specific) and test object property(that QTP has it)
-
We can create script(add steps) using only
Keyword view. Documentation column in the keyword view is not editable but it
gives details of what that step is doing
-
Object is a collection of class, Ex: webbutton
and web edit are the classes of two different objects.
-
Description properties – the objects listed in
here are looked by QTP.
Browser(“”).page(“”).webedit(“objectname”)…here
objectname is not the property or value, its name given by qtp to whole d that QTP
has considered to identify the object. Objectname – here are editable
-
Scripts based objectnames when run are more
faster than descriptive programming
-
Problem with shared repositories??—common
objectnames could create problem or the properties included in the object when
merged with other repositories
-
Test objects and Run time objects:
Run time objects are --- marking regular expression to the
existing objects and using them without adding new objects to repository
-
http://www.knowledgeinbox.com/articles/qtp/object-identification/gettoproperty-vs-getroproperty/
QTP
provides 4 methods for working on a Test object properties
·
GetTOProperty --- this give
the property from test objects I,e is from object Repository (Note: TO – test
objects)
·
SetTOProperty … this sets the property of the test objects within
Object Repository with some specific value during only Run time. Again after
run is completed, property value will be back to the original value, what it
was there when recorded or added the objects.
·
GetTOProperties ---
·
GetROProperty --- this give
the property of the object during run time(note: RO – Run time objects)
Day 2
Note: So that is why we cannot set the property of the object
during run time.
-
Dynamic objects: The object that change during
runtime
-
Mail Inbox(232)…has 232 messages and it changes
based on the number of unread messages, we could test this by using regular
expression. Property could be changed as inbox(.* …. To read that object and
click on 232 messages. Ex: .* should be
in the double quotes.
-
Ordinal identifier is the one that will be
changing frequently, so better make it none for most of the objects.
Note: Objects could be of any case, as VB scripting is not
case sensitive.
Scenario:
1.
clicking the inbox(12343)…in gmail.
2. Going to policy details and getting the
policy number for a specific policy holder
Sol: Go the webpage. Add table where the policies are
included. Add table and then get the row details .
Like add whole table to object repository
Note: Make sure ordinal identifier is made none, else QTP
will also consider those property values that are there in that section along
with description properties.
Use GetRowWithCellText
‘get the row number of specific
policy name
Using row number give it html id of the policy number
object.
Ex: htmlid =”dgdfgfdg”&rownumber&”dgdfg”
Using setRoProperty , make html id us the row number(html id
might have reference to row number)
Ex: Browser(dfd).Page(dfdg).link(ddg).SetTOProperty(“html_id”,
htmlid)
Browser(dfd).Page(dfdg).link(ddg).click
Note: SetTOProperty changes the property of html_id, with
the value htmlid only in Object Repository.
Note: In the above example we can remove SetTO and GetRO property
code, using descriptive programming.
Browser(gfdg).Page(gdf).link(“html_id:”& htmlid).click
-
Description
object:
We do not use Object repository like we do
in descriptive programming, but we do create an object with certain properties
and values. It is called Description object.
Set obj1= Description.Create
Obj1.set
-
Drawback of Descriptive programming and descriptive object is that
whenever there is a change in property of table, then in every line we have to change in the whole code(lots
of maintenance work), but when you
program using object repository then you just need to update object
respository. And also object respository programming is faster than descriptive
programming.
-
DP general is – is static programming
-
DP - Descriptive objects – is dynamic
programming
-
DP could be used along with object repository
but order is Object repository of parent with DP of child not the other way(it
does not work)
-
with and End with , could be used to avoid
Browser(gdfg).page(gdfgfd)…. In the code
Ex: with Browser(gfgfdg).Page(ggfdg)
.link(dfgfd).SetROProperty(dfgfd,fg)
.link(fgfd).click
End with
Note: Descriptive programming is not used
regularly in the projects, due to maintenance issue, so better expertise
Programming with Object Repository.
-
Smart
Identification:
Ex:
If the name of google site webedit box – name
is changed today, your code will still recognize it even if you have name as only field in description
properties. That is because when smart identification is enabled qtp will go
and check tools->object identification->web…for webedit you could see
mandatory property set as some other tag that could be matching with the
webedit object. And smart identification is with only normal programming(that
is with object repository not with descriptive programming). Configure, smart
identification object.
-
Scenario:
Go to blogger and click my blogs and click the ‘3 post’ link in the blog.
Note: difficulty here is ‘3 posts’ link is
there in multiple blogs so that qtp will say that ‘3 posts’ exists in multiple
locations.
-
Global sheet will have your business components,
and Action1…. Are local sheets.
Action1 can have – login, logout etc…
-
Import operations that are done in QTP are only
run time, you should have file in local machine even after import.
-
Run settings are for Global sheet only, it means
the iterations mentioned in Run settings will be applied only for the rows in
Global sheet. So that is why Global sheet is global to QTP but action sheet is
local (that cannot be iterated by mentioning the run settings), you should have
separate code for the iterations to happen for local sheets.
-
Scenario:
Check the impact of iterations mentioned in the Run settings getting reflected
for Global sheet and local sheets.
-
Scenario:
-
-
Using Environment variable concept you cannot
iterate but using datatable we can. Environment variable values exist with the
code but not datatable values(as datatable is run time). And we can import xml
using environment variable. In frameworks developer uses absolute path
variables as environment variables.
-
Importing environmental variables from XML? yes
Go to File-> Test
settings->Environmental variables -> Load file browse
Syntax: Environment.value(“Policy”) …. Here
Policy is the tag in xml, the value will be returned from this line of code.
-
Day 3
-
We can define new object from object repository
manager.
-
We can validate regular expression from the object repository ---- and highlight
the application after writing the regular expression. This acts as a validator.
-
Visual relation identifier
– in Object Repository this is latest addition to UFT. This will help you to
identify the present object based on the left or right object.
-
Note: Please do not xpath in the selenium or QTP, as the
hierarchy could be changed any time. So evertying
COM(component object model) components:
-
Excels:
Set excelobj =
CreateObject(“Excel.Application”)
excelobj.Quit ---
Set excelobj=Nothing --- must to used to
release the object memory
Note: if you are not using Quit and Nothing,
your application will hang, and creates un-necessary problems.
-
Filesystemobject
-
IE
-
Import the datatable is possible using adding
resource in the tool, import in the code or use Excel application object in the
code
-
ADODB is just a connection, could
be used to connect Excel and other databases. But while connecting to Excel,
use $ infront of the column names while interacting with Excel in the queries.
So in live projects, teams use move excel data to DB(MSAccess) and create MSAccess
object and then use ADODB object start interacting.
-
Registering
the function
And then UnRegister function
Ex: We can also register WebEdit, not use
Set method or something
1.
We can override the existing methods of QTP,
like micfail is the existing thing in QTP for reporting the results, ppl
registered it by adding screenshots to the micfail as it did not had by
default.
Recovery Scenario
-
In real project teams stopped using Recovery
scenarios as the performance is getting impacted. As everytime when every recovery scenario is
updated in the QTP tool, so that .qrs file gets created everytime. Performance
degradation is possible. Alternatively teams use a separate code, so that
application could handle exceptions.
-
Resources->Recovery scenario manager
Virtual
Object
UFT – has
‘Regular Expression Evaluator’ in the tools, that will help you to evaluate the
Regular Expression there and then. There could be RegEx method for evaluating
regular expression002E
Day 4:
-
An alternate to childobjects method is getElementsByTagName Method
(DOMDocument).
DOM could be used here by making your entire web page as a
Document.
For the list of links in a page:
.getElementsByTagName(“A”)
-
Frameworks
-
DataDriven/Modular driven –
-
Keyword driven/low level – here keywords are
functions.
Here in the excel(data file) we
have names of business operations or functions (design function with the same
name). Or sometimes we also have excel file name.
Types of files in
Framework:
Business Components
Data table
Driver script
Object Repository
Configfile — name of the project name,
urls---notepad????
Note: Environment.value(“url”) …If the
variables are assigned values in notepad, can we read data from notepad.
Note: functions could
be assigned to Set method, so that return value of the function could be
assigned to the the web element.
1. Closedescendentprocesses
2. setcurrentpage
Day 5
-
Iterations?—Iterations
are something per each record in data
table. If you mention that ‘on all Iterations’ in settings, it means all
records in Datatable will be picked.
-
We can
create QTP object—got to QTP help for the code. Yes it is possible to create
COM object for QTP
-
Fast mode
– Run is possible if you set the Fast mode in Tools->Options->Fast
Qtpcomobject.Options.Run.RunMode=
“Fast”.
Two
types of Run modes exist 1. Normal and 2. Fast
-
If you
have QTP COM object, then you could access menu bar and different options using
Options method.
Support:
Cts: 127345
Sarfaraz.Hussain.aghai.mohammad@csaa.com
Scenarios:
-
Add
object
-
Exceptions:
1. How to open the application from Start button
using vbscript
2. Unable to see
3. Is there any alternate to ChildObjects
method, as childobject is with description object(descriptive programming)—looks
like DOM – getElementsbytagname…should be an alternate
4. Adding object—new objects in the Object
Repository
5. In the config file, we have notepad too, it
has variable and values, how could qtp read data from notepad that has urls and
other variable values
6. Unable to define new test object in QTP,
when you click add after clicking new object, it does not add.
Mango Habanero-Infused Earrings - Titanium Art
ReplyDeleteThese new, durable earrings range in quality from titanium shift knob durable, long-lasting quality babyliss pro titanium hair dryer earrings. These classic earrings citizen titanium watch with features titanium ore terraria have made them timeless. babyliss titanium flat iron