QTP自动化测试—考核题目
mercuryQTP考题(1-150)

Objective Type / Multiple Choice Questions on QTP - QuickTest Professional under the Series(Quickly Review Your QTP Skills before appearing for HP Certification Exam)Set of 10 QuestionsQ. 1: You can manage the test actions and the test or function library steps using the _______ menu commandsA. FileB. EditC. AutomationD. Tools<<<<<< =================== >>>>>>√Q. 2: To expand all the steps in the keyword view which option you would use from the View menu. BA. ExpandB. Expand AllC. Expand ItemsD. Expand Rows<<<<<< =================== >>>>>>√Q. 3: What is the shortcut key to open a Step Generator? DA. F2B. F5C. F6D. F7<<<<<< =================== >>>>>>√Q. 4: Function Definition Generator in found in which menu option. CA. FileB. ToolsC. InsertD. View<<<<<< =================== >>>>>>√Q. 5: The shortcut keys for Record, Stop and Run respectively are AA. F3, F4, F5B. F4, F3, F5C. F4, F5, F3D. F3, F5, F4<<<<<< =================== >>>>>>√Q. 6: What is the shortcut key for opening an Object Repository? CA. Alt+RB. Shift+RC. Ctrl+RD. Shift+O+R<<<<<< =================== >>>>>>√Q. 7: Shortcut key to Insert/Remove a breakpoint is AA. F9B. F8C. Ctrl+bD. Shift+b<<<<<< =================== >>>>>>√Q. 8: The ______C____ runs only the current line of the script. If the current line calls a method, the method is displayed in the view but is not performed.A. Step overB. Step outC. Step into单步调试:只运行脚本的当前行D. Step Till<<<<<< =================== >>>>>>√Q. 9: The ____A____ runs only the current line of the script. When the current line calls a method, the method is performed in its entirety, but is not displayed in the view.A. Step OverB. Step OutC. Step IntoD. Step Till<<<<<< =================== >>>>>>Q. 10: What is the shortcut key to clear all Breakpoints? ABA. Ctrl+Shift+F9B. Shift+Ctrl+F9C. Alt+Shift+F9D. Alt+Ctrl+F9<<<<<< =================== >>>>>>√Q. 11: Using the Object Spy, you can view AA. The run-time or test object properties and methods of any object in an open application. 可以看到运行时的对象和方法B. The run-time or test object properties of any object in an open application.C. The test object properties and methods of any object in an open application.D. The run-time object properties and methods of any object in an open application.<<<<<< =================== >>>>>>√Q. 12: There are ________ object type filters in Object spy dialog box.AA. Two RO & TOB. ThreeC. FourD. Five<<<<<< =================== >>>>>>Q. 13: In the Object Spy window, in the Properties TabA. Copying of Properties and its values is possible with CTRL+CB. Copying of Properties and its values is possible by right clicking on it and choosing copy.C. Copying of Properties and its values is possible with both A. and B.D. Copying of Properties and its values is possible is not possible<<<<<< =================== >>>>>>Q. 14: In the Object Spy window, in the methods TabA. Copying of Methods is possible with CTRL+CB. Copying of Methods is possible by right clicking on it and choosing copy.C. Copying of Methods is possible with both A. and B. methodsD. Copying of Methods is possible is not possible<<<<<< =================== >>>>>>√Q. 15: Object Spy dialog box AA. Can be resizedB. Cannot be resized<<<<<< =================== >>>>>>√Q. 16: The _____D______ are the highest level of the test hierarchy in the Keyword view.A. TestsB. StepsC. Call to ActionsD. Actions<<<<<< =================== >>>>>>√Q. 17: You can copy and paste or drag and drop actions to move them to a different location within a test AA. TrueB. False<<<<<< =================== >>>>>>Q. 18: You can print the contents of the Keyword View to your Windows default printer (and even preview the contents prior to printing).可以打印,也可以查看打印视图A. True<<<<<< =================== >>>>>>√Q. 19: In the Keyword View, you can also view properties for items such as checkpoints. A在关键字试图可以查看对象的属性A. TrueB. False<<<<<< =================== >>>>>>√Q. 20: In the step Browser > Page > Edit > Set "Genius", identify container object(s) D哪些是容器对象?A. BrowserB. EditC. PageD. Both Browser & Page√Q. 21: Object Spy can be found in ____B______ menu.A. ToolB. ToolsC. TaskD. Tasks<<<<<< =================== >>>>>>Q. 22: The ____________ displays the open documents side-by-side.A. Tile Vertically 垂直地B. Tile Horizontally 水平地C. Cascade 瀑布模式D. Tile Cascade<<<<<< =================== >>>>>>√Q. 23: For opening the Quick Test Professional Help we can use _____C____A. F3B. F5D. F2<<<<<< =================== >>>>>>Q. 24: If QTP cannot find any object that matches the description, or if it finds more than one object that matches, QuickTest may use the ____________ mechanism to identify the object.A. Ordinal Identifier 顺序B. Index Identifier 索引C. Smart Identification 智能识别D. Assistive Identification<<<<<< =================== >>>>>>√Q. 25: You can configure the ____A_____ and ___________.properties that QuickTest uses to record descriptions of the objects in your application强制附属次序属性A. Mandatory, assistive, and ordinal identifierB. Mandatory, required, and ordinal identifierC. Smart, assistive, and ordinal identifierD. Index, assistive, and ordinal identifier<<<<<< =================== >>>>>>Q. 26: The ________ property set for each test object is created and maintained by QuickTest.A. Run-Time ObjectB. Test Object TO属性,仓库对象C. Smart Identification ObjectD. Assistive Object<<<<<< =================== >>>>>>Q. 27: You can access and perform _________ methods using the Object property.A. Run-Time Object RO属性,实际对象B. Test ObjectC. Smart Identification ObjectD. Assistive Object<<<<<< =================== >>>>>>Q. 28: You can view or modify the test object property values that are stored with your test in the ______________A. Information PaneB. Data TableC. Information Pane & Data Table BothD. Object Properties & Object Repository dialog box.可以通过**修改仓库对象属性<<<<<< =================== >>>>>>Q. 29: You can retrieve or modify property values of the test object during the run session by adding ____________ statements in the Keyword View or Expert View.A. GetROProperty & SetROPropertyB. GetTOProperty & SetTOProperty获得TO/修改TO值C. GetTOProperty & SetROPropertyD. GetROProperty & SetTOProperty<<<<<< =================== >>>>>>Q. 30: If the available test object methods or properties for an object do not provide the functionality you need, you can access _________ of any run-time object using the Object property.A. The internal methods and properties 内部的方法和属性???B. The mandatory methods and propertiesC. The selective methods and propertiesD. The assistive methods and properties√Q. 31: The Information pane provides a list of ___B_____ in the test:A. Semantic errorsB. Syntax errors 语法错误C. Common errorsD. Logic errors<<<<<< =================== >>>>>>√Q. 32: When we switch from Expert view to the Keyword view, QTP automatically checks for syntax errors in the test and shows them in the information pane. AA. TrueB. False<<<<<< =================== >>>>>>√Q.33: If the information pane is not open, QTP automatically opens it in case a syntax error is detected. A语法错误QTP会自动打开检查A. TrueB. False<<<<<< =================== >>>>>>√Q. 34: The ____B___ provides a list of the resources that are specified in your test but cannot be found.A. Missing paneB. Missing Resources paneC. Resources paneD. Missing Items pane<<<<<< =================== >>>>>>√Q. 35: Whenever you open a test or a function library, QTP automatically checks for the availability of specified resources. AA. TrueB. False<<<<<< =================== >>>>>>√Q. 36: The Data Table does not assist you in parameterize your test. BA. TrueB. False<<<<<< =================== >>>>>>√Q. 37: Tabs in the Debug Viewer pane are: CA. Watch, Variables, DebugB. Watch, Data, CommandC. Watch, Variables, CommandD. View, Variables, Command<<<<<< =================== >>>>>>√Q. 38: The ___A____ tab enables you to view the current value of any variable or VBScript expression.A. Watch 可以点右键add到watch查看B. ViewC. LocateD. Current<<<<<< =================== >>>>>>√Q. 39: The ___B_____ tab displays the current value of all variables that have been recognized up to the last step performed in the run session.A. ViewB. Variables 展示当前所有运行中的已定义的变量C. LocateD. Current<<<<<< =================== >>>>>>√Q. 40: The____C______ tab enables you to run a line of script to set or modify the current value of a variable or VBScript object in your test or function library.A. ViewB. VariablesC. CommandD. Current√Q. 41: QuickTest processes comments when it runs a test. B运行时不执行注释语句A. TrueB. False<<<<<< =================== >>>>>>√Q. 42: Press ___A______ to add a new step below the currently selected step.A. F8B. Shift + AC. F0D. Shift + A + Q<<<<<< =================== >>>>>>Q. 43: While working with the Keyword View, you can ______ steps to move them to a different location in a test or in an actionA. Copy and Paste 拷贝和粘贴B. Cut and PasteC. Drag and drop 拖拉D. Both A. and C.<<<<<< =================== >>>>>>√Q. 44: You can specify the order in which the columns are displayed in the Keyword view. A可以在关键字视图里指定列的排列次序A. TrueB. False<<<<<< =================== >>>>>>Q. 45: You can view _____ while working with keyword view.A. Object properties 对象属性B. Action propertiesC. Action call properties 调用属性D. Checkpoint properties 检查点属性E. Output value properties 输出值属性F. None of the aboveG. All of above<<<<<< =================== >>>>>>√Q. 46: You cannot manage some aspects of a local object repository using the QuickTest Object Repository automation object model.BA. TrueB. False<<<<<< =================== >>>>>>√Q. 47: For each action, you can use a combination of objects from your local and shared object repositories.A本地和共享的对象属性A. TrueB. False<<<<<< =================== >>>>>>√Q. 48: QuickTest adds all new objects to the local object repository even if one or more shared object repositories are already associated with the action assuming that an object with the same description does not already exist in one of the associated shared object repositories. A 可以把不存在于任何共享对象库的属性添加到本地对象库A. TrueB. False<<<<<< =================== >>>>>>√Q. 49: If a child object is added to a local object repository, and its parents are in a shared object repository, then you have to manually drag and drop its parent objects from shared object repository to local object repository. B不用手动添加,父对象直接跟过来A. TrueB. False<<<<<< =================== >>>>>>Q. 50: The _____ is not accessible as a separate fileA. Local object repositoryB. Shared object repositoryC. BothD. NoneQ. 51: You can use the Keyword View to add a step _______ in your test.A. At the endB. Below the currently selected stepC. At the beginningD. At any point<<<<<< =================== >>>>>>Q. 52: The Documentation cell is ___________.A. Read-onlyB. Write-onlyC. Read and WriteD. Read write & execute<<<<<< =================== >>>>>>Q. 53: An Item column can be any of the following:A. A test objectB. A statement like Dim 声明C. A step generated by step generator 步骤D. All of above<<<<<< =================== >>>>>>Q. 54: The Operation cell in the keyword view specifies the operation to be performed on the item listed in the ___________ Column.A. OperationB. DocumentationC. ItemD. Value<<<<<< =================== >>>>>>Q. 55: Even if the Item column in the Keyword View is displayed to the right of the Operation column, you must still first select an item to view the list of available operations in the Operation column.A. TrueB. False<<<<<< =================== >>>>>>Q. 56: The Value cell in the keyword view can contain ___________ ValueA. Constant 常量B. Parameter 参数化的变量C. Both A. & B.D. None of these<<<<<< =================== >>>>>>Q. 57: The ______________ enables you to encode your passwords and place secure values into the Data Table.A. Password Encoder 密码编译器B. Password DecoderC. Password EncodeD. Password Decode<<<<<< =================== >>>>>>Q. 58: You can also encrypt strings in Data Table cells using the_____________ option in the Data Table menu.A. DecryptB. Encrypt 将…译成密码C. Encrypt CodeD. Decrypt Code<<<<<< =================== >>>>>>Q. 59: In addition to adding standard statement steps to your test using the Keyword View, you can also insertA. Checkpoint step 检查点B. Output value step 输出值C. Comment step 注释D. All of above<<<<<< =================== >>>>>>Q. 60: The correct syntax of the conditional statement starting with Do is ________A. Do WhileB. Do UntilC. Do Next For … NextD. Both A. and B.Q. 61: In the Object Repository window.A. Local objects are editable (black) 本地对象是可编辑的(黑色)B. Shared objects are in read-only format (gray) 共享对象是只读的(灰色)C. Local objects are in read-only format (gray)D. Shared objects are editable (black)<<<<<< =================== >>>>>>Q. 62: Mark the true statementA. You can delete objects from a shared object repository using the Object Repository window.B. You can delete objects from the local object repository using the Object Repository ManagerC. You can delete objects from the local object repository using the Object Repository window 在对象库窗口中可以删除本地对象D. You can delete objects from a shared object repository using the Object Repository Manager 在对象库管理器可以删除共享对象<<<<<< =================== >>>>>>Q. 63: You can modify an object stored in a shared object repository.A. Using the Object Repository ManagerB. Using the Object Repository windowC. You can copy it to the local object repository and then modify its propertiesD. You cannot modify properties of objects stored in Shared object repository <<<<<< =================== >>>>>>Q. 64: If an object is contained in both local and shared repositories then, during a run session.A. QuickTest will use the object in the local object repositoryB. QuickTest will use the object in the Shared object repositoryC. There will be a conflictD. QuickTest will use Descriptive Programming<<<<<< =================== >>>>>>Q. 65: When you copy an object to the local object repositoryA. Its parent objects are also copied to the local object repositoryB. Its parent objects are not copied to the local object repositoryC. You have to manually copy its parent objects are also copied to the local object repositoryD. You have to manually drag and drop its parent objects<<<<<< =================== >>>>>>Q. 66: For tests, you can also view test object properties and property values for objects in the Active Screen, regardless of whether the objects are stored in the object repository.A. TrueB. False<<<<<< =================== >>>>>>Q. 67: Object Properties window differs for objects stored in Shared and Local object repository.本地对象库和共享对象库是不同的A. TrueB. False<<<<<< =================== >>>>>>Q. 68: You can rename objects in the shared object repository using the Object Repository ManagerA. TrueB. False, you cannot rename objects in shared object repository<<<<<< =================== >>>>>>Q. 69: When you modify the name of an object in the local object repository, the name is automatically updated in ___________ for all occurrences of the object.A. in the Keyword ViewB. in the Expert ViewC. Both Keyword and Expert ViewD. Changing name of an object doest not effect keyword or expert view<<<<<< =================== >>>>>>Q. 70: When you modify the name of an object in a shared repository, the name is automatically updated in all tests open on the same computer that use the object repository as soon as you make the change, even if you have not yet saved the object repository with your changes.A. TrueB. FalseQ. 71: 'Browser navigation timeout' is in which tab of Test Settings (File->Settings) window.A. PropertiesB. ResourcesC. WebD. Web Settings<<<<<< =================== >>>>>>Q. 72: How many tabs are there in Test Settings (File->Settings) window?A. 7B. 6C. 5D. 8<<<<<< =================== >>>>>>Q. 73: Identify the tabs in the Test Settings (File->Settings) windowA. Properties, Run, Resources, Parameters, Environment, Web, RecoveryB. Properties, Run, Resources, Parameters, Environment, Web Settings, RecoveryC. Properties, Run Options, Resources, Parameters, Environment, Web, RecoveryD. Properties, Run, Resources, Input Parameters, Environment, Web, Recovery<<<<<< =================== >>>>>>Q. 74: 'Generate Script' is in which tab of Test Settings (File->Settings) windowA. PropertiesB. WebC. ResourcesD. Recovery<<<<<< =================== >>>>>>Q. 75: The following are the four main columns in the Keyword viewA. Item, Operation, Value, CommentsB. Item, Operation, Value, DocumentationC. Item, Operation, Property, DocumentationD. Number, Operation, Value, Documentation<<<<<< =================== >>>>>>Q. 76: For each object and method in an Expert View statement, a corresponding row exists in the Keyword View.A. TrueB. FalseC. There is a problem with the statement.D. None of above<<<<<< =================== >>>>>>Q. 77: You can work on one or several function libraries at the same time.A. TrueB. False<<<<<< =================== >>>>>>Q. 78: You can insert additional steps on the test objects captured in the Active screen after the recording session.A. TrueB. False<<<<<< =================== >>>>>>Q. 79: The Active Screen enables you to parameterize object values and insert checkpointsA. TrueB. False<<<<<< =================== >>>>>>Q. 80: A QTP user can increase or decrease the active screen information saved with the test.A. TrueB. FalseQ. 81: An __________ assigns a numerical value to a test object that indicates its order or location relative to other objects with an otherwise identical descriptionA. Index identifier.B. Ordinal identifier.C. SMART ID identifier.D. Original identifier.<<<<<< =================== >>>>>>Q. 82: You can add an object to the local object repository only if that object does not already exist in a shared object repository that isassociated with the action. If an object already exists in an associated shared object repository, you can add it to the local object repository using the ______________ option.A. Copy from Shared RepositoryB. Copy from Shared Object RepositoryC. Copy to LocalD. Copy to Local repository<<<<<< =================== >>>>>>Q. 83: You can copy, paste, and move objects in the local object repository using the Object Repository window, and copy, paste, and move objects both within a shared object repository and between shared object repositories using the Object Repository Manager. But you cannot copy objects from a shared object repository to the local object repository to modify them locallyA. TrueB. False<<<<<< =================== >>>>>>Q. 84: At the time of copying, pasting and moving objects, you cannot move an object to any of its descendants.操作的时候子对象不能再动了A. TrueB. False<<<<<< =================== >>>>>>Q. 85: When you remove a step from your test, its corresponding object is also removed from the object repositoryA. TrueB. False<<<<<< =================== >>>>>>Q. 86: You can use the Find and Replace dialog box to replace property or object names.对象和属性可以查找和替换A. TrueB. False<<<<<< =================== >>>>>>Q. 87: The Object Repository window is __________ during record and run sessions录制的时候对象库是只读的A. Read-onlyB. Rad-write onlyC. Read-write and enableD. None of above<<<<<< =================== >>>>>>Q. 88: In the Associated Repositories tab of the Action Properties dialog box, the __________ object repository is always listed first and cannot be moved down the priority list or deleted.A. LocalB. Shared ???共享对象库只可拷贝,不可删除C. BothD. None<<<<<< =================== >>>>>>Q. 89: In the Associated Repositories tab of the Action Properties dialog box, although we can order the object repositories according to our choice except the fact that Shared Repository remains the first one and cannot be removed.A. TrueB. False ???<<<<<< =================== >>>>>>Q. 90: If your object repositories are stored in the file system and you want other users or Mercury products to be able to run this action on other computers, you should set the file path as a ______________.A. Absolute pathB. Relative path 相对路径C. BothD. None of aboveQ. 91: Panes in QTP can have one of the following states—docked or floating.窗口可以停靠和悬浮A. TrueB. False<<<<<< =================== >>>>>>√Q. 92: Which of the following statement is True: AA. Quick Test enables you to open and work on one test at a timeB. Quick Test enables you to open and work on two tests at a timeC. Quick Test enables you to open and work on predefined number of tests at a timeD. Quick Test enables you to open and work on nine test at a time<<<<<< =================== >>>>>>√Q. 93: Which of the following statement is true? BA. You can open and work on two function libraries simultaneouslyB. You can open and work on multiple function libraries simultaneouslyC. You can open and work on nine function libraries simultaneouslyD. You can open and work on one function library at a time<<<<<< =================== >>>>>>√Q. 94: You can open any function library, regardless of whether it is associated with the currently open test. A可以打开不想关联的函数并查看A. TrueB. False<<<<<< =================== >>>>>>Q. 95: You can work with multiple documents (test, component, or application area, function libraries: using the ______ dialog boxA. PanesB. DisplayC. ShowD. Windows<<<<<< =================== >>>>>>√Q. 96: Quick Test has ______ Built-in toolbars. DA. 5B. 6C. 7D. 8<<<<<< =================== >>>>>>√Q. 97: The ________ toolbar contains buttons for recording and running your test. CA. StandardB. ToolsC. AutomationD. Edit<<<<<< =================== >>>>>>√Q. 98: Shortcut Key for opening a new Function Library is:AA. Shift+Alt+NB. Ctrl+Alt+NC. Shift+ND. CRTL+N<<<<<< =================== >>>>>>√Q. 99: Shortcut Key for closing all open Function Libraries in one go.DA. Ctrl+Alt+CB. Shift+A+CB. Shift+ND. None of these<<<<<< =================== >>>>>>√Q. 100: Shortcut Key for Commenting out the current row, or selected rows CA. Shift+MB. Ctrl+CC. Ctrl+MD. Shift+C√Q. 101: By default, new actions are DA. ShortB. ExternalC. ReusableD. Non-reusable<<<<<< =================== >>>>>>√Q. 102: You can display or hide the Action toolbar in the Keyword View by choosing ________ AA. View > Toolbars > ActionB. View > Toolbars > ActionsC. View > Toolbar > ActionD. Views > Toolbars > Action<<<<<< =================== >>>>>>Q. 103: The ____ ____ enables you to view either the entire test flow (the calls to the actions in the test) or you can view the steps for a selected reusable or external action.A. Action FlowB. Action fileC. Action ListD. Action Repository<<<<<< =================== >>>>>>√Q. 104: In the ___A__ the Action List is always visible and the Expert View always displays the script for the selected action.A. Keyword View所有的action都可以看到B. Expert View 只可看见当前选择的actionC. Action FlowD. Action View<<<<<< =================== >>>>>>Q. 105: The _______ method - imports a sheet of a specified file to a specified sheet in the run-time Data Table.。
QTP试题

QTP试题本试卷总分为100分,分填空和选择两类题型填空(共10小题,每题4分共40分。
填写正确得4分,不填不得分,填错扣4分,请用英文填写,中文填写不得分)1:当前使用的QTP主要版本,默认安装了几个插件(Add In)?( 3 )个。
Vb,web,ActiveX2:QTP中的两个视图(view)分别为:(expert view专家视图)和(keyword view 关键字视图)。
3:Datatable中的第一个表(sheet)的名称是(Global )4:数据表(datatable)在脚本文件夹中的名称是:(default.xls )5:用于获得对象的运行时属性值的函数是(GetROProperty )6:在QTP中存放测试对象(Test Object)的地方是()7:在QTP中使用()来查看对象的属性8:QTP的运行模式(run mode)有哪两种(normal)和(fast )9:VBS语法中判断两个值不等的运算符是(<>)10:要求脚本中使用的变量必须定义,使用哪个语句(option explicit )不定项选择(共15题,每题4分共60分,完全正确得4分,不选不得分,错选少选多选扣4分)1:QTP支持在下面的哪些浏览器上录制脚本(AB )NetscapeMicrosoft Internet ExplorerAOL (America Online)带有嵌入式Web 浏览器控件的应用程序A:IE B: Netscape C: Firefox D:Opera2:Emulator You need to identify the values of the following system variables: OSVersion,Product –Dir, and TestDir. What is the tab in QuickTest that contains this information,and where is the tab located?A: Enviroment. It is in Test Settings (File -> Settings)B: Active Screen.It is in Options(Tools->Options)C: Folders. It is in Options(Tools->Options)D: Resourses. It is in Test Settings (File -> Settings)3:一个test中有两个Action,A和B。
项目自动化测试题及答案

项目自动化测试题及答案一、选择题1. 自动化测试的主要目的是提高测试的______。
A. 覆盖率B. 效率C. 准确性D. 可重复性答案:B2. 在自动化测试中,以下哪个不是测试框架的组成部分?A. 测试用例B. 测试执行器C. 测试报告生成器D. 测试环境配置答案:D3. 以下哪个工具不是用于自动化测试的?A. SeleniumB. JUnitC. GitD. TestNG答案:C二、填空题4. 自动化测试可以减少人为错误,提高测试的______和______。
答案:效率;准确性5. 持续集成(CI)是自动化测试中的一个重要概念,它指的是在软件开发过程中,______将代码合并到主分支。
答案:开发者三、简答题6. 请简述自动化测试与手动测试的主要区别。
答案:自动化测试是指使用专门的软件工具来执行测试用例的过程,它可以在无需人工干预的情况下重复执行测试。
手动测试则需要测试人员亲自执行测试用例,通常用于探索性测试或自动化难以实现的测试场景。
自动化测试可以提高测试效率,减少重复性劳动,而手动测试则更灵活,能够适应复杂多变的测试需求。
7. 描述自动化测试在软件开发生命周期中的一般应用流程。
答案:自动化测试通常在软件开发生命周期的早期阶段开始规划,包括测试策略的制定、测试环境的搭建和测试框架的选择。
在开发过程中,随着功能模块的完成,相应的自动化测试脚本也会被开发和执行。
在持续集成过程中,自动化测试会定期运行,以确保新代码的集成不会引入缺陷。
在软件发布前,自动化测试可以帮助快速验证软件的质量。
四、论述题8. 论述为什么自动化测试不能完全取代手动测试,并提出在实际工作中如何平衡两者的使用。
答案:尽管自动化测试具有高效率和可重复性的优点,但它并不能完全取代手动测试。
自动化测试通常适用于回归测试和大量重复性测试,但对于探索性测试、用户界面测试和一些需要创造性思维的测试场景,手动测试更为合适。
此外,自动化测试可能无法覆盖所有的测试场景,特别是在面对复杂逻辑和动态内容时。
QTP自动化测试—考核题目

自动化测试考核一、多项选择题(共30分,每题5分)1.QTP的对象库的原理顺序(ACE)A.封装被测对象到对象库B.录制对象为脚本,对象库存在对象C.运行QTP脚本时,会启用对象库里对象属性和运行中的被测属性进行对比D.脚本的描述与对象匹配E.对比成功之后找到需要运行的对象2.下面关于描述对象库正确的是()A.QTP封装的一层接口属性,控件自身并没有此属性B.对象库能够识别对象是依赖于BHO机制的C.对象库简称是ORP,能够识别任何一种对象(对象库简称OR,object Repository)D.对象库里面的对象可以进行添加、复制、剪切、高亮灯操作E.可轻易的修改对象库中对象的描述属性,并能够更好的管理对象。
F.对象库录制好的对象,另存为后的文件格式是.txr(后缀名是.trs)3.录制的3种模式分别是(BDF)A.高级录制模式B.低级录制模式C.捕捉录制模式D.模拟录制模式E.动作录制模式F.正常录制模式4.Flie->Setting->Run,进入Run设置页面,在When eror occurs during run session(当在运行期间发生错误时)提供了多少个处理选择(A E F G)A.pop up message boxB.Proceed to run step actionC.Stop ationD.Proceed to next action iterationE.Stop runF.Proceed next action iterationG.Proceed to next step5.以下的选项为正确的是(ACDEF)A.QTP的两种运行模式包括:快速运行模式和正常运行模式B.当QTP正在回放时,使用快捷键Ctrl+Alt+F5能够退出回放(Ctrl+Alt+F5是停止运行的快捷键)C.回放类型包括事件模拟类型和鼠标模拟类型D.进入QTP使用快捷键Ctrl+R就能直接打开对象库E.回放机制:封转对象与虚拟对象的匹配F.公共对象库能够对比、合并、拆分对象6.以下的选项为错误的是(BDF)A.Setting.WebPackage("ReplayType")=2,这个代码是把回放模式改成鼠标模拟模式B.在进行录制的时候应该关闭不需要的浏览器C.开启模拟录制模式前的必要条件是开启正常录制模式D.QC调用的方式执行脚本,运行模式是Normal(应该是fast模式)E.在Normal运行模式中上设置间隔事件,单位是毫秒F.脚本运行时,左侧有黄色箭头,则代表这种运行模式是Fast(有黄色箭头的是Normal模式)二、解答题(共20分,每题10分)a.根据以下素材编写自动化测试用例,素材如下:1)系统名称《自动化测试用例设计系统》,B/S架构;2)整个登录功能的验证只涉及2个页面《登录页面》、《内容页面》3)“登录页面”具备4个控件[用户名输入]、[密码输入]、[登录]、[重置];4)“内容页面”中存在文字<欢迎回来,xx>,具备1个控件[退出系统];5)该系统是不用手工清除IE缓存,不点击[退出系统],直接关闭网页,下次访问无须重新登录,直接以已登录状态访问<内容页面>,非常方便;6)在“素材4”中,内容页面里的文字专门用作检查登录系统是否成功;步骤序列业务操作描述预期结果测试所用数据1 进入“自动化测试用例设计系统”登录页面。
自动化测试工程师招聘笔试题与参考答案(某世界500强集团)2024年

