tailieunhanh - Java Testing and Design- P5
Java Testing and Design- P5: The ultimate test of every software construction effort is the user’s success using the product to accomplish some practical goal. No matter how much state-of-the-art technology goes into the software, success can only be judged through the lens of the user. | What Usually Goes Wrong 179 If the browser ignores cache-defeating tags then your best strategy is to create dynamic Web content that users can use to tell they are viewing cached pages. For example if every page contains an incrementing simple integer number then refreshing a page should increment the serial number. A page with the same number indicates the user is viewing a cached page. Additionally the test can check the date time values in the HTTP response header. Invalid Data Browsers make GET and POST requests to the server using HTTP protocols. The GET request includes a URL HTTP header information and a series of name value pairs. For example imagine a Web page that offers a list of movies. Each movie name appears as a hyperlink for the user to click. When the user clicks a link the browser sends a GET request to the server GET signin_handler name frank movie Star 20Wars HTTP User-Agent Mozilla Host Accept text html image gif image jpeg Connection keep-alive While the HTTP GET command is very lightweight and universally used it does little to tell the server about the identity of the data. How does the server know that there will be both a name and movie value How does it know a valid movie value from an invalid one Or that the movie value is URL encoded The browser may construct what it thinks is a perfectly valid GET request but the server may disagree. Software test strategies for validating data are essential to deploying high-quality HTTP HTML Web applications. To catch most problems you should search for each of the following types of invalid data each time you test a Web-enabled application Too few or too many parameters HTTP HTML environments have no defined specification of the parameters that will be sent or received. It is up to the developer and HTML designer to agree prior to building the application. Testing a Web-enabled application by sending less than the expected number of parameters will usually turn up .
đang nạp các trang xem trước