问题 填空题

若有一个计算类型的程序,它的输入量只有一个X,其范围是[-1.0,1.0)。现从输入的角度考虑设计一组测试该程序的测试用例为-1.001,-1.0,1.0,1.0001,设计这组测试用例的方法是 【6】

答案

参考答案:边界值分析法

解析: 测试用例方法包括如下几种: (1)逻辑覆盖:它是对一系列测试过程的总称,它是在使用白盒测试法时,选用测试用例执行程序逻辑路径的方法。 (2)等价类划分:它是用黑盒测试法设计测试用例的一种技术,它是将程序(或模块)输入定义域上所有可能的输入数据(包括有效的和无效的)划分成若干个等价类,每一类的一个代表性的数据在测试中的作用就等价于这一类中的所有其他数据。 (3)边界值分析:使用边界值分析法设计测试用例,通常选取刚好等于、稍小于和稍大于等价边界值的数据作为测试用例。实践表明,处理边界情况时程序最容易出现错误。 (4)错误推测:它的基本思想是列举出程序中可能有的错误和容易发生错误的特殊情况,并且根据这些情况设计测试用例。

材料分析题
阅读理解

The US government has started a website, Admongo, to help children think critically about the advertising aimed at them. It claims to provide visitors with an “education” through games and other amusement.

A cartoon man dressed in old time pilot clothing greets visitors to Admongo. “Call me Haiz”, he says upon arrival in a rocket ship that opens up with a crazy world inside it. Spacey dance music plays in the background as Haiz tells visitors that they need to learn about advertising.

Its inventors say eight to twelve years old is the age kids develop their critical thinking abilities. Kids that age are also a big market for advertisers.

The idea behind Admongo is to teach children three things: To identify the advertiser. To know what the advertiser is really saying. And to know what the advertisement is trying to get the child to do.

Children learn these things through a video game. They create their own game character. They can choose different skin colors, hair styles, eye and mouth shapes. Then they begin a trip through ad-land, where there are ads on buses and billboards. The players have to find all the marketing in the neighborhood before they can move on to the next level.

The Admongo game takes players inside a home, to the advertising studio and everywhere else ads can be found. It is a complete exploration of the world of marketing.

One such area is food marketing. The Federal Trade Commission (FTC) says it is a big business. The FTC estimates that food, drink and fast-food restaurants spent more than one and a half billion dollars on advertising to young people in 2010.

The FTC says children are important for three reasons. They buy products. They influence parents and caregivers to buy. And they are the future adult buyers of the products.

A recent study says most advertising aimed at children is for foods of the lowest nutritional value. First Lady Michelle Obama has said she would like to see advertisers marketing healthy foods for children.

小题1:What is the best title of the text?

A.The guide of Admongo

B.An education website for children

C.A popular online video game

D.A website aimed at children小题2:Why did the government start the website?

A.To attract the biggest market of buyers.

B.To sell the products of its company.

C.To help children know about advertising.

D.To advertise the video game for children.小题3:The underlined word “identify” can be replaced by _________.

A.recognize

B.inform

C.persuade

D.forbid小题4:What can players do in the website game?

A.Choose hair styles for their character.

B.Travel to a supermarket.

C.Eat in a fast-food restaurant.

D.Play video games during the trip.小题5:Children are important for advertising because they are _________.

A.important for the society

B.the most potential buyers

C.easily influenced by ads

D.easily affected by poor products