2024年招聘自动化测试工程师笔试题与参考答案(某世界500强集团)(答案在后面)一、单项选择题(本大题有10小题,每小题2分,共20分)1、以下哪种技术不属于自动化测试工具的核心技术?A、脚本语言编程B、数据库操作C、界面自动化D、人工智能2、在进行自动化测试时,以下哪个阶段不是自动化测试的典型阶段?A、测试需求分析B、测试用例设计C、测试脚本开发D、测试执行与结果分析3、下列哪种语言不常用于编写自动化测试脚本?A、JavaB、PythonC、C++D、HTML4、在自动化测试中,下列哪个工具主要用于性能测试?A、SeleniumB、JUnitC、LoadRunnerD、Appium5、以下哪种自动化测试工具主要用于Web应用程序的测试?A. Selenium WebDriverB. AppiumC. JMeterD. QTP6、在自动化测试过程中,以下哪个阶段通常不是必须的?A. 测试用例设计B. 测试环境搭建C. 测试执行D. 测试报告撰写7、在自动化测试中,哪一个工具常被用来进行Web应用的UI测试?A. JUnitB. SeleniumC. PostmanD. LoadRunner8、下列哪一项不是持续集成(CI)实践的一部分?A. 自动化构建B. 手动代码审查C. 自动化测试D. 版本控制9、在自动化测试中,以下哪种技术用于模拟用户在应用程序中的操作?A. 数据库脚本B. 消息队列C. 模拟器(Simulator)D. 自动化测试工具 10、以下哪个指标通常用于衡量自动化测试效率?A. 测试覆盖率B. 执行速度C. bug发现率D. 测试用例数量二、多项选择题(本大题有10小题,每小题4分,共40分)1、下列哪些工具可以用于Web应用的自动化测试?A. SeleniumB. JMeterC. AppiumD. PostmanE. Jenkins2、在自动化测试中,下列哪些是构建持续集成环境的重要组成部分?A. 版本控制系统如GitB. 持续集成服务器如JenkinsC. 自动化测试框架如Selenium GridD. 缺陷跟踪系统如JIRAE. 应用程序性能管理工具如New Relic3、以下哪些工具或技术是自动化测试工程师在测试过程中常用的?()A. SeleniumB. AppiumC. JMeterD. JUnitE. SoapUI4、以下哪些是软件测试的生命周期阶段?()A. 需求分析B. 设计C. 开发D. 测试E. 维护5、以下哪些工具或技术是自动化测试工程师在测试过程中常用的?()A. SeleniumB. JMeterC. AppiumD. LoadRunnerE. Postman6、以下关于软件测试的生命周期模型的描述,正确的是哪些?()A. 灰盒测试是黑盒测试和白盒测试的混合B. 静态测试通常在软件开发的早期阶段进行C. 软件测试的生命周期模型包括需求分析、设计、编码和测试等阶段D. 验收测试通常由最终用户进行E. 软件测试的生命周期模型不包括测试计划阶段7、以下哪些工具或技术通常用于自动化测试?()A. Selenium WebDriverB. JMeterC. AppiumD. LoadRunnerE. SoapUI8、以下哪些说法关于单元测试和集成测试是正确的?()A. 单元测试通常关注于代码模块的测试,而集成测试关注于模块间的交互。
TCL自动化测试脚本语言编程试题(附答案) - 副本

