2022年2022年軟件測試題目與答案_第1頁
2022年2022年軟件測試題目與答案_第2頁
2022年2022年軟件測試題目與答案_第3頁
2022年2022年軟件測試題目與答案_第4頁
2022年2022年軟件測試題目與答案_第5頁
已閱讀5頁,還剩3頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、精選學(xué)習(xí)資料 - - - 歡迎下載軟件測試課堂測驗第一次測驗: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 分)答案:精品學(xué)習(xí)資料精選學(xué)習(xí)

5、資料 - - - 歡迎下載其次次:1. develop a decision table for the descriptions belowno charges are reimburse(d報銷)to the patient until the deductibl(e扣除) has been精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載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精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載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.答案:第三次:精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載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. 假如落點與起點不構(gòu)成日字形,就不移動棋子;3. 假如落點處有自己放棋子,就不移

9、動棋子;4. 假如在落點方向的鄰近交叉點有棋子(絆馬腿),就不移動棋子;5. 假如不屬于 1-4,且落點處無棋子,就移動棋子;6.假如不屬于 1-4,且落點處為對方棋子 (非老將),就移動棋子并除去對方棋子;7. 假如不屬于 1-4,且落點處為對方老將,就移動棋子,并提示戰(zhàn)勝對方,嬉戲終止;請畫出因果圖,并轉(zhuǎn)換成判定表答案: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.精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載答案:第四次:某電力公司有 a .b.c.d 共四類收費標(biāo)準(zhǔn),并規(guī)定:居民用電每月 200 度以下按 a 類收費, 200 度以上按 b 類收費;動力電以每月 1 萬度為分界:非高峰用電不足1 萬度按 b 類收費,達(dá)到或超過1 萬度按 c 類收費;高峰用電不足 1 萬度按 c 類收費,達(dá)到或超過1 萬度按 d 類收費;給出掌握流圖,并設(shè)計滿意條件組合掩蓋的測試用例答案:精品學(xué)習(xí)資料精選學(xué)習(xí)資料 -

11、- - 歡迎下載quesüon 21.å&ÎèãfÄtlä.2.î:¡ÿοj精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載”xi90 1"z86t- lx+¥l t 0 ixmoyàrdl精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載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精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載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精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載float triangbtyps4oat a、5oat b doat c精品學(xué)習(xí)資料精選學(xué)習(xí)資料 - - - 歡迎下載、 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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論