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

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

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

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

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

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

Use guideline 2 for each output condition. If an information-retrieval system displays the most relevant abstracts basedon an input request, but never more than four abstracts,write test cases such that the program displays zero, one, andfour abstracts, and write a test case that might cause the program to erroneously display five abstracts.5. If the input or output of a program is an ordered set(a sequential file, for example, or a linear list or a table),focus attention on the first and last elements of the set.6. In addition, use your ingenuity to search for other boundaryconditions.The triangle analysis program of Chapter 1 can illustrate the needfor boundary-value analysis. For the input values to represent a triangle, they must be integers greater than 0 where the sum of any two isgreater than the third.

If you were defining equivalent partitions, youmight define one where this condition is met and another where thesum of two of the integers is not greater than the third. Hence, twopossible test cases might be 3-4-5 and 1-2-4. However, we havemissed a likely error. That is, if an expression in the program wereTest-Case Design61coded as A+B>=C instead of A+B>C, the program would erroneously tellus that 1-2-3 represents a valid scalene triangle. Hence, the importantdifference between boundary-value analysis and equivalence partitioning is that boundary-value analysis explores situations on andaround the edges of the equivalence partitions.As an example of a boundary-value analysis, consider the following program specification:MTEST is a program that grades multiple-choice examinations. Theinput is a data file named OCR, with multiple records that are 80characters long.

Per the file specification, the first record is a title usedas a title on each output report. The next set of records describes thecorrect answers on the exam. These records contain a “2” as the lastcharacter. In the first record of this set, the number of questions islisted in columns 1–3 (a value of 1–999). Columns 10–59 contain thecorrect answers for questions 1–50 (any character is valid as ananswer).

Subsequent records contain, in columns 10–59, the correctanswers for questions 51–100, 100–150, and so on.The third set of records describes the answers of each student;each of these records contains a “3” in column 80. For each student,the first record contains the student’s name or number in columns1–9 (any characters); columns 10–59 contain the student’s answersfor questions 1–50. If the test has more than 50 questions,subsequent records for the student contain answers 51–100,101–150, and so on, in columns 10–59. The maximum number ofstudents is 200.

The input data are illustrated in Figure 4.4. The fouroutput records are1. A report, sorted by student identifier, showing each student’sgrade (percentage of answers correct) and rank.2. A similar report, but sorted by grade.3. A report indicating the mean, median, and standard deviation ofthe grades.4. A report, ordered by question number, showing the percentageof students answering each question correctly.(End of specification.)62The Art of Software TestingFigure 4.4Input to the MTEST program.Title180No. ofquestions1Correct answers 1–503 49 10259 60Correct answers 51–10019 10Student identifier1259 60Correct answers 1–509 1059 609 10Student identifier179 80359 60Correct answers 1–509 1079 803Correct answers 51–100179 8079 80359 6079 80We can begin by methodically reading the specification, lookingfor input conditions. The first boundary input condition is an emptyinput file.

The second input condition is the title record; boundaryconditions are a missing title record and the shortest and longest possible titles. The next input conditions are the presence of correctanswer records and the number-of-questions field on the first answerTest-Case Design63record. The equivalence class for the number of questions is not1–999, since something special happens at each multiple of 50 (i.e.,multiple records are needed).

A reasonable partitioning of this intoequivalence classes is 1–50 and 51–999. Hence, we need test caseswhere the number-of-questions field is set to 0, 1, 50, 51, and 999.This covers most of the boundary conditions for the number ofcorrect-answer records; however, three more interesting situations arethe absence of answer records and having one too many and one toofew answer records (for example, the number of questions is 60, butthere are three answer records in one case and one answer record inthe other case).

The test cases identified so far are1. Empty input file.2. Missing title record.3. 1-character title.4. 80-character title.5. 1-question exam.6. 50-question exam.7. 51-question exam.8. 999-question exam.9. 0-question exam.10. Number-of-questions field has nonnumeric value.11. No correct-answer records after title record.12. One too many correct-answer records.13.

One too few correct-answer records.The next input conditions are related to the students’ answers. Theboundary-value test cases here appear to be14. 0 students.15. 1 student.16. 200 students.17. 201 students.18. A student has one answer record, but there are two correctanswer records.19. The above student is the first student in the file.64The Art of Software Testing20. The above student is the last student in the file.21. A student has two answer records, but there is just onecorrect-answer record.22.

The above student is the first student in the file.23. The above student is the last student in the file.You also can derive a useful set of test cases by examining the output boundaries, although some of the output boundaries (e.g., emptyreport 1) are covered by the existing test cases. The boundary conditions of reports 1 and 2 are0 students (same as test 14).1 student (same as test 15).200 students (same as test 16).24.

All students receive the same grade.25. All students receive a different grade.26. Some, but not all, students receive the same grade (to see ifranks are computed correctly).27. A student receives a grade of 0.28. A student receives a grade of 100.29. A student has the lowest possible identifier value (to checkthe sort).30. A student has the highest possible identifier value.31. The number of students is such that the report is just largeenough to fit on one page (to see if an extraneous page isprinted).32. The number of students is such that all students but one fiton one page.The boundary conditions from report 3 (mean, median, and standard deviation) are33.

The mean is at its maximum (all students have a perfectscore).34. The mean is 0 (all students receive a grade of 0).Test-Case Design6535. The standard deviation is at its maximum (one studentreceives a 0 and the other receives a 100).36. The standard deviation is 0 (all students receive the samegrade).Tests 33 and 34 also cover the boundaries of the median.

Anotheruseful test case is the situation where there are 0 students (looking fora division by 0 in computing the mean), but this is identical to testcase 14.An examination of report 4 yields the following boundary-valuetests:37. All students answer question 1 correctly.38. All students answer question 1 incorrectly.39. All students answer the last question correctly.40. All students answer the last question incorrectly.41. The number of questions is such that the report is just largeenough to fit on one page.42.

The number of questions is such that all questions but one fiton one page.An experienced programmer would probably agree at this point thatmany of these 42 test cases represent common errors that might havebeen made in developing this program, yet most of these errors probably would go undetected if a random or ad hoc test-case-generationmethod were used. Boundary-value analysis, if practiced correctly, isone of the most useful test-case-design methods. However, it often isused ineffectively because the technique, on the surface, sounds simple.You should understand that boundary conditions may be very subtleand, hence, identification of them requires a lot of thought.Cause-Effect GraphingOne weakness of boundary-value analysis and equivalence partitioning is that they do not explore combinations of input circumstances.

For66The Art of Software Testinginstance, perhaps the MTEST program of the previous section fails ifthe product of the number of questions and the number of studentsexceeds some limit (the program runs out of memory, for example).Boundary-value testing would not necessarily detect such an error.The testing of input combinations is not a simple task becauseeven if you equivalence-partition the input conditions, the numberof combinations usually is astronomical. If you have no systematicway of selecting a subset of input conditions, you’ll probably select anarbitrary subset of conditions, which could lead to an ineffective test.Cause-effect graphing aids in selecting, in a systematic way, a highyield set of test cases.

It has a beneficial side effect in pointing outincompleteness and ambiguities in the specification.A cause-effect graph is a formal language into which a naturallanguage specification is translated. The graph actually is a digitallogic circuit (a combinatorial logic network), but instead of standardelectronics notation, a somewhat simpler notation is used. No knowledge of electronics is necessary other than an understanding of Boolean logic (understanding the logic operators and, or, and not).The following process is used to derive test cases:1. The specification is divided into workable pieces.

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