Optimization优化

When designing your tests, remember that more is not always better. The more tests you have, the more time it will take to develop, execute and maintain them.Optimization is important to be sure you have enough tests to do the job without having too many to manage.

当设计你的测试,记住更多不一定更好。你做的测试越多,要开发更多的时间,执行和维护。要确保你有足够的测试来完成这项工作,而无需过多地管理优化是非常重要的。

One test, one requirement一个测试,一个需求

Well-designed tests should not roam across the entire application,accessing a wide variety of areas and functions. Ideally, each test should be designed to map to a specific business or design requirement, or to a previously reported defect. This allows tests to be executed selectively when needed; for example, to confirm whether a defect has been corrected.

精心设计的测试不应该在整个申请漫游,访问各种各样的区域和功能。理想的是,各试验的设计应映射到特定的业务或设计要求,或按与先前报导的缺陷。这允许测试被选择性需要时的执行;例如,要确认的缺陷是否已经被纠正。

Having no requirements is no excuse没有任何借口

If you don’t have formally defined requirements, derive them from the tests you are going to perform instead of the other way around, but don’t just ignore them altogether. Examine your tests and decide what feature or function this test verifies, then state this as a requirement. This is important because you must know what test cases are affected if an application requirement changes; it is simply not practical to review every test case to see whether it remains valid.

如果您没有正式规定的要求,从您要执行的,而不是周围的其他方法测试得到他们,但不要忽略它们。检查你的测试,并决定什么特点或功能:此测试验证,那么说明这是一个要求。这是重要的,因为你必须知道的测试用例都受到影响,如果一个应用程序的需求是变化的;那简直是不实际的审查每测试案例,看看它是否仍然有效。

Understanding test results了解测试结果

Another reason to specify as precisely as possible what each test case covers is that, if the test case fails, it reduces the level of diagnostics required to understand the error. A lengthy, involved test case that covers multiple features or functions may fail for any number of reasons; the time it takes to analyze a failure is directly related to the complexity of the test case itself. A crisp tie-in between requirements and test cases will quickly indicate the type and severity of the failure.

另一个原因可能是指定每个测试用例覆盖是精确的,如果测试失败,它减少了所需了解的错误诊断水平。一个漫长的,涉及测试用例覆盖多个特征或功能,可能有很多原因失败;需要分析一个失败的时间是对测试用例本身的复杂性直接相关。需求和测试用例之间的搭配会脆迅速指示故障的类型和严重程度。

Requirements measure readiness需求分析准备措施

Once you have them, requirements can be assigned priorities and used to measure readiness for release. Having requirements tied to tests also reduces confusion about which requirements have been satisfied or failed based on the results of the test, thus simplifying the test and error log reports. Unless you know what requirements have been proven, you don't really know whether the application is suitable for release.

一旦你有他们,要求可分配优先级,并用于测量准备发布。具有要求绑试验也减少混淆这要求已经被满足或基于所述测试的结果失败,从而简化了测试和错误日志报告。除非你知道什么要求已经证明,你真的不知道应用是否适合发布。

A requirements matrix is a handy way of keeping track of which requirements have an associated test. A requirement that has too many tests may be too broadly defined, and should be broken down into separate instances, or it may simply have more tests than are needed to get the job done. Conversely, a test that is associated with too many requirements may be too complex and should be broken down into smaller, separate tests that are more targeted to specific requirements.

一个要求矩阵是一种跟踪要求的简便方法有相关测试。规定也有许多测试可能过于宽泛定义,并应分解成单独的实例,或者它可能只是有更多的测试不需要去完成这项工作。相反,与太多的要求相关联的测试可能过于复杂,应分解成更小的、 单独的测试,更有针对性的具体要求。

There are tools available that will generate test cases based on your requirements. There are two primary approaches: one that is based on addressing all possible combinations, and one that is based on addressing the minimum possible combinations.Using the former method, requirements are easier to define because interdependencies are not as critical, but the number of tests generated is greater. The latter method produces fewer tests, but requires a more sophisticated means of defining requirements so that relationships among them are stated with the mathematical precision needed to optimize the number of tests.

有可用的工具,将产生根据您的要求测试用例。有两种主要的方法:一种是基于处理所有可能的组合,和一种是基于寻址的最小可能组合。采用前者的方法,要求更容易定义因依赖是并不重要,但是所产生的测试的数量也较多。后者的方法产生更少的测试,但需要定义需求,使得它们之间的关系被表示以需要优化的测试的数量的数学精确度的更复杂的装置。

原文地址:https://www.cnblogs.com/Ann-L/p/4530460.html