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

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

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

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

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

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

This isnecessary because cause-effect graphing becomes unwieldywhen used on large specifications. For instance, when testingan e-commerce system, a “workable piece” might be thespecification for choosing and verifying a single item placedin a shopping cart. When testing a Web page design, youmight test a single menu tree or even a less complex navigation sequence.2. The causes and effects in the specification are identified.

Acause is a distinct input condition or an equivalence class ofinput conditions. An effect is an output condition or a system transformation (a lingering effect that an input has onthe state of the program or system). For instance, if a transaction causes a file or database record to be updated, the alteration is a system transformation; a confirmation messageTest-Case Design67would be an output condition. You identify causes andeffects by reading the specification word by word and underlining words or phrases that describe causes and effects.

Onceidentified, each cause and effect is assigned a unique number.3. The semantic content of the specification is analyzed andtransformed into a Boolean graph linking the causes andeffects. This is the cause-effect graph.4. The graph is annotated with constraints describing combinations of causes and/or effects that are impossible because ofsyntactic or environmental constraints.5. By methodically tracing state conditions in the graph, youconvert the graph into a limited-entry decision table. Eachcolumn in the table represents a test case.6.

The columns in the decision table are converted into test cases.The basic notation for the graph is shown in Figure 4.5. Think ofeach node as having the value 0 or 1; 0 represents the “absent” stateand 1 represents the “present” state. The identity function states thatif a is 1, b is 1; else b is 0.

The not function states that if a is 1, b is 0,else b is 1. The or function states that if a or b or c is 1, d is 1; else d is0. The and function states that if both a and b are 1, c is 1; else c is 0.The latter two functions (or and and ) are allowed to have any numberof inputs.To illustrate a small graph, consider the following specification:The character in column 1 must be an “A” or a “B.” The characterin column 2 must be a digit. In this situation, the file update ismade. If the first character is incorrect, message X12 is issued. If thesecond character is not a digit, message X13 is issued.The causes are1—character in column 1 is “A”2—character in column 1 is “B”3—character in column 2 is a digit68The Art of Software TestingFigure 4.5Basic cause-effect graph symbols.and the effects are70—update made71—message X12 is issued72—message X13 is issuedThe cause-effect graph is shown in Figure 4.6.

Notice the intermediate node 11 that was created. You should confirm that the graphrepresents the specification by setting all possible states of the causesand seeing that the effects are set to the correct values. For readersfamiliar with logic diagrams, Figure 4.7 is the equivalent logic circuit.Although the graph in Figure 4.6 represents the specification, itdoes contain an impossible combination of causes—it is impossiblefor both causes 1 and 2 to be set to 1 simultaneously. In most pro-Test-Case Design69Figure 4.6Sample cause-effect graph.grams, certain combinations of causes are impossible because of syntactic or environmental considerations (a character cannot be an “A”and a “B” simultaneously).

To account for these, the notation in Figure 4.8 is used. The E constraint states that it must always be truethat, at most, one of a and b can be 1 (a and b cannot be 1 simulta-Figure 4.7Logic diagram equivalent to Figure 4.6.70The Art of Software TestingFigure 4.8Constraint symbols.neously). The I constraint states that at least one of a,b, and c mustalways be 1 (a,b, and c cannot be 0 simultaneously).

The O constraintstates that one, and only one, of a and b must be 1. The R constraintstates that for a to be 1, b must be 1 (i.e., it is impossible for a to be 1and b to be 0).There frequently is a need for a constraint among effects. The Mconstraint in Figure 4.9 states that if effect a is 1, effect b is forcedto 0.Returning to the preceding simple example, we see that it is physically impossible for causes 1 and 2 to be present simultaneously, butit is possible for neither to be present.

Hence, they are linked with theE constraint, as shown in Figure 4.10.Test-Case Design71Figure 4.9Symbol for “masks” constraint.To illustrate how cause-effect graphing is used to derive test cases,the specification in the following paragraphs will be used. The specification is for a debugging command in an interactive system.The DISPLAY command is used to view from a terminal window thecontents of memory locations. The command syntax is shown inFigure 4.10Sample cause-effect graph with “exclusive” constraint.72The Art of Software TestingFigure 4.11.

