Главная » Все файлы » Просмотр файлов из архивов » PDF-файлы » The art of software testing. Myers (2nd edition) (2004)

The art of software testing. Myers (2nd edition) (2004) (The art of software testing. Myers (2nd edition) (2004).pdf), страница 8

PDF-файл The art of software testing. Myers (2nd edition) (2004) (The art of software testing. Myers (2nd edition) (2004).pdf), страница 8 Тестирование ПО (63885): Книга - 11 семестр (3 семестр магистратуры)The art of software testing. Myers (2nd edition) (2004) (The art of software testing. Myers (2nd edition) (2004).pdf) - PDF, страница 8 (63885) - Студ2020-08-25СтудИзба

Описание файла

PDF-файл из архива "The art of software testing. Myers (2nd edition) (2004).pdf", который расположен в категории "". Всё это находится в предмете "тестирование по" из 11 семестр (3 семестр магистратуры), которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Просмотр PDF-файла онлайн

Текст 8 страницы из PDF

Is the datatype of the target variable of an assignment smallerthan the datatype or result of the right-hand expression?5. Is an overflow or underflow expression possible during thecomputation of an expression? That is, the end result mayappear to have valid value, but an intermediate result might betoo big or too small for the programming language’s datatypes.6. Is it possible for the divisor in a division operation to bezero?Program Inspections, Walkthroughs, and Reviews317. If the underlying machine represents variables in base-2form, are there any sequences of the resulting inaccuracy?That is, 10 × 0.1 is rarely equal to 1.0 on a binary machine.8. Where applicable, can the value of a variable go outside themeaningful range? For example, statements assigning a valueto the variable PROBABILITY might be checked to ensure thatthe assigned value will always be positive and not greaterthan 1.0.9.

For expressions containing more than one operator, are theassumptions about the order of evaluation and precedence ofoperators correct?10. Are there any invalid uses of integer arithmetic, particularlydivisions? For instance, if i is an integer variable, whether theexpression 2*i/2 == i depends on whether i has an odd oran even value and whether the multiplication or division isperformed first.Comparison Errors1. Are there any comparisons between variables having differentdatatypes, such as comparing a character string to an address,date, or number?2. Are there any mixed-mode comparisons or comparisonsbetween variables of different lengths? If so, ensure that theconversion rules are well understood.3. Are the comparison operators correct? Programmers frequently confuse such relations as at most, at least, greater than,not less than, less than or equal.4.

Does each Boolean expression state what it is supposed tostate? Programmers often make mistakes when writing logical expressions involving and, or, and not.5. Are the operands of a Boolean operator Boolean? Have comparison and Boolean operators been erroneously mixedtogether? This represents another frequent class of mistakes.Examples of a few typical mistakes are illustrated here. If youwant to determine whether i is between 2 and 10, the32The Art of Software Testingexpression 2<i<10 is incorrect; instead, it should be (2<i) &&If you want to determine whether i is greater than xor y, i>x||y is incorrect; instead, it should be (i>x)||(i>y). Ifyou want to compare three numbers for equality, if(a==b==c)does something quite different.

