Undisciplined scripting
is the enemy of good architectural design. The complexity which such scripting induces make debugging
and bug isolation a developer??™s curse. One argument in favor of having testers read scripts is that they
will become more aware of the kinds of errors which may occur. Writing (other than unit) tests to find
such errors will not be successfully informed by deep code knowledge so much as by a definition of the
website??™s requirements and the possible user scenarios.
78 Manage Software Testing
5.5.8 Web Unit Testing
High-criticality websites need to be unit tested. The scope of a web unit is the server/client page. Server
pages are static only in the sense that they contain the logic by which a page is built for transmission to
a client. Client pages are static only in that they are built by the server. They are often as varied in content
as the logic of the server page allows.
Each client page can be considered as being built from:
??? Business logic
??? Database results
??? Scripts and applets
??? Frames containing screen icons, fields, graphics, pull-downs, etc.
??? Links
There remains thus a problem of granularity. If a page is very complex it might be less risky to test
individual elements. The baseline of a browser page web unit test can be expressed as a decision table
wherein some combination of page state (before test), input variables, and user input actions will lead
to a page state (after test), expected outputs, and expected results.
Pages:
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224