Brackets represent alternative optional operands. Capitalletters represent operand keywords; lowercase letters representoperand values (i.e., actual values are to be substituted). Underlinedoperands represent the default values (i.e., the value used when theoperand is omitted).The first operand (hexloc1) specifies the address of the first bytewhose contents are to be displayed. The address may be one to sixhexadecimal digits (0–9, A–F) in length. If it is not specified, theaddress 0 is assumed. The address must be within the actual memoryrange of the machine.The second operand specifies the amount of memory to bedisplayed. If hexloc2 is specified, it defines the address of the last bytein the range of locations to be displayed.

It may be one to sixhexadecimal digits in length. The address must be greater than orequal to the starting address (hexloc1). Also, hexloc2 must be withinthe actual memory range of the machine. If END is specified,memory is displayed up through the last actual byte in the machine.If bytecount is specified, it defines the number of bytes of memory tobe displayed (starting with the location specified in hexloc1).

Theoperand bytecount is a hexadecimal integer (one to six digits). Thesum of bytecount and hexloc1 must not exceed the actual memory sizeplus 1, and bytecount must have a value of at least 1.Figure 4.11Syntax of the DISPLAY command.DISPLAYhexloc10-hexloc2-END-bytecount-1Test-Case Design73When memory contents are displayed, the output format on thescreen is one or more lines of the formatxxxxxx = word1 word2 word3 word4where xxxxxx is the hexadecimal address of word1. An integralnumber of words (four-byte sequences, where the address of the firstbyte in the word is a multiple of four) is always displayed, regardlessof the value of hexloc1 or the amount of memory to be displayed.All output lines will always contain four words (16 bytes). The firstbyte of the displayed range will fall within the first word.The error messages that can be produced areM1 invalid command syntaxM2 memory requested is beyond actual memory limitM3 memory requested is a zero or negative rangeAs examples,DISPLAYdisplays the first four words in memory (default starting address of 0,default byte count of 1),DISPLAY 77Fdisplays the word containing the byte at address 77F and the threesubsequent words,DISPLAY 77F-407Adisplays the words containing the bytes in the address range 775407A,DISPLAY 77F.674The Art of Software Testingdisplays the words containing the six bytes starting at location 77F,andDISPLAY 50FF-ENDdisplays the words containing the bytes in the address range 50FF tothe end of memory.The first step is a careful analysis of the specification to identify thecauses and effects.

The causes are as follows:1. First operand is present.2. The hexloc1 operand contains only hexadecimal digits.3. The hexloc1 operand contains one to six characters.4. The hexloc1 operand is within the actual memory range ofthe machine.5. Second operand is END.6. Second operand is hexloc2.7. Second operand is bytecount.8. Second operand is omitted.9.

The hexloc2 operand contains only hexadecimal digits.10. The hexloc2 operand contains one to six characters.11. The hexloc2 operand is within the actual memory range ofthe machine.12. The hexloc2 operand is greater than or equal to the hexloc1operand.13. The bytecount operand contains only hexadecimal digits.14. The bytecount operand contains one to six characters.15. bytecount + hexloc1 ⬉ memory size + 1.16. bytecount ⭌ 1.17. Specified range is large enough to require multiple outputlines.18. Start of range does not fall on a word boundary.Each cause has been given an arbitrary unique number.

Noticethat four causes (5 through 8) are necessary for the second operandbecause the second operand could be (1) END, (2) hexloc2, (3) byte-Test-Case Design75count, (4) absent, and (5) none of the above. The effects are as follows:91. Message M1 is displayed.92. Message M2 is displayed.93. Message M3 is displayed.94.

Memory is displayed on one line.95. Memory is displayed on multiple lines.96. First byte of displayed range falls on a word boundary.97. First byte of displayed range does not fall on a wordboundary.The next step is the development of the graph. The cause nodesare listed vertically on the left side of the sheet of paper; the effectnodes are listed vertically on the right side. The semantic content ofthe specification is carefully analyzed to interconnect the causes andeffects (i.e., to show under what conditions an effect is present).Figure 4.12 shows an initial version of the graph. Intermediate node32 represents a syntactically valid first operand; node 35 represents asyntactically valid second operand.

Node 36 represents a syntacticallyvalid command. If node 36 is 1, effect 91 (the error message) does notappear. If node 36 is 0, effect 91 is present.The full graph is shown in Figure 4.13. You should explore thegraph carefully to convince yourself that it accurately reflects thespecification.If Figure 4.13 were used to derive the test cases, many impossibleto-create test cases would be derived. The reason is that certain combinations of causes are impossible because of syntactic constraints.For instance, causes 2 and 3 cannot be present unless cause 1 ispresent. Cause 4 cannot be present unless both causes 2 and 3 arepresent.

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