Главная » Все файлы » Просмотр файлов из архивов » 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), страница 7

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

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

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

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

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

This listof errors is also analyzed, categorized, and used to refine the errorchecklist to improve the effectiveness of future inspections.As stated, this inspection process usually concentrates on discovering errors, not correcting them. However, some teams may find thatwhen a minor problem is discovered, two or three people, includingthe programmer responsible for the code, then propose obviouspatches to the design to handle this special case.

The discussion of thisminor problem may, in turn, focus the group’s attention on that particular area of the design. During the discussion of the best way topatch the design to handle this minor problem, someone may notice26The Art of Software Testinga second problem. Now that the group has seen two problems relatedto the same aspect of the design, comments likely will come thickand fast, with interruptions every few sentences. In a few minutes,this whole area of the design could be thoroughly explored, and anyproblems would be obvious.The time and location of the inspection should be planned toavoid all outside interruptions. The optimal amount of time for theinspection session appears to be from 90 to 120 minutes.

Since thesession is a mentally taxing experience, longer sessions tend to be lessproductive. Most inspections proceed at a rate of approximately 150program statements per hour. For that reason, large programs shouldbe examined in multiple inspections, each inspection dealing withone or several modules or subroutines.Note that for the inspection process to be effective, the appropriateattitude must be established. If the programmer views the inspectionas an attack on his or her character and adopts a defensive posture, theprocess will be ineffective.

Rather, the programmer must approach theprocess with an egoless attitude and must place the process in a positive and constructive light: The objective of the inspection is to finderrors in the program, thus improving the quality of the work. For thisreason, most people recommend that the results of an inspection be aconfidential matter, shared only among the participants. In particular,if managers somehow make use of the inspection results, the purposeof the process can be defeated.The inspection process also has several beneficial side effects inaddition to its main effect of finding errors.

For one thing, the programmer usually receives feedback concerning programming style,choice of algorithms, and programming techniques. The other participants gain in a similar way by being exposed to another programmer’s errors and programming style. Finally, the inspection process isa way of identifying early the most error-prone sections of the program, helping to focus more attention on these sections during thecomputer-based testing processes (one of the testing principles ofChapter 2).Program Inspections, Walkthroughs, and Reviews27An Error Checklist for InspectionsAn important part of the inspection process is the use of a checklistto examine the program for common errors.

Unfortunately, somechecklists concentrate more on issues of style than on errors (forexample, “Are comments accurate and meaningful?” and “Are ifelse, code blocks, and do-while groups aligned?”), and the errorchecks are too nebulous to be useful (such as “Does the code meetthe design requirements?”). The checklist in this section was compiled after many years of study of software errors. The checklist islargely language independent, meaning that most of the errors canoccur with any programming language. You may wish to supplementthis list with errors peculiar to your programming language and witherrors detected after using the inspection process.Data Reference Errors1. Does a referenced variable have a value that is unset or uninitialized? This probably is the most frequent programmingerror; it occurs in a wide variety of circumstances.

For eachreference to a data item (variable, array element, field in astructure), attempt to “prove” informally that the item has avalue at that point.2. For all array references, is each subscript value within thedefined bounds of the corresponding dimension?3. For all array references, does each subscript have an integervalue? This is not necessarily an error in all languages, but itis a dangerous practice.4. For all references through pointer or reference variables, isthe referenced memory currently allocated? This is known asthe “dangling reference” problem.

It occurs in situationswhere the lifetime of a pointer is greater than the lifetime ofthe referenced memory. One situation occurs where apointer references a local variable within a procedure, thepointer value is assigned to an output parameter or a globalvariable, the procedure returns (freeing the referenced loca-28The Art of Software Testingtion), and later the program attempts to use the pointervalue. In a manner similar to checking for the prior errors,try to prove informally that, in each reference using a pointervariable, the reference memory exists.5.

When a memory area has alias names with differing attributes,does the data value in this area have the correct attributeswhen referenced via one of these names? Situations to lookfor are the use of the EQUIVALENCE statement in FORTRAN,and the REDEFINES clause in COBOL. As an example, aFORTRAN program contains a real variable A and an integervariable B; both are made aliases for the same memory area byusing an EQUIVALENCE statement.

If the program stores a valueinto A and then references variable B, an error is likely presentsince the machine would use the floating-point bit representation in the memory area as an integer.6. Does a variable’s value have a type or attribute other thanwhat the compiler expects? This situation might occur wherea C, C++, or COBOL program reads a record into memoryand references it by using a structure, but the physical representation of the record differs from the structure definition.7. Are there any explicit or implicit addressing problems if, onthe machine being used, the units of memory allocation aresmaller than the units of memory addressability? For instance,in some environments, fixed-length bit strings do not necessarily begin on byte boundaries, but addresses only point tobyte boundaries.

If a program computes the address of a bitstring and later refers to the string through this address, thewrong memory location may be referenced. This situationalso could occur when passing a bit-string argument to asubroutine.8. If pointer or reference variables are used, does the referencedmemory location have the attributes the compiler expects?An example of such an error is where a C++ pointer uponwhich a data structure is based is assigned the address of a different data structure.Program Inspections, Walkthroughs, and Reviews299. If a data structure is referenced in multiple procedures orsubroutines, is the structure defined identically in each procedure?10.

When indexing into a string, are the limits of the string offby-one errors in indexing operations or in subscript references to arrays?11. For object-oriented languages, are all inheritance requirements met in the implementing class?Data-Declaration Errors1. Have all variables been explicitly declared? A failure to do sois not necessarily an error, but it is a common source of trouble. For instance, if a program subroutine receives an arrayparameter, and fails to define the parameter as an array (as ina DIMENSION statement, for example), a reference to the array(such as C=A (I)) is interpreted as a function call, leading tothe machine’s attempting to execute the array as a program.Also, if a variable is not explicitly declared in an inner procedure or block, is it understood that the variable is shared withthe enclosing block?2.

If all attributes of a variable are not explicitly stated in thedeclaration, are the defaults well understood? For instance,the default attributes received in Java are often a source ofsurprise.3. Where a variable is initialized in a declarative statement, is itproperly initialized? In many languages, initialization ofarrays and strings is somewhat complicated and, hence, errorprone.4. Is each variable assigned the correct length and datatype?5. Is the initialization of a variable consistent with its memorytype? For instance, if a variable in a FORTRAN subroutineneeds to be reinitialized each time the subroutine is called, itmust be initialized with an assignment statement rather thana DATA statement.30The Art of Software Testing6. Are there any variables with similar names (VOLT and VOLTS,for example)? This is not necessarily an error, but it shouldbe seen as a warning that the names may have been confusedsomewhere within the program.Computation Errors1.

Are there any computations using variables having inconsistent (such as nonarithmetic) datatypes?2. Are there any mixed-mode computations? An example is theaddition of a floating-point variable to an integer variable.Such occurrences are not necessarily errors, but they shouldbe explored carefully to ensure that the language’s conversionrules are understood. Consider the following Java snippetshowing the rounding error that can occur when workingwith integers:int x = 1;int y = 2;int z = 0;z = x/y;System.out.println ("z = " + z);OUTPUT:z = 03. Are there any computations using variables having the samedatatype but different lengths?4.

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