2022年2022年软件测试题目与答案_第1页
2022年2022年软件测试题目与答案_第2页
2022年2022年软件测试题目与答案_第3页
2022年2022年软件测试题目与答案_第4页
2022年2022年软件测试题目与答案_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、精选学习资料 - - - 欢迎下载软件测试课堂测验第一次测验:consider an application app that takes two inputs name and age、 where name is a nonempty string containing at most 20 alphabetic characters and age is an integer that must satisfy the constraint 0age120. the app is required to display an errormessage if the input value

2、 provided for age is out of range. the application truncates any name that is more than 20-character in length and generates an error message if an empty string is supplied for name.(1) ) please find out the equivalence classe(s等价类) . ( 30 分)(2) ) construct test cases using the equivalence classes d

3、erived(in1) (20 分)答案:consider a method fp、 brief for findprice、 that takes two inputs code and qty. the item code is represented by the integer code and the quantity purchased by another integer variable qty. fp accesses a database to find and display the unit price、 the description、 and the total p

4、rice of the item corresponding to code. fp is required to display an error message、 and return、 ifeither of the two inputs is incorrect. assuming that an item code must be in the range 99 999 and quantity in the range 1100.please give your test cases using boundary-value analys(is.50 分)答案:精品学习资料精选学习

5、资料 - - - 欢迎下载其次次:1. develop a decision table for the descriptions belowno charges are reimburse(d报销)to the patient until the deductibl(e扣除) has been精品学习资料精选学习资料 - - - 欢迎下载met. afterthe deductible has been met、 the amount to be reimbursed depends on whether or not the doctor or hospital is a "pr

6、eferred provider." for preferred providers精品学习资料精选学习资料 - - - 欢迎下载doctor's office visits are reimbursed at 65% and hospital visits are reimbursed at 95%. for other providers reimburse 50% for doctor's office visits or 80% for hospital visits.答案:2. develop a decision table for the yesterd

7、ate function.答案:第三次:精品学习资料精选学习资料 - - - 欢迎下载cause-effect testing: in a given network、 the sendfile command is used to send a file to a user on a different file server. the sendfile command takes three arguments: the first argument should be an existing file in the sender s home directory、 the second

8、argument should be the name of the receivers file server、 and the third argument should be the receivers userid. ifall the arguments are correct、 then the fileis successfully sent; otherwise the sender obtains an error message.答案:中国象棋走马下法:1. 假如落点在棋盘外,就不移动棋子;2. 假如落点与起点不构成日字形,就不移动棋子;3. 假如落点处有自己放棋子,就不移

9、动棋子;4. 假如在落点方向的邻近交叉点有棋子(绊马腿),就不移动棋子;5. 假如不属于 1-4,且落点处无棋子,就移动棋子;6.假如不属于 1-4,且落点处为对方棋子 (非老将),就移动棋子并除去对方棋子;7. 假如不属于 1-4,且落点处为对方老将,就移动棋子,并提示战胜对方,嬉戏终止;请画出因果图,并转换成判定表答案:consider a web page with three distinct sectionstop、 midddle、 and bottom that can be individually shown or hidden by the user. please use

10、 orthogonalarray testing to test the interactions of the different sections.精品学习资料精选学习资料 - - - 欢迎下载答案:第四次:某电力公司有 a .b.c.d 共四类收费标准,并规定:居民用电每月 200 度以下按 a 类收费, 200 度以上按 b 类收费;动力电以每月 1 万度为分界:非高峰用电不足1 万度按 b 类收费,达到或超过1 万度按 c 类收费;高峰用电不足 1 万度按 c 类收费,达到或超过1 万度按 d 类收费;给出掌握流图,并设计满意条件组合掩盖的测试用例答案:精品学习资料精选学习资料 -

11、- - 欢迎下载quesüon 21.å&ÎèãfÄtlä.2.î:¡ÿοj精品学习资料精选学习资料 - - - 欢迎下载”xi90 1"z86t- lx+¥l t 0 ixmoyàrdl精品学习资料精选学习资料 - - - 欢迎下载question 31int iogicexampieint x、 int yint magic=0;ifx>0 && y>0magic = x+y«10; / .&#

12、233;*/ &1 elsemagicx+y-10; / .é*3 /t:2ifmagic < 0magic = 0;/ îâ1&3 relurn magic;/ f &4精品学习资料精选学习资料 - - - 欢迎下载精品学习资料精选学习资料 - - - 欢迎下载quesõon 1void doint x、 int a. int b. int c12whilex-»<104ii b=05 c=c/a;6 else7ifc<o && x>18x=x+19a=b+c、1011 

13、1;»1üjiú&jiiüiei 2. ú/gj1t17*+§、 êg-»ia:z*.:=:iÃ:i a'a.l精品学习资料精选学习资料 - - - 欢迎下载float triangbtyps4oat a、5oat b doat c精品学习资料精选学习资料 - - - 欢迎下载、 1 float 1.2 ifa+b«c a+c<«b | b+c<«a s pnx"«=o +x、rm «». rn: 4 else5 l=a+b+c.b prinh”. &.1j-t£'£o10 1n"、l.7 if”a=b 8& a=+zb prinh -d z'«“-q-'n".9 else i

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论