Одним з кроків процесу розробки тесту є прогнозування ймовірності результатів на кожному вибраному шляху програми. Хоча перше, що ви захочете зробити, це пройти ці шляхи вручну, тобто зробити роботу машини, не поспішайте вирішувати цю проблему. По-перше, це може бути дуже складним завданням. По-друге, ви спробуєте замінити себе комп’ютером, але ще нікому не вдалося виконати цю роботу краще, ніж комп’ютеру. Ви маєте більшу ймовірність передбачити неправильні результати, ніж інженер-програміст помилитися в програмі. Нижче наведено кілька більш привабливих альтернатив.
Існуючі тести. Nowadays, software developers spend about 80% of their time maintaining software products. Most testers and programmers modify already existing software. This means that 95 percent of your tests do not change from version to version. If you also closely control both the test development and software development processes, then you will have the oracle – a tool for determining whether the program passed your tests. If you want to focus on your core activities, передайте контроль якості на аутсорсинг черкаським професіоналам, і вони збережуть ваші вироби блискучими та здоровими.
Старі програми. Serious updates to programs do not always result in the corresponding changes in the test suite, so older programs can be used as an oracle. For example, the old program was written for MS DOS. Now you need to reinstall it on other platforms. Although such a reworking of the program can lead to its complete rewriting, the old program is an excellent oracle. Run your tests on it to get the expected results.
Попередні версії. Even if the code that you are testing has been rewritten, as a rule, for most paths, correct results can be obtained from previous versions of the program. In the worst case, changes can be made to a small number of paths, but the difference in test results for the old and new versions of the program is easily predicted. Use the outcomes received for the previous version as the starting point for receiving outcomes for the corresponding paths in the new version.
Прототипи та модельні програми. You can build an overly elaborate prototype in order to get correct results.Good prototypes, as a rule, also have functionality. They cannot serve as a work program because they are either too slow or too large, or simply cannot work in a given operating environment.
Якщо у вас немає складного прототипу, ви можете отримати оракул, створивши типову програму. Наприклад, якщо вам потрібно написати програму для заповнення декларації про доходи, ви почнете з програмування всіх форм в електронних таблицях, а алгебру і логіку - на якійсь простій мові, наприклад, BASIC.










0 коментарів