I. Introduction of the problem
Last written question, there is a page, enter 1-6 English characters or numbers, completed testing, test case design is also practiced, this time make the problem more complex, instead of 3 input boxes, because the problem size increased, so, the test will naturally become complex. Since the last practice was to follow the input test, this exercise was tested according to the output.
Second, test cases
|
Line |
Two lines |
Propelled |
Expected results |
| Test1 |
123 |
Abc |
Abc |
Ok |
| Test2 |
|
Abc |
Abc |
The number of characters in the first line is too small |
| Test3 |
Njzdnbnbz |
Abc |
Abc |
The number of characters in the first line is too many |
| Test4 |
Gr |
Abc |
Abc |
The first line of characters is irregular |
| Test5 |
123 |
|
Abc |
The number of characters in the second line is too small |
| Test6 |
123 |
Njzdnbnbz |
Abc |
The number of characters in the second line is too many |
| Test7 |
123 |
\adfg |
Abc |
The second line of characters is irregular |
| Test8 |
123 |
Abc |
|
The number of characters in the third line is too small |
| Test9 |
123 |
Abc |
Sgzngrfsn |
The number of characters in the third line is too many |
| Test10 |
123 |
Abc |
V%g |
The third line of characters is irregular |
Third, the test process
This is the homepage
Test1 Results
Test2 Results
TEST3 Results
TEST4 Results
TEST5 Results
TEST6 Results
TEST7 Results
TEST8 Results
TEST9 Results
TEST10 Results
As shown in the test results, the results show that the software meets the requirements.
Third, the Code
<%@ page import = "java.io.*"%><%@ page import = "java.util.*"%><%@ page import = "java.sql.*"%><%@ p Age import = "javax.sql.*"%><%@ page import = "javax.naming.*"%><%@ page contentType = "text/html; Charset=utf-8 "%><%@ page language=" java "import=" java.util.* "pageencoding=" Utf-8 "%><meta http-equiv=" Content-type "content=" text/html; Charset=utf-8 "><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <%request.setcharacterencoding ("Utf-8"); %><! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
<%@ page import = "java.io.*"%><%@ page import = "java.util.*"%><%@ page import = "java.sql.*"%><%@ p Age import = "javax.sql.*"%><%@ page import = "javax.naming.*"%><%@ page contentType = "text/html; Charset=utf-8 "%><%@ page language=" java "import=" java.util.* "pageencoding=" Utf-8 "%><meta http-equiv=" Content-type "content=" text/html; Charset=utf-8 "><%request.setcharacterencoding (" Utf-8 "); %><! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >Test Case Exercise 2