If you want to test the mathematical relation x>y>z, the correct expression is(x>y)&&(y>z).6. Are there any comparisons between fractional or floatingpoint numbers that are represented in base-2 by the underlying machine? This is an occasional source of errors becauseof truncation and base-2 approximations of base-10 numbers.7. For expressions containing more than one Boolean operator,are the assumptions about the order of evaluation and theprecedence of operators correct? That is, if you see anexpression such as (if((a==2) && (b==2) || (c==3)), is itwell understood whether the and or the or is performed first?8.

Does the way in which the compiler evaluates Booleanexpressions affect the program? For instance, the statement(i<10).if((x==0 && (x/y)>z)may be acceptable for compilers that end the test as soon asone side of an and is false, but may cause a division-by-zeroerror with other compilers.Control-Flow Errors1. If the program contains a multiway branch such as a computed GO TO, can the index variable ever exceed the numberof branch possibilities? For example, in the statementGO TO (200,300,400), iwill i always have the value of 1,2, or 3?2.

Will every loop eventually terminate? Devise an informalproof or argument showing that each loop will terminate.Program Inspections, Walkthroughs, and Reviews333. Will the program, module, or subroutine eventually terminate?4. Is it possible that, because of the conditions upon entry, aloop will never execute? If so, does this represent an oversight? For instance, if you had the following loops headed bythe following statements:for (i==x ; i<=z; i++) {...}while (NOTFOUND) {...}what happens if NOTFOUND is initially false or if x is greaterthan z?5.

For a loop controlled by both iteration and a Boolean condition (a searching loop, for example) what are the consequencesof loop fall-through? For example, for the psuedo-code loopheaded byDO I=1 to TABLESIZE WHILE (NOTFOUND)what happens if NOTFOUND never becomes false?6. Are there any off-by-one errors, such as one too many or toofew iterations? This is a common error in zero-based loops.You will often forget to count “0” as a number.

For example,if you want to create Java code for a loop that counted to 10,the following would be wrong, as it counts to 11:for (int i=0; i<=10;i++) {System.out.println(i);}Correct, the loop is iterated 10 times:for (int i=0; i <=9;i++) {System.out.println(i);34The Art of Software Testing7. If the language contains a concept of statement groups or codeblocks (e.g., do-while or {...}), is there an explicit while foreach group and do the do’s correspond to their appropriategroups? Or is there a closing bracket for each open bracket?Most modern compilers will complain of such mismatches.8. Are there any nonexhaustive decisions? For instance, if aninput parameter’s expected values are 1, 2, or 3, does thelogic assume that it must be 3 if it is not 1 or 2? If so, is theassumption valid?Interface Errors1.

Does the number of parameters received by this moduleequal the number of arguments sent by each of the callingmodules? Also, is the order correct?2. Do the attributes (e.g., datatype and size) of each parametermatch the attributes of each corresponding argument?3. Does the units system of each parameter match the units system of each corresponding argument? For example, is theparameter expressed in degrees but the argument expressedin radians?4.

Does the number of arguments transmitted by this module toanother module equal the number of parameters expected bythat module?5. Do the attributes of each argument transmitted to anothermodule match the attributes of the corresponding parameterin that module?6. Does the units system of each argument transmitted toanother module match the units system of the correspondingparameter in that module?7. If built-in functions are invoked, are the number, attributes,and order of the arguments correct?8. If a module or class has multiple entry points, is a parameterever referenced that is not associated with the current pointof entry? Such an error exists in the second assignment statement in the following PL/1 program:Program Inspections, Walkthroughs, and ReviewsA:35PROCEDURE(W,X);W=X+1;RETURNB:ENTRY (Y,Z);Y=X+Z;END;9.

Does a subroutine alter a parameter that is intended to beonly an input value?10. If global variables are present, do they have the same definition and attributes in all modules that reference them?11. Are constants ever passed as arguments? In some FORTRANimplementations a statement such asCALL SUBX(J,3)is dangerous, since if the subroutine SUBX assigns a value to itssecond parameter, the value of the constant 3 will be altered.Input/Output Errors1. If files are explicitly declared, are their attributes correct?2.

Are the attributes on the file’s OPEN statement correct?3. Does the format specification agree with the information inthe I/O statement? For instance, in FORTRAN, does eachFORMAT statement agree (in terms of the number and attributes of the items) with the corresponding READ or WRITEstatement?4. Is there sufficient memory available to hold the file your program will read?5. Have all files been opened before use?6. Have all files been closed after use?7. Are end-of-file conditions detected and handled correctly?8.

Are I/O error conditions handled correctly?9. Are there spelling or grammatical errors in any text that isprinted or displayed by the program?Table 3.1Inspection Error Checklist Summary, Part IData Reference1. Unset variable used?Computation1. Computations on nonarithmeticvariables?2. Mixed-mode computations?3. Computations on variables ofdifferent lengths?4. Target size less than size ofassigned value?5. Intermediate result overflow orunderflow?6.

Division by zero?2. Subscripts within bounds?3. Non integer subscripts?4. Dangling references?5. Correct attributes whenaliasing?6. Record and structure attributesmatch?7. Computing addresses of bitstrings?Passing bit-string arguments?8. Based storage attributes correct?9. Structure definitions matchacross procedures?10. Off-by-one errors in indexingor subscripting operations?11. Are inheritance requirementsmet?7. Base-2 inaccuracies?8.

Variable’s value outside ofmeaningful range?9. Operator precedenceunderstood?10. Integer divisions correct?Data Declaration1. All variables declared?Comparison1. Comparisons betweeninconsistent variables?2. Mixed-mode comparisons?3. Comparison relationshipscorrect?4. Boolean expressions correct?2. Default attributes understood?3. Arrays and strings initializedproperly?4. Correct lengths, types, andstorage classes assigned?5. Initialization consistent withstorage class?6. Any variables with similarnames?5. Comparison and Booleanexpressions mixed?6.

Свежие статьи
Популярно сейчас
А знаете ли Вы, что из года в год задания практически не меняются? Математика, преподаваемая в учебных заведениях, никак не менялась минимум 30 лет. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5137
Авторов
на СтудИзбе
440
Средний доход
с одного платного файла
Обучение Подробнее