问题 问答题 简答题

自顶向下渐增与自底而上渐增各有何优、缺点?

答案

参考答案:

①自顶向下渐增

优点:能够尽早发现系统主控方面的问题,并尽早测试系统结构的问题。

缺点:需要编写桩模块,由于下属模块往往不止一个,也不止一层,加之模块接口的复杂性,桩模块很难模拟各下层模块之间的调用关系,也无法验证桩模块是否完全模拟了下属模块的功能。因此很难尽早查出底层容易出错的复杂模块中的错误,所以导致过多的回归测试。

②自底向上渐增

优点:需要编写驱动模块。驱动模块是模拟主程序或者调用模块的功能,处于被测试模块的上层,所以驱动模块只需模拟向被测模块传递数据,接收或打印从被测模块返回的数据等功能,比编写桩模块容易。还能够尽早查出底层涉及较复杂的算法和实际的I/O模块中的错误。

缺点:只有当系统所有模块全部组装完成,才能看到系统完整的结构,才能测试系统的主控功能。

单项选择题

It is clear that some people who participate in exercise training will develop injuries to their bones, muscles, and joints (关节). Despite unfounded reports in the mass media of extremely high injury rates among adult exercisers, there have been few good studies of exercise injuries in populations. One of the difficulties in performing such studies has been the need to identify both the number of cases and the number of people at risk for injury. In other words, it is difficult to know the number of individuals injured and the total number of individuals exercising in the population. But these two figures are necessary in order to calculate (统计) tree injury rates. Normally, injury is defined as an accident that causes a person to stop exercising for at least one week. The best available studies on injury rates show that about 25 to 30 percent of adult runners become "injured" (based on the above definition) over the course of a year. More serious injuries include those for which the injured person seeks medical care. If only they are considered, injury rates are much lower, perhaps in the range of I percent per year.

Little is known about the causes of exercise injuries. One factor that has been linked to injury is the amount of exercise; for example, individuals who run more miles are likelier to be injured than those who run fewer miles. Factors such as age, sex, body type, and experience have not been shown to be associated with risk of injury. It seems logical that structural abnormalities, sudden increases in training intensity, and types of equipment used are likely to be related to injury risk. However, data to support these opinions are not available.

The true injury rates are obtained from()

A.the average number of injuries for each individual

B.the amount of exercises for each individual

C.the numbers of the injured and all individuals in training

D.the numbers of people doing exercises and those stopped exercises for one week

多项选择题