QTP????????Test Object Model
???????????? ???????[ 2013/4/17 11:35:03 ] ????????
????2??Understanding How QuickTest Identifies Objects During the Run Session
??????? QuickTest ????????л??????б??????
????QuickTest also uses a very human-like technique for identifying objects during the run session.
?????????л????QuickTest ????????????????????????????????
????Suppose as a continuation to the experiment?? Jonny is now asked to identify the same "item" he initially identified but in a new?? yet similar environment.
???????????????飬???? Jonny ?????????μ?????????????????????????“???”??
????The first photograph he is shown is the original photograph. He searches for the same caucasian girl?? about eight years old?? with long?? brown hair that he was asked to remember and immediately picks her out. In the second photograph?? the children are playing on the playground equipment?? but Jonny is still able to easily identify the girl using the same criteria.
??????????????????????????????????????????????????????????????????????????? 8 ???????????????????????????????????????У???Щ?????????????豸???棬?? Jonny ?????????????????????????????????????
????Similarly?? during a run session?? QuickTest searches for a run-time object that exactly matches the description of the test object it learned while recording. It expects to find a perfect match for both the mandatory and any assistive properties it used to create a unique description while recording. As long as the object in the application does not change significantly?? the description learned during recording is almost always sufficient for QuickTest to uniquely identify the object. This is true for most objects?? but your application could include objects that are more difficult to identify during subsequent run sessions.
??????????????л????QuickTest ?????????????????????????????????????????????????????????????????????????????????κθ?????????????????????ó????е??????н????????????м????????????????????? QuickTest ???????????????????????????????????????ó????а??????Щ???????????????л???????????
????Consider the final phase of Jonny's experiment. In this phase?? the tester shows Jonny another photograph of the same family at the same location?? but the children are older and there are also more children playing on the playground. Jonny first searches for a girl with the same characteristics he used to identify the girl in the other pictures (the test object)?? but none of the caucasian girls in the picture have long?? brown hair. Luckily?? Jonny was smart enough to remember some additional information about the girl's appearance when he first saw the picture the previous week. He is able to pick her out (the run-time object)?? even though her hair is now short and dyed blond.
???????? Jonny ????е???????Ρ???y???У????????? Jonny ??????????????????????????λ????????????????????????????????????????檔Jonny ???????????????????????????????????????????????????????????????????????????в????????????????????????????????????????????ο?????????????? Jonny ????????й?????????ò???????Щ???????????????????????????????????????????????????????????????????
????How is he able to do this? First?? he considers which features he knows he must find. Jonny knows that he is still looking for a caucasian female?? and if he were not able to find anyone that matched this description?? he would assume she is not in the photograph.
?????????????????????????????????Щ??????????????????Jonny ???????????????????????????????????κ??????????????????????????????????С?
????Once he has limited the possibilities to the four caucasian females in this new photograph?? he thinks about the other characteristics he has been using to identify the girl—her age?? hair color?? and hair length. He knows that some time has passed and some of the other characteristics he remembers may have changed?? even though she is still the same person.
??????????????????????е??????????????????????????????????????????? - ?????????????????????????????????????????????????????????????Щ?????????????????????????????
????Thus?? since none of the caucasian girls have long?? dark hair?? he ignores these characteristics and searches for someone with the eyes and nose he remembers. He finds two girls with similar eyes?? but only one of these has the petite nose he remembers from the original picture. Even though these are less prominent features?? he is able to use them to identify the girl.
???????????????????????????????????????????Щ??????????????????????????????????????????????????????????????????????????????????????????С???????????????????????м??????????????????????????????????????????????
????QuickTest uses a very similar process of elimination with its Smart Identification mechanism to identify an object?? even when the recorded description is no longer accurate. Even if the values of your test object properties change?? QuickTest's TestGuard technology maintains your test or component's reusability by identifying the object using Smart Identification. For more information on Smart Identification?? see Configuring Object Identification.
???????????????????????QuickTest ????????“??????”??????÷??????????????????????????????????????????????QuickTest ?? TestGuard ?????????????????“??????”???????????????????????????????й?“??????”??????????????????????????
????The remainder of this guide assumes familiarity with the concepts presented here?? including test objects?? run-time objects?? object properties?? mandatory and assistive properties?? and Smart Identification. An understanding of these concepts will enable you to create well-designed?? functional tests or components for your application.
?????????????????????????????????????????????????????????????????????????????“??????”??????????Щ???????????ó?????????????????????????
????——songfun????? QuickTest Professional User's Guide
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11