开发/测试一个 Struts Action/Spring Controller时,要注意覆盖到以下所有功能点/测试点.
1.Form Rendering
a.first rendering
b.rendering after submission
i.successful submission
ii.failed submission
2.Validation
a.Show Field Errors/Action Errors in validation fails
3.Show Correct Results
a. What if no result?
b. Results are too few to be paginated.
c. Results are so many that they should be paginated.
4.Show Error Results
a.Show Field Errors
b.Show Action Errors
5.Authorization Control
a.Permitted
b.Not Permitted