一填空题(每题2分,共10分)1.以下对自动化测试描述不正确的是?A.自动化测试可替代手工测试B.自动化测试发现的故障数不及手工测试C.自动化测试对测试质量的依赖性大D.自动化测试应在周期长的项目中引入2.自动化测试分析时,不该做的分析是下面哪一个?A.可行性分析B.测试需求分析C.抽样demo分析D.软件成本分析3.下列对自动化测试用例设计原则描述中,不正确的是?A.自动化测试用例的选择一般以“反向”为主B.自动化测试用例的范围往往是核心业务流程C.不是所有的手工测试用例都可以使用自动化测试来实现D.自动化测试用例不需要每个步骤都输出预期结果4.自动化测试工具QTP支持的语言是下面哪一种?A.JavaB.RubyC.PythonD.VBScript5.QTP工具中用于实现QTP说明书功能的是哪个键?A.F1B.F2C.F3D.F5二简答题(每题5分,共50分)注:为区分特殊符号,本次考试需要打印输出的内容在卷面中以粗斜体显示!1.自动化测试中,测试脚本可分为哪5种?1)线性脚本2)结构化脚本3)可共享脚本4)数据驱动脚本5)关键字驱动脚本2.自动化测试优势1)回归测试更方便、可靠;2)可运行更多、繁琐的测试,且高校、快速;3)可执行一些对于手工测试来说相当困难或根本做不到的测试;4)更好的利用资源,使资源的使用更有价值;5)具有一致性和可重复性;6)自动化测试脚本完全具有服用性;7)使软件更有信任度;8)多环境下测试;3.画出自动化测试流程图:4.打印输出“Hello Tcl!”;% puts "Hello Tcl!"5.定义变量a=10、b=20、c=a*b,输出变量c;% set a 10% set b 20% set c [expr $a * $b]6.计算字符串“My name is TCL”的长度;% puts stdout "The length of \"$a\" is: [string length $a]"7.已知本地E:\TCL\TCL_setup目录下存在脚本文件exec.tcl,请给出调用该脚本的方法;% cd E:\\TCL\\TCL_setup% source exec.tcl8.对数字5进行左移2位运算,并将计算结果赋值给变量n;% set n [expr 5<<2]9.计算2^16,并将结果取整显示;% expr int(pow(2,16))10.取5-10之间的随机数;% set min 5% set max 10% expr int(rand()*($max-$min+1)+$min)11.将字符串“again”追加至变量a尾部,输出追加后的字符串“see u again”;% set a "see u"% set b again% append a \ $bsee u again12.重新排列字符串"love" "game" "i" "this" "!";% set var1 [format "%3\$s %1\$s %4\$s %2\$s %5\$s" "love" "game" "i" "this" "!"]13.提取数字1-20中的质数,并按照升序排列输出;% set res [format "%1\$s %3\$s %5\$s %7\$s %11\$s %13\$s %17\$s %19\$s" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]14.用科学计数法表示数字80000,并记录在由ascii码转换后的符号()内;% set c [format %c%e%c 40 80000 41](8.000000e+004)15.获得字符串“hello”中字符e的整数值;% binary scan "hello" "cc" var1 var2% puts $var216.将字符串“sorry”中的字符o替换为字符@;% string replace sorry 1 1 @17.已知列表a [my name is tom],输出列表中的tom字符串;% set a "my name is tom"% puts [lindex $a 3]18.使用列表遍历指令输出下面内容:我喜欢吃: 苹果我喜欢吃: 梨子我喜欢吃: 香蕉我喜欢吃: 西瓜set fruit {苹果梨子香蕉西瓜}foreach f $fruit {puts "我喜欢吃: $f"}19.遍历列表输出下面内容:学号=1 姓名=tom 年龄=23 班级=C1学号=2 姓名=jack 年龄=22 班级=C2学号=3 姓名=nacy 年龄=21 班级=C3学号=4 姓名=peter 年龄=22 班级=C4set id {1 2 3 4}set name {tom jack nacy peter}set age {23 22 21 22}set classes {C1 C2 C3 C4}foreach a $id b $name c $age d $classes {puts [format "学号=%-s 姓名=%-s 年龄=%-s 班级=%-s" $a $b $c $d] }20.已知整数123,分别取出个位数,十位数和百位数;% set i 123% set a [expr $i/100]% set b [expr $i%100/10]% set c [expr $i%10]% puts $a,$b,$c21.将下列代码未完成的地方补充完整;set ids(a) 192set ids(b) 168set ids(c) 5set ids(d) 100set lst [ array get ids ]puts $lstforeach { x y } $lst {puts "x:$x y:$y"}提示:以上代码输出结果为:x:4 y:100x:2 y:168x:3 y:522.使用if语句实现功能:变量a为10,变量b为20,若a+b>20,输出结果,反之给出错误提示信息“Error”;set i 10set j 20if {[expr $j+$i]>20} {set x [expr $i+$j]puts $x} else {puts "Error"}三代码编程题(每题10分,共40分)1.求水仙花数(水仙花数是个三位数,比如153,这个数具有个特点,153=1^3+5^3+3^3) set i 100while {$i<1000} {set a [expr $i/100]set b [expr $i%100/10]set c [expr $i%10]set d [expr int(pow($a,3)+pow($b,3)+pow($c,3))]if {$i==$d} {puts $i}incr i}2.青蛙在一口77米深的井底往上爬,白天爬7米,夜里下落5米,问第几天能爬出井口?set cn 7set day 1while {$cn<=77} {incr cn -5incr day 1incr cn +7}puts $day3.求出1-100之间所有正整数之和,包含1和100;set i 1set sum 0while {$i<=100} {set sum [expr $i+$sum]#set i [expr $i+1]}puts $sum4.输出1-100之间能被5整除的数;set i 1while {$i<=100} {set result [expr $i%5]if {$result==0} {puts $i}incr i}5.打印9行9列左上直角三角形;proc leftup {b} {for {set y 0} {$y<$b} {incr y} {set line ""for {set x 0} {$x+$y<9} {incr x} { append line *}puts $line}}puts [leftup 9]6.编写代码输出十进制转二进制的函数;proc d2b {d} {set bs ""while {$d!=0} {set y [expr $d%2]set d [expr $d/2]set bs $y$bs}return $bs}puts [d2b 77]7.编写代码判断某个1993年是否为闰年;set i 1993set a [expr $i%4]set b [expr $i%100]set c [expr $i%400]if { $a==0 | $b==0 & $c==0 } {puts "\"$i\"年是闰年"} else {puts "\"$i\"年不是闰年"}8.打印9行9列右下直角三角形。
TSD1405_QTP_阶段考试_答案

一、简答题(30分=3分X10)1.QTP有几种视图,是哪几种(要求:中英文两种写法)?2种关键字视图(KeyWord View)专家视图(Expert View)Item,Opration, Value张三吃饭张三跑2.简述QTP的对象仓库机制如何实现自动化测试?a. 封装被测对象到对象库(1)获得操作的对象的属性(2)用唯一的一个对象名称把操作对象存储在对象仓库(3)存储操作的对象全部属性(4)标识关键属性(5)在脚本代码中记录操作对象和操作以及操作数据b. 对比对象库里的对象属性和运行时的真实被测对象的属性(1)取得脚本代码中操作对象(2)到对象仓库中使用脚本中的对象名称查找该对象(3)从对象仓库中获取操作对象的关键属性,和实际运行对象的关键属性对比TO Test ObjectRO Run-time ObjectFile\Settings\Run\Object synchronization timeout xxsecondsc. 对比一致后找到相应的对象,按照脚本驱动对象3.如果两行代码之间存在延时,有几种方法解决?分别写出每种解决办法的用法。
a.WaitWait time(s)b.设置步骤之间延时时间Tools Options->Run->Normalc.添加同步点Object.WaitProperty “属性名”,“属性值”,timeout(ms) 4.如下代码:脚本循环几次?输出内容是?Print DataT able(1,1)Print DataT able(1,2)DataTable中数据如下:循环开关设置如下:脚本反复4次c1c2c3d1d2d3e1e2e3f1f2f3(实际运行:字符竖向输出)5.以下代码,输出的内容为?Function myfun(num1,num2)Dim mynummynum=100myfun=mynum+num1*num2End FunctionMsgbox myfun(4,5)+mynum输出1206.Action的类型有几种,分别是?a. reusable action:可以被其它测试调用b. non-reusable action: 不可以被其它测试调用7.输入数据参数化的类型有哪些?DataTableEnvironmentRandomNumber8.对输入数据使用DataTable参数化之后,Global 和Action反复的次数在什么位置设置?Global:File->Settings->RunAction:Test Flow下右击Action→Action call Properties→Run 9.Insert—>Output建立的输出值可以存放在什么位置?DataTableEnvironment10.写出下列正则表达式中元字符的意义。
QTP面试题_0

QTP面试题1. 准备录制在录制测试前,请确认应用程序和QuickTest 已按测试要求设置。
请确保应用程序显示要录制的元素,例如,工具栏或特殊窗口窗格;还要确保应用程序选项已按测试目标设置。
为了确保QuickTest 可以正确地录制和存储信息,您还应该查看“测试设置”Window Id对应Windows应用程序的控件ID(Control ID),是指Windows指定给每个控件的数值型标识符,用来标识一种控件类型。
不同类型的控件id就会不一样,同样类型的控件id是一样的。
例如windows资源管理器的control id和打开文件对话框中的资源管理器属于同样在调试脚本的时候,通常会用采用很多msgbox函数,但是这些提示框必须要手动关闭,否则脚本不会继续往下执行,你可以设计一个函数,在几秒钟之后自动关闭提示框吗?答案:Set WshShell = CreateObject(“Wscript.Shell”) WshShell.Popup “请等待5秒钟,5秒可以按照如下步骤:1. 在QC的Tool > Options > Run in QTP下选中Allow other Mercury products to run tests and components 2. 如果你是在同一个有QC 客户端的机器上跑测试,你需要:1. QTP Connectivity Add-In 2. QTP Add-in 3. 如果你是在另外一个没有Q代码如下例所示,假设要创建的文件夹是在C:\drive. 如何用QTP脚本创建一个文件夹:Dim strDrive, strfoldername,objFSO, objFolder, strPath strDrive = “c:\”‘你要创建的文件夹所在的盘符strfoldername=”test”‘你要创建的文件夹名strPath= strDri1. What are the Features is it possible to do it in QTP, if so explain? –Batch Testing in WR is nothing but running the whole test set by selecting Run Test set from the Execution Grid. The same is possible with QTP also. If our test case。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
自动化测试考核
一、多项选择题(共30分,每题5分)
1.QTP的对象库的原理顺序(ACE)
A.封装被测对象到对象库
B.录制对象为脚本,对象库存在对象
C.运行QTP脚本时,会启用对象库里对象属性和运行中的被测属性进行对比
D.脚本的描述与对象匹配
E.对比成功之后找到需要运行的对象
2.下面关于描述对象库正确的是()
A.QTP封装的一层接口属性,控件自身并没有此属性
B.对象库能够识别对象是依赖于BHO机制的
C.对象库简称是ORP,能够识别任何一种对象(对象库简称OR,object Repository)
D.对象库里面的对象可以进行添加、复制、剪切、高亮灯操作
E.可轻易的修改对象库中对象的描述属性,并能够更好的管理对象。
F.对象库录制好的对象,另存为后的文件格式是.txr(后缀名是.trs)
3.录制的3种模式分别是(BDF)
A.高级录制模式
B.低级录制模式
C.捕捉录制模式
D.模拟录制模式
E.动作录制模式
F.正常录制模式
4.Flie->Setting->Run,进入Run设置页面,在When eror occurs during run session(当在运行期间发生错误时)提供了多少个处理选择(A E F G)
A.pop up message box
B.Proceed to run step action
C.Stop ation
D.Proceed to next action iteration
E.Stop run
F.Proceed next action iteration
G.Proceed to next step
5.以下的选项为正确的是(ACDEF)
A.QTP的两种运行模式包括:快速运行模式和正常运行模式
B.当QTP正在回放时,使用快捷键Ctrl+Alt+F5能够退出回放(Ctrl+Alt+F5是
停止运行的快捷键)
C.回放类型包括事件模拟类型和鼠标模拟类型
D.进入QTP使用快捷键Ctrl+R就能直接打开对象库
E.回放机制:封转对象与虚拟对象的匹配
F.公共对象库能够对比、合并、拆分对象
6.以下的选项为错误的是(BDF)
A.Setting.WebPackage("ReplayType")=2,这个代码是把回放模式改成鼠标模
拟模式
B.在进行录制的时候应该关闭不需要的浏览器
C.开启模拟录制模式前的必要条件是开启正常录制模式
D.QC调用的方式执行脚本,运行模式是Normal(应该是fast模式)
E.在Normal运行模式中上设置间隔事件,单位是毫秒
F.脚本运行时,左侧有黄色箭头,则代表这种运行模式是Fast(有黄色箭头的是
Normal模式)
二、解答题(共20分,每题10分)
a.根据以下素材编写自动化测试用例,素材如下:
1)系统名称《自动化测试用例设计系统》,B/S架构;
2)整个登录功能的验证只涉及2个页面《登录页面》、《内容页面》
3)“登录页面”具备4个控件[用户名输入]、[密码输入]、[登录]、[重置];
4)“内容页面”中存在文字<欢迎回来,xx>,具备1个控件[退出系统];
5)该系统是不用手工清除IE缓存,不点击[退出系统],直接关闭网页,下次访
问无须重新登录,直接以已登录状态访问<内容页面>,非常方便;
6)在“素材4”中,内容页面里的文字专门用作检查登录系统是否成功;
步骤序列业务操作描述预期结果测试所用
数据
1 进入“自动化测试用例
设计系统”登录页面。
进入<登录页面>(校验URL)
2 输入[用户名] 、[密
码],点击[登录] 进入<内容页面>,该页
面存在文字<欢迎回
来,xx>和[退出系统]
控件(检查是否登录系
统成功)
Admin
888888
3 输入[用户名] 、[密
码],点击[重置]
清空[用户名]、[密码]
4 在<内容页面>直接关闭
网页下次访问无须重新登录,直接以已登录状态访问<内容页面>
5 点击<内容页面>的[退
出系统] 下次访问须重新登录才能访问<内容页面>
b.把关键字视图的步骤转换成专家视图的代码形式:
转换的代码请在这里填写:
SystemUtil.Run ""
Browser("Welcome:MercuryTours").Page("Welcome:MercuryTours").WebEdit("userName" ).Set "admin"
Browser("Welcome:MercuryTours").Page("Welcome:MercuryTours").WebEdit("password" ).SetSecure "4f32924459b8a1b5a7fbf3c8bc1cdd68 "
Browser("Welcome:MercuryTours").Page("Welcome:MercuryTours").Image("Sign-In").C lick 22,14
Browser("Welcome:MercuryTours").Page("Finda Flight: Mercury").Link("Home").Click Browser("Welcome:MercuryTours").Page("Welcome:MercuryTours_2").Link("SIGN-OFF") .Click
Browser("Welcome: Mercury Tours").Page("Sign-on: Mercury Tours").Sync
Browser("Welcome: Mercury Tours").Close
三、操作题(共50分)
题号知识点考题得分
1 对象库、
验证点
使用对象库,在订票系统登录后,在订票页面插入验证
“Flight Details”是否存在。
(10分)
2 对象库、
参数化
使用对象库,录制登录页面在登录做两个账号的手工参
数化。
(10分)
3 对象库、
FireEve
nt
使用对象库,在百度系统页面,在登录按钮点击右键。
(15分)
4 对象库、
公共对
象库
使用对象库,录制“百度”页面的搜索框并另存为
Eidt.tsr为一个.tsr文件,再录制"百度"按钮并另存
为Button.tsr为一个文件,使用公共对象库将两个对
象合并,生成新脚本另存为Merge.tsr.(15分)
注意:操作题4小题(每道小题完成后另存为一个文件,文件命名格式例如:操作题1;本卷和这四道题完成后放在一个文件夹进行压缩,该压缩文件名例如:QTP自动化测试考核题目_陈威洋_2012.3.22)。