文档库 最新最全的文档下载
当前位置:文档库 › The Monkey's Paw

The Monkey's Paw

The Monkey's Paw
The Monkey's Paw

The Monkey's Paw W. W. Jacobs

"Be careful what you wish for, you may receive it." -- Anonymous

Part I

Without, the night was cold and wet, but in the small parlour of Laburnum villa the blinds were drawn and the fire burned brightly. Father and son were at chess; the former, who posessed ideas about the game involving radical chances, putting his king into such sharp and unnecessary perils that it even provoked comment from the white-haired old lady knitting placidly by the fire.

"Hark at the wind," said Mr. White, who, having seen a fatal mistake after it was too late, was amiably desirous of preventing his son from seeing it.

"I'm listening," said the latter grimly surveying the board as he streched out his hand. "Check."

"I should hardly think that he's come tonight, " said his father, with his hand poised over the board.

"Mate," replied the son.

"That's the worst of living so far out," balled Mr. White with sudden and unlooked-for violence; "Of all the beastly, slushy, out of the way places to live in, this is the worst. Path's a bog, and the road's a torrent. I don't know what people are thinking about. I suppose because only two houses in the road are let, they think it doesn't matter."

"Never mind, dear," said his wife soothingly; "perhaps you'll win the next one."

Mr. White looked up sharply, just in time to intercept a knowing glance between mother and son. the words died away on his lips, and he hid a guilty grin in his thin grey beard.

"There he is," said Herbert White as the gate banged to loudly and heavy footsteps came toward the door.

The old man rose with hospitable haste and opening the door, was heard condoling with the new arrival. The new arrival also condoled with himself, so that Mrs. White said, "Tut, tut!" and coughed gently as her husband entered the room followed by a tall, burly man, beady of eye and rubicund of visage.

"Sargeant-Major Morris, " he said, introducing him.

The Sargeant-Major took hands and taking the proffered seat by the fire, watched contentedly as his host got out whiskey and tumblers and stood a small copper kettle on the fire.

At the third glass his eyes got brighter, and he began to talk, the little family circle regarding with eager interest this visitor from distant parts, as he squared his broad shoulders in the chair and spoke of wild scenes and dougty deeds; of wars and plagues and strange peoples.

"Twenty-one years of it," said Mr. White, nodding at his wife and son. "When he went away he was a slip of a youth in the warehouse. Now look at him."

"He don't look to have taken much harm." said Mrs. White politely.

"I'd like to go to India myself," said the old man, just to look around a bit, you know." "Better where you are," said the Sargent-Major, shaking his head. He put down the empty glass and sighning softly, shook it again.

"I should like to see those old temples and fakirs and jugglers," said the old man. "what was that that you started telling me the other day about a monkey's paw or something, Morris?"

"Nothing." said the soldier hastily. "Leastways, nothing worth hearing."

"Monkey's paw?" said Mrs. White curiously.

"Well, it's just a bit of what you might call magic, perhaps." said the Sargeant-Major off-handedly.

His three listeners leaned forward eagerly. The visitor absent-mindedly put his empty glass to his lips and then set it down again. His host filled it for him again.

"To look at," said the Sargent-Major, fumbling in his pocket, "it's just an ordinary little paw, dried to a mummy."

He took something out of his pocket and proffered it. Mrs. White drew back with a grimace, but her son, taking it, examined it curiously.

"And what is there special about it?" inquired Mr. White as he took it from his son, and having examined it, placed it upon the table.

"It had a spell put on it by an old Fakir," said the Sargent-Major, "a very holy man. He wanted to show that fate ruled people's lifes, and that those who interefered with it did so to their sorrow. He put a spell on it so that three separate men could each have three wishes from it."

His manners were so impressive that his hearers were concious that their light laughter had jarred somewhat.

"Well, why don't you have three, sir?" said Herbert White cleverly.

The soldier regarded him the way that middle age is wont to regard presumptious youth."I have," he said quietly, and his blotchy face whitened.

"And did you really have the three wishes granted?" asked Mrs. White.

"I did," said the seargent-major, and his glass tapped against his strong teeth.

"And has anybody else wished?" persisted the old lady.

"The first man had his three wishes. Yes, " was the reply, "I don't know what the first two were, but the third was for death. That's how I got the paw."

His tones were so grave that a hush fell upon the group.

"If you've had your three wishes it's no good to you now then Morris," said the old man at last. "What do you keep it for?"

The soldier shook his head. "Fancy I suppose," he said slowly." I did have some idea of selling it, but I don't think I will. It has caused me enough mischief already. Besides, people won't buy. They think it's a fairy tale, some of them; and those who do think anything of it want to try it first and pay me afterward."

"If you could have another three wishes," said the old man, eyeing him keenly," would you have them?"

"I don't know," said the other. "I don't know."

He took the paw, and dangling it between his forefinger and thumb, suddenly threw it upon the fire. White, with a slight cry, stooped down and snatched it off.

"Better let it burn," said the soldier solemnly.

"If you don't want it Morris," said the other, "give it to me."

"I won't." said his friend doggedly. "I threw it on the fire. If you keep it, don't blame me for what happens. Pitch it on the fire like a sensible man."

The other shook his head and examined his possesion closely. "How do you do it?" he inquired.

"Hold it up in your right hand, and wish aloud," said the seargent-major, "But I warn you of the consequences."

"Sounds like the 'Arabian Nights'", said Mrs. White, as she rose and began to set the supper. "Don't you think you might wish for four pairs of hands for me."

Her husband drew the talisman from his pocket, and all three burst into laughter as the Seargent-Major, with a look of alarm on his face, caught him by the arm.

"If you must wish," he said gruffly, "Wish for something sensible."

Mr. White dropped it back in his pocket, and placing chairs, motioned his friend to the table. In the business of supper the talisman was partly forgotten, and afterward the three sat listening in an enthralled fashion to a second installment of the soldier's adventures in India.

"If the tale about the monkey's paw is not more truthful than those he has been telling us," said Herbert, as the door closed behind thier guest, just in time to catch the last train, "we shan't make much out of it."

"Did you give anything for it, father?" inquired Mrs. White, regarding her husband closely.

"A trifle," said he, colouring slightly, "He didn't want it, but I made him take it. And he pressed me again to throw it away."

"Likely," said Herbert, with pretended horror. "Why, we're going to be rich, and famous, and happy. Wish to be an emporer, father, to begin with; then you can't be henpecked."

He darted around the table, persued by the maligned Mrs White armed with an antimacassar.

Mr. White took the paw from his pocket and eyed it dubiously. "I don't know what to wish for, and that's a fact," he said slowly. It seems to me I've got all I want."

"If you only cleared the house, you'd be quite happy, wouldn't you!" said Herbert, with his hand on his shoulder. "Well, wish for two hundred pounds, then; that'll just do it."

His father, smiling shamefacedly at his own credulity, held up the talisman, as his son, with a solemn face, somewhat marred by a wink at his mother, sat down and struck a few impressive chords.

"I wish for two hundred pounds," said the old man distinctly.

A fine crash from the piano greeted his words, interupted by a shuddering cry from the old man. His wife and son ran toward him.

"It moved," he cried, with a glance of disgust at the object as it lay on the floor. "As I wished, it twisted in my hand like a snake."

"Well, I don't see the money," said his son, as he picked it up and placed it on the table, "and I bet I never shall."

"It must have been your fancy, father," said his wife, regarding him anxiously.

He shook his head. "Never mind, though; there's no harm done, but it gave me a shock all the same."

They sat down by the fire again while the two men finished thier pipes. Outside, the wind was higher than ever, an the old man started nervously at the sound of a door banging upstairs. A silence unusual and depressing settled on all three, which lasted until the old couple rose to retire for the rest of the night.

"I expect you'll find the cash tied up in a big bag in the middle of your bed," said Herbert, as he bade them goodnight, " and something horrible squatting on top of your wardrobe watching you as you pocket your ill-gotten gains."

He sat alone in the darkness, gazing at the dying fire, and seeing faces in it. The last was so horrible and so simian that he gazed at it in amazement. It got so vivid that, with a little uneasy laugh, he felt on the table for a glass containig a little water to throw over it. His hand grasped the monkey's paw, and with a little shiver he wiped his hand on his coat and went up to bed.

Part II

In the brightness of the wintry sun next morning as it streamed over the breakfast table he laughed at his fears. There was an air of prosaic wholesomeness about the room which it had lacked on the previous night, and the dirty, shriveled little paw was pitched on the side-board with a carelessness which betokened no great belief in its virtues.

"I suppose all old soldiers are the same," said Mrs White. "The idea of our listening to such nonsense! How could wishes be granted in these days? And if they could, how could two hundred pounds hurt you, father?"

"Might drop on his head from the sky," said the frivolous Herbert.

"Morris said the things happened so naturally," said his father, "that you might if you so wished attribute it to coincedence."

"Well don't break into the money before I come back," said Herbert as he rose from the table. "I'm afraid it'll turn you into a mean, avaricious man, and we shall have to disown you."

His mother laughed, and following him to the door, watched him down the road; and returning to the breakfast table, was very happy at the expense of her husband's credulity. All of which did not prevent her from scurrying to the door at the postman's knock, nor prevent her from referring somewhat shortly to retired Sargeant-Majors of bibulous habits when she found that the post brought a tailor's bill.

"Herbert will have some more of his funny remarks, I expect, when he comes home," she said as they sat at dinner.

"I dare say," said Mr. White, pouring himself out some beer; "but for all that, the thing moved in my hand; that I'll swear to."

"You thought it did," said the old lady soothingly.

"I say it did," replied the other. "There was no thought about it; I had just - What's the matter?"

His wife made no reply. She was watching the mysterious movements of a man outside, who, peering in an undecided fashion at the house, appeared to be trying to make up his mind to enter. In mental conexion with the two hundred pounds, she noticed that the stranger was well dressed, and wore a silk hat of glossy newness. Three times he paused at the gate, and then walked on again. The fourth time he stood with his hand upon it, and then with sudden resolution flung it open and walked up the path. Mrs White at the same moment placed her hands behind her, and hurriedly unfastening the strings of her apron, put that useful article of apparel beneath the cusion of her chair.

She brought the stranger, who seemed ill at ease, into the room. He gazed at her furtively, and listened in a preoccupied fashion as the old lady apologized for the appearance of the room, and her husband's coat, a garment which he usually reserved for the garden. She then waited as patiently as her sex would permit for him to broach his business, but he was at first strangely silent.

"I - was asked to call," he said at last, and stooped and picked a piece of cotton from his trousers. "I come from 'Maw and Meggins.' "

The old lady started. "Is anything the matter?" she asked breathlessly. "Has anything happened to Herbert? What is it? What is it?

Her husband interposed. "There there mother," he said hastily. "Sit down, and don't jump to conclusions. You've not brought bad news, I'm sure sir," and eyed the other wistfully.

"I'm sorry - " began the visitor.

"Is he hurt?" demanded the mother wildly.

The visitor bowed in assent."Badly hurt," he said quietly, "but he is not in any pain."

"Oh thank God!" said the old woman, clasping her hands. "Thank God for that! Thank - "

She broke off as the sinister meaning of the assurance dawned on her and she saw the awful confirmation of her fears in the others averted face. She caught her breath, and turning to her slower-witted husband, laid her trembling hand on his. There was a long silence.

"He was caught in the machinery," said the visitor at length in a low voice.

"Caught in the machinery," repeated Mr. White, in a dazed fashion,"yes."

He sat staring out the window, and taking his wife's hand between his own, pressed it as he had been wont to do in their old courting days nearly forty years before.

"He was the only one left to us," he said, turning gently to the visitor. "It is hard."

The other coughed, and rising, walked slowly to the window. " The firm wishes me to covey their sincere sympathy with you in your great loss," he said, without looking round. "I beg that you will understand I am only their servant and merely obeying orders."

There was no reply; the old womans face was white, her eyes staring, and her breath inaudible; on the husband's face was a look such as his freind the seargent might have carried into his first action.

"I was to say that Maw and Meggins disclaim all responsibility," continued the other. "They admit no liability at all, but in consideration of your son's services, they wish to present you with a certain sum as compensation."

Mr. White dropped his wife's hand, and rising to his feet, gazed with a look of horror at his visitor. His dry lips shaped the words, "How much?"

"Two hundred pounds," was the answer.

Unconcious of his wife's shriek, the old man smiled faintly, put out his hands like a sightless man, and dropped, a senseless heap, to the floor.

Part III

In the huge new cemetary, some two miles distant, the old people buried their dead, and came back to the house steeped in shadows and silence. It was all over so quickly that at first they could hardly realize it, and remained in a state of expectation as though of something else to happen - something else which was to lighten this load, too heavy for old hearts to bear.

But the days passed, and expectations gave way to resignation - the hopeless resignation of the old, sometimes mis-called apathy. Sometimes they hardly exchanged a word, for now they had nothing to talk about, and their days were long to weariness.

It was a about a week after that the old man, waking suddenly in the night, stretched out his hand and found himself alone. The room was in darkness, and the sound of subdued weeping came from the window. He raised himself in bed and listened.

"Come back," he said tenderly. "You will be cold."

"It is colder for my son," said the old woman, and wept afresh.

The sounds of her sobs died away on his ears. The bed was warm, and his eyes heavy with sleep. He dozed fitfully, and then slept until a sudden wild cry from his wife awoke him with a start.

"THE PAW!" she cried wildly. "THE MONKEY'S PAW!"

He started up in alarm. "Where? Where is it? Whats the matter?"

She came stumbling across the room toward him. "I want it," she said quietly. "You've not destroyed it?"

"It's in the parlour, on the bracket," he replied, marveling. "Why?"

She cried and laughed together, and bending over, kissed his cheek.

"I only just thought of it," she said hysterically. "Why didn't I think of it before? Why didn't you think of it?"

"Think of what?" he questioned.

"The other two wishes," she replied rapidly. "We've only had one."

"Was not that enough?" he demanded fiercely.

"No," she cried triumphantly; "We'll have one more. Go down and get it quickly, and wish our boy alive again."

The man sat in bed and flung the bedcloths from his quaking limbs."Good God, you are mad!" he cried aghast. "Get it," she panted; "get it quickly, and wish - Oh my boy, my boy!"

Her husband struck a match and lit the candle. "Get back to bed he said unsteadily. "You don't know what you are saying."

"We had the first wish granted," said the old woman, feverishly; "why not the second?"

"A coincidence," stammered the old man.

"Go get it and wish," cried his wife, quivering with exitement.

The old man turned and regarded her, and his voice shook. "He has been dead ten days, and besides he - I would not tell you else, but - I could only recognize him by his clothing. If he was too terrible for you to see then, how now?"

"Bring him back," cried the old woman, and dragged him towards the door. "Do you think I fear the child I have nursed?"

He went down in the darkness, and felt his way to the parlour, and then to the mantlepiece. The talisman was in its place, and a horrible fear that the unspoken wish might bring his mutillated son before him ere he could escape from the room seized up on him, and he caught his breath as he found that he had lost the direction of the door. His brow cold with sweat, he felt his way round the table, and groped along the wall until he found himself in the small passage with the unwholesome thing in his hand.

Even his wife's face seemed changed as he entered the room. It was white and expectant, and to his fears seemed to have an unnatural look upon it. He was afraid of her.

"WISH!" she cried in a strong voice.

"It is foolish and wicked," he faltered.

"WISH!" repeated his wife.

He raised his hand. "I wish my son alive again."

The talisman fell to the floor, and he regarded it fearfully. Then he sank trembling into a chair as the old woman, with burning eyes, walked to the window and raised the blind.

He sat until he was chilled with the cold, glancing ocasionally at the figure of the old woman peering through the window. The candle-end, which had burned below the rim of the china candlestick, was throwing pulsating shadows on the ceiling and walls, until with a flicker larger than the rest, it expired. The old man, with an unspeakable sense of relief at the failure of the talisman, crept back back to his bed, and a minute afterward the old woman came silently and apethetically beside him.

Neither spoke, but lat silently listening to the ticking of the clock. A stair creaked, and a squeaky mouse scurried noisily through the wall. The darkness was oppressive, and after lying for some time screwing up his courage, he took the box of matches, and striking one, went downstairs for a candle.

At the foot of the stairs the match went out, and he paused to strike another; a nd at the same moment a knock came so quiet and stealthy as to be scarcely audible, sounded on the front door.

The matches fell from his hand and spilled in the passage. He stood motionless, his breath suspended until the knock was repeated. Then he turned and fled swiftly back to his room, and closed the door behind him. A third knock sounded through the house.

"WHATS THAT?" cried the old woman, starting up.

"A rat," said the old man in shaking tones - "a rat. It passed me on the stairs."

His wife sat up in bed listening. A loud knock resounded through the house.

"It's Herbert!"

She ran to the door, but her husband was before her, and catching her by the arm, held her tightly.

"What are you going to do?" he whispered hoarsely.

"It's my boy; it's Herbert!" she cried, struggling mechanically. "I forgot it was two miles away. What are you holding me for? Let go. I must open the door."

"For God's sake don't let it in," cried the old man, trembling.

"You're afraid of your own son," she cried struggling. "Let me go. I'm coming, Herbert; I'm coming."

There was another knock, and another. The old woman with a sudden wrench broke free and ran from the room. Her husband follwed to the landing, and called after her appealingly as she hurried downstairs. He heard the chain rattle back and the bolt drawn slowly and stiffly from the socket. Then the old womans voice, strained and panting.

"The bolt," she cried loudly. "Come down. I can't reach it."

But her husband was on his hands and knees groping wildly on the floor in search of the paw. If only he could find it before the thing outside got in. A perfect fusillade of knocks reverberated throgh the house, and he heard the scraping of a chair as his wife as his wife put it down in the passage against the door. He heard the creaking of the bolt as it came slowly back, and at the same moment he found the monkeys's paw, and frantically breathed his third and last wish.

The knocking ceased suddenly, although the echoes of it were still in the house. He heard the chair drawn back, and the door opened. A cold wind rushed up the staircase, and a long loud wail of dissapointment and misery from his wife gave him the courage to run down to her side, and then to the gate beyond. The streetlamp flickering opposite shone on a quiet and deserted road.

monkey使用笔记

1.Monkey可以自动化,可以压力测试 2.Monkey可以连接模拟器可以连接真机 3.测试对象,包和类,包里面一般包含多个类 monkey –p com.android.gallery –v 50 monkey –c https://www.wendangku.net/doc/af11017349.html,UNCHER –v 50 4.指定测试的事件类型和频率 monkey --pct-syskeys 90 200 系统按键事件的发生率为90%,共测试200次 monkey --pct-syskeys 90 –throttle 1000 200 每次事件相隔1秒中发生 monkey --pct-touch 50 --pct-trackball 40 200 表示触摸事件和轨迹事件发生概率分别为50%和40%,共测试200次 5.–ignore-crashes,忽略应用程序崩溃或发生的任何异常,继续向系统送事件直到计数 完成 monkey --ignore-crashes -v 5000 6.安装apk 进入cmd之后,默认为c:\Users\001620 键入dir 发现.android 把JieQian286.apk包拖入到C:\Users\001620\.android cd .android 得:c:\Users\001620.android

adb install JieQian286.apk (卸载:adb uninstall XXX.apk) 安装成功 需要注意的是adb shell之后,是输入shell命令的 安装应用install,查看设备连接adb devices,是在shell命令外层退出adb shell,可用exit 7.cd date,cd data,ls,就能看到我们安装了解的包了com.UPG.Liaojie,进而对这个包进行 压力测试 8.monkey中导出日志 C:\Users\001620>adb shell monkey -p com.UPG.LiaoJie -vvv 50 >e:\text.txt 此处需要注意的是,不能先adb shell,然后再键入命令,否则导入不成功 9.在monkey测试中常用的命令组合有: ●monkey -p com.yourpackage -v 500//简单的输出测试的信息。 ●monkey -p com.yourpackage -v -v -v 500 //以深度为三级输出测试信 息。 ●monkey -p com.yourpackage --port 端口号-v//为测试分配一个 专用的端口号,不过这个命令只能输出跳转的信息及有错误时输出信息。 ●monkey -p com.yourpackage -s 数字-v 500//为随机数的事件序 列定一个值,若出现问题下次可以重复同样的系列进行排错。 ●monkey -p com.yourpackage -v --throttle 3000 500//为每一次执行 一次有效的事件后休眠3000毫秒。

Android Monkey使用说明——手册

自动化测试工具Monkey 1、什么是Monkey Monkey是Android中的一个命令行工具,可以运行在模拟器里或实际设备中。它向系统发送伪随机的用户事件流(如按键输入、触摸屏输入、手势输入等),实现对正在开发的应用程序进行压力测试。Monkey测试是一种为了测试软件的稳定性、健壮性的快速有效的方法。 2、Monkey的特征 A、测试的对象仅为应用程序包,有一定的局限性。 B、Monky测试使用的事件流数据流是随机的,不能进行自定义。 C、可对MonkeyTest的对象,事件数量,类型,频率等进行设置。 3、Monkey的基本用法 $ adb shell monkey –p(包)https://www.wendangku.net/doc/af11017349.html, –v(频率)500 4、Monkey测试的停止条件 Monkey Test执行过程中在下列三种情况下会自动停止: A、如果限定了Monkey运行在一个或几个特定的包上,那么它会监测试图转到其它包的操作,并对其进行阻止。 B、如果应用程序崩溃或接收到任何失控异常,Monkey将停止并报错。

C、如果应用程序产生了应用程序不响应(application not responding)的错误,Monkey将会停止并报错。 使用Monkey流程 总的来说使用monkey进行测试是比较简单的,只是需要做一些比较复杂的准备工作。下面详解测试步骤(很简单的哦),所讲内容是建立在已经配置好ADB环境 的基础上(如果这部分不清楚请先google一下先配置好环境,这里不做描述)。 1、ADB连接Android测试设备。 2、确定你要测试的应用的PackageName。 3、使用Monkey发一条测试命令。 步骤详解 步骤确实很简单吧。不敢保证读者都明白如何去完成上面的步骤,这里讲讲每步如 何做。 1、ADB连接Android测试设备。 如果你用的是模拟器,那么启动后通常是已经连在ADB上了。对于真机来说两种 方式都可以: 方式一:使用USB把Android设备接到PC上,然后装上驱动(不好找驱动的话 就用豌豆荚吧)。 方式二:首先得确保你的Android已经成功root了,那么可以使用wifi无线连接。①下载一个wifi adb应用装在你的android设备上;②在android上打开wifi adb; ③在pc上的命令行中输入wifi adb中显示的那部分内容: adb connect 192.168.x.x,命令行中显示connected 192.168.x.x那么说明连接好了。 我比较喜欢方式二,这样可以不用去下载驱动(主要是驱动很多都不稳定),而且 不伤害电池。长时间插在USB上对电池始终是不好的。只不过这种方式设备一旦休眠那么就可能需要重连。

Monkey测试方法总结

monkey测试方法总结 测试策略:全模块、单模块 测试步骤: 1、测试前准备: 1.PC侧安装adb驱动,使用adb shell命令不报错 2.手机设置:锁屏方式设置为无,屏幕亮度建议设成最低(防止电量消耗过大导致关机) 3.手机为刚刷的新版本或者进行一次恢复出厂设置 备注:或测试前请先删除自行安装的第三方:手机助手、测试工具apk等等 4.休眠设成最长时间或不休眠 5.设置-开发者选项中勾选不锁定屏幕 6.设置手机时间为当前正确时间 7.若要测试上网请连接可用wifi或打开数据业务 8.测试前需开启aplog*#*#201206#*#* 备注:测试前请确保日志功能开启,测试完成后先保存日志 adb root adb remount adb shell rm -rf /data/logs/* 作用就是删除以前的旧log 工具使用前请确定手机版本为debug版本,PC 的adb命令使用正常 附件解压到任意目录,双击InstalllogClient.bat会自动安装logClient客户端并重

启 手机配置: 1. 连接热点360WiFi-6CDC31,连接密码为xdjatest 2. 输入密码后勾选下面的高级选项-》将DHCP选项改为静态-》设置IP地址为11.12.112.196至199之间的IP,设置完IP直接点击连接,连接上热点后即配置完毕 2、测试执行: 先执行命令adb shell 再输入如下的命令: 全模块: monkey--throttle500--ignore-crashes--ignore-timeouts--ignore-security-exc eptions--ignore-native-crashes--monitor-native-crashes-v-v-v180000>/st orage/sdcard0/monkey_log.txt& 单模块: monkey-p.xdja.ncser--throttle500--ignore-crashes--ignore-timeouts--ign ore-security-exceptions--ignore-native-crashes--monitor-native-crashes-v-v-v180000>/storage/sdcard0/monkey_log.txt& 备注: 1、单模块命令加:-p模块包名; 2、测试9小时使用180000,测试18小时使用375000

monkeyRunner教程

Android自动测试之monkeyrunner工具 monkeyrunner工具 前言: 最近开始研究Android自动化测试方法,对其中的一些工具、方法和框架做了一些简单的整理,其中包括android测试框架、CTS、Monkey、Monkeyrunner、benchmark、其它test tool 等等。因接触时间很短,很多地方有不足之处,希望能和大家多多交流。 一、什么是monkeyrunner monkeyrunner工具提供了一个API,使用此API写出的程序可以在Android代码之外控制Android设备和模拟器。通过monkeyrunner,您可以写出一个Python程序去安装一个Android应用程序或测试包,运行它,向它发送模拟击键,截取它的用户界面图片,并将截图存储于工作站上。monkeyrunner工具的主要设计目的是用于测试功能/框架水平上的应用程序和设备,或用于运行单元测试套件,但您当然也可以将其用于其它目的。 二、monkeyrunner工具同Monkey工具的差别 Monkey: Monkey工具直接运行在设备或模拟器的adb shell中,生成用户或系统的伪随机事件流。monkeyrunner: monkeyrunner工具则是在工作站上通过API定义的特定命令和事件控制设备或模拟器。 三、monkeyrunner的测试类型 1、多设备控制:monkeyrunner API可以跨多个设备或模拟器实施测试套件。您可以在同一时间接上所有的设备或一次启动全部模拟器(或统统一起),依据程序依次连接到每一个,然后运行一个或多个测试。您也可以用程序启动一个配置好的模拟器,运行一个或多个测试,然后关闭模拟器。 2、功能测试:monkeyrunner可以为一个应用自动贯彻一次功能测试。您提供按键或触摸事件的输入数值,然后观察输出结果的截屏。 3、回归测试:monkeyrunner可以运行某个应用,并将其结果截屏与既定已知正确的结果截屏相比较,以此测试应用的稳定性。

油猴脚本使用方法

《我们的精神角落》全部文案我张开双臂拥抱世界 世界也拥抱我 我经历的,未经历的 都是我想表达的 我自由 渴望交流 也懂得与人相处 但不强求共鸣 我勇敢 热爱和平 总奋不顾身的怀疑 怀疑...我在哪里 该去哪里 童年...或许还有过些 小时候的事 只有大人才记得 我健康 偶尔脆弱 但从不缺少照顾 也尝过爱情的滋味 如果不联络 朋友们并不知道我在哪里 但他们明白 除了这个小秘密 我只是一个极其平凡的人 我有时会张开双臂拥抱世界有时 我只想一个人。

油猴脚本(Tampermonkey),是一个脚本管理器,支持谷歌浏览器,欧朋浏览器、UC浏览器、海豚浏览器、360极速浏览器、windows10自带的Edge浏览器、傲游浏览器、火狐浏览器等,这些浏览器支持扩展程序,个人推荐360极速浏览器,无需翻墙,简单粗暴易上手。 1.在扩展中心中搜索“Tampermonkey”并安装, 2.进入https://https://www.wendangku.net/doc/af11017349.html,/zh-CN,一个提供用户脚本的网站, 用户脚本是一段代码,它们能够优化您的网页浏览体验。安装之后,有些脚本能为网站添加新的功能,有些能使网站的界面更加易用,有些则能隐藏网站上烦人的部分内容。在Greasy Fork 上的用户脚本都是由用户编写并向全世界发表的,您可以免费安装,轻松体验。

敲“豆瓣”, 随便点两个

浏览器右上角显示已安装 我们来对比一下 这是正常的豆瓣电影网页

这是运行脚本后的豆瓣电影网页:

是的,右侧自动聚合了该电影的相关资源,有在线观看、离线下载、网盘保存供君选择。不止是影视剧,还有读书、音乐。

(完整word版)Monkey操作手册

Monkey操作手册 一、Monkey a) Monkey是什么? Monkey就是SDK中附带的一个工具。Monkey测试是Android自动化测试的 一种手段,Monkey测试本身非常简单,当Monkey程序在模拟器或设备运行 的时候,如果用户出发了比如点击,触摸,手势或一些系统级别的事件的时候, 它就会产生随机脉冲,所以可以用Monkey用随机重复的方法去负荷测试你开 发的软件。 Monkey是Android中的一个命令行工具,可以运行在模拟器里或实际设备中。 它向系统发送伪随机的用户事件流(如按键输入、触摸屏输入、手势输入等), 实现对正在开发的应用程序进行压力测试。Monkey测试是一种为了测试软件 的稳定性、健壮性的快速有效的方法。 b) Monkey测试的目的? 该工具用于进行压力测试。然后开发人员结合monkey打印的日志和系统打印的日志,结合测试中出现的问题。 c) Monkey的特征 i. Monky测试使用的事件流数据流是随机的,不能进行自定义。 ii. 测试的对象仅为应用程序包,有一定的局限性。 iii. 可对Monkey的对象,事件数量,类型,频率等进行设置。 二、环境搭建 a)连接手机: 1 Android需要Root,2 (不必须)安装RE,控制data/data 挂载权限工具安装 i.JDK安装:详细:JDK安装配置 ii.SDK安装:建议拷贝SDK包,解压后配置SDK环境变量或安装详细:SDK 安装配置 至此环境安装就结束了 三、Monkey:连接真机 因为模拟器和真机的巨大差距,建议使用真机做Monke自动化测试,如果没有真机,自行安装虚拟模拟器。 a)在cmd窗口下面输入adb decixes 显示出真机连接型号。 如果未出现

移动APP测试之Monkey Test 运用

移动APP测试之Monkey Test 运用 Monkey是Android平台自动化测试的一种手段,可以在模拟器里或实际设备中运行,它向系统发送伪随机的用户事件流,如按键输入、触摸屏输入、手势输入等,实现对正在开发的应用程序进行压力测试。 当然对于移动APP测试,monkey测试出了压力测试外,也可以做做简单的机型配适,就是测试App是否会出现crash等异常,以此来判读其释放与机型适配,可以发现程序无响应问题和崩溃问题。 接下来简单说说: Monkey程序由Android系统自带,使用Java语言写成,在Android文件系统中的存放路径是:/system/framework/monkey.jar; Monkey.jar程序是由一个名为“monkey”的Shell脚本来启动执行,shell脚本在Android文件系统中的存放路径是:/system/bin/monkey; 特征 1、测试的对象仅为应用程序包,有一定的局限性。 2、Monky测试使用的事件流数据流是随机的,不能进行自定义。 3、可对MonkeyTest的对象,事件数量,类型,频率等进行设置。 这样就可以通过在CMD窗口中执行: adb shell monkey {+命令参数}来进行Monkey测试了。 基本使用 1. 进入monkey 命令:adb shell/system/bin/monkey 2. 运行monkey 命令:adb shell monkey 是指随机发送事件数 adb shell monkey 100,运行monkey并执行了100件随机事件。 3. monkey常规类命令 adb shell monkey -h 显示monkey参数帮助信息usage adb shell monkey -v 打印出日志信息,每个-v将增加反馈信息的级别,最多支持3个-v 4. monkey事件类命令

Android测试命令行工具Monkey使用教程

Monkey是什么 Monkey是可以运行在模拟器里或实际设备中的程序。它向系统发送伪随机的用户事件流(如按键输入、触摸屏输入、手势输入等),实现对正在开发的应用程序进行压力测试。 Monkey简介 Monkey是一个命令行工具,可以运行在模拟器里或实际设备中。它向系统发送伪随机的用户事件流,实现对正在开发的应用程序进行压力测试。Monkey包括许多选项,它们大致分为四大类: ·基本配置选项,如设置尝试的事件数量。 ·运行约束选项,如设置只对单独的一个包进行测试。 ·事件类型和频率。 ·调试选项。 在Monkey运行的时候,它生成事件,并把它们发给系统。同时,Monkey 还对测试中的系统进行监测,对下列三种情况进行特殊处理: ·如果限定了Monkey运行在一个或几个特定的包上,那么它会监测试图转到其它包的操作,并对其进行阻止。 ·如果应用程序崩溃或接收到任何失控异常,Monkey将停止并报错。 ·如果应用程序产生了应用程序不响应(application not responding)的错误,Monkey将会停止并报错。 按照选定的不同级别的反馈信息,在Monkey中还可以看到其执行过程报告和生成的事件。 Monkey的基本用法 可以通过开发机器上的命令行或脚本来启动Monkey。由于Monkey运行在模拟器/设备环境中,所以必须用其环境中的shell来进行启动。可以通过在每条命令前加上adb shell来达到目的,也可以进入Shell后直接输入Monkey命令。基本语法如下:$ adb shell monkey [options] 如果不指定options,Monkey将以无反馈模式启动,并把事件任意发送到安装在目标环境中的全部包。下面是一个更为典型的命令行示例,它启动指定的应用程序,并向其发送500个伪随机事件:$ adb shell monkey -p https://www.wendangku.net/doc/af11017349.html, -v 500 命令选项参考

Delphi XE FireMonkey 自带Demo体验与效果图

Delphi XE FireMonkey Demo体验与效果图 版本:Delphi XE6FireMonkey DEMO:delphi FireMonkey自带 DEMO路径,在DELPHI XE6安装目录下:E:\Documents and Settings\All Users\Documents\Embarcadero\Studio\14.0\Samples 1●TabSlideTransition(分页可滑动翻页) 功能:每页可填写,并支持可滑动翻页 路径:Samples\Object Pascal\Mobile Samples\User Interface\TabSlideTransition 开启界面:

2●TabletMasterDetailWithSearch(查找联系人,定位,并显示明细) 功能:可以查找列表联系人,并定位,和显示明细 路径:Samples\Object Pascal\Mobile Samples\User Interface\TabletMasterDetailWithSearch 开启界面:

3●Settings Project(系统设置) 功能:打开USB调试,WIFI等设置 路径:Samples\Object Pascal\Mobile Samples\User Interface\Settings Project 开启界面:

4●ScrollableForm(滚动编辑框) 功能:滚动编辑框 路径:Samples\Object Pascal\Mobile Samples\User Interface\ScrollableForm 开启界面:

Monkey测试简介

Monkey测试简介 shell, monkey, system, Android, 文件系统Monkey, 示例, 简介 一、Monkey测试简介 Monkey测试是Android平台自动化测试的一种手段,通过Monkey程序模拟用户触摸屏幕、滑动Trackball、按键等操作来对设备上的程序进行压 力测试,检测程序多久的时间会发生异常。 二、Monkey程序介绍 1) Monkey程序由Android系统自带,使用Java语言写成,在Android文件系统中的存放路径是:/system/framework/monkey.jar; 2) Monkey.jar程序是由一个名为“monkey”的Shell脚本来启动执行,shell脚本在Android文件系统中的存放路径是:/system/bin/monkey; 这样就可以通过在CMD窗口中执行: adb shell monkey {+命令参数}来进行Monkey测试了。 三、Monkey命令的简单帮助 要获取Monkey命令自带的简单帮助,在CMD中执行命令: adb shell monkey –help 四、Monkey命令参数介绍 1) 参数:-p 参数-p用于约束限制,用此参数指定一个或多个包(Package,即App)。指定 包之后,Monkey将只允许系统启动指定的APP。如果不指定包,Monkey将允许系统启动设备中的所有APP。 * 指定一个包:adb shell monkey -p com.htc.Weather 100 说明:com.htc.Weather为包名,100是事件计数(即让Monkey程序模拟100次随机用户事件)。 * 指定多个包:adb shell monkey -p com.htc.Weather –p com.htc.pdfreader -p com.htc.photo.widgets 100 * 不指定包:adb shell monkey 100 说明:Monkey随机启动APP并发送100个随机事件。 * 要查看设备中所有的包,在CMD窗口中执行以下命令: >adb shell #cd data/data #ls 2) 参数: -v 用于指定反馈信息级别(信息级别就是日志的详细程度),总共分3个级别,分别对应的参数如下表所示:

andriod自动化压力测试--monkey工具

有时候我们需要对一个软件进行压力测试,检查该软件的性能。如果是人工进行测试的话,效率会低很多,而且会比较枯燥。这时,Android 中的一个命令行工具Monkey就可以为我们减轻很多重复而又繁琐的工作。 一、Monkey简介 至于Monkey的名字是有何而来的呢?这个没有去怎么考究,Monkey这个工具就是一个调皮的猴子,在App中乱按、乱摸、乱滚、乱跳。Monkey测试是Android平台下自动化测试的一种快速有效的手段,通过Monkey工具可以模拟用户触摸屏幕、滑动轨迹球、按键等操作来对模拟器或者手机设备上的软件进行压力测试,检测该软件的稳定性、健壮性。它的原理是向系统发送伪随机的用户事件流(如按键输入、触摸输入、手势输入等),实现对正在开发的应用程序进行压力测试。 二、Monkey的特性 (1)测试的对象仅为应用程序包(apk包),有一定的局限性; (2)Monkey测试使用的事件流数据流是随机的,不能进行自定义; (3)可对MonkeyTest的对象、事件数量、类型、频率等进行设置。 虽然Monkey工具并不完善,但是足于应付应用程序的基本测试需要了。如果需要功能更强大的测试工具的话,可以使用Monkey的进化版MonkeyRunner。如果把Monkey看作是幼儿园的小孩,那么它的进化版MonkeyRunner就可以看作是一个初中生了。它支持自定义插件,控制事件,随时截图,简而言之,任何你在模拟器/设备中能干的事

情,MonkeyRunner都能干,而且还可以记录和回放。在这里,就不详细介绍MonkeyRunner了,具体可以参考其官方文档或者其他相关资料。 注:MonkeyRunner官方文档的网址 https://www.wendangku.net/doc/af11017349.html,/guide/developing/tools/monkeyrunner_c oncepts.html 三、Monkey的基本用法 基本语法如下: $ adb shell monkey [options] 如果不指定options,Monkey将以无反馈模式启动,并把事件任意发送到安装在目标环境中的全部包。下面是一个更为典型的命令行示例,它启动指定的应用程序,并向其发送1000个伪随机事件:$ adb shell monkey -p https://www.wendangku.net/doc/af11017349.html, -v number $ monkey -p(package的意思)指定文件名-v(测试的次数和频率)number(次数) 四、Monkey测试示例图解 通过简单的测试示例,初步了解并掌握Monkey测试的步骤。注意,这里主要是使用adb命令进行安装和相关操作。测试的具体参考步骤如下: (1)首先,先准备了一个测试用的应用程序(apk文件)。为了测试,这里选择了一个格瓦拉手机购票App进行测试。下载地址为: https://www.wendangku.net/doc/af11017349.html,/mobile/mobileMovie.xhtml。 下载好后,得到下图所示的apk文件。

monkey压力测试工具使用入门

安卓Monkey工具 对于安卓app,可以使用Monkey[MON01]工具,它是安卓软件开发工具包(SDK)。Monkey 工具在物理设备或仿真器上都可以运行。运行时它生成虚拟随机的用户事件比如触摸,点击,旋转,重击,减低音量,关闭网络连接等对app进行压力测试,看看app是如何处理所有这些输入和中断的。你需要安卓apk文件的安装包名来执行Monkey工具,不然该工具就会针对整个手机执行其的随机命令而不是只对被测APP了。有了app代码,就可以在AndroidManifest.xml中找到安装包名。如果只有编译的apk文件,移动测试员可以使用Android Asset 打包工具 [AAP02] (AAPT),从app上获得安装包名。AAPT位于安装好的Android SDK的build-tools文件夹中。AAPT的路径如下: 用下面的命令,可以从apk文件中读出安装包名。 输入就会如下所示: 如果有了安装包名(本例中是com.myApp),就用adb (Android Debug Bridge) [ADB03]执行Monkey。下列命令将开始Monkey: 2000年表明了Monkey将在app上执行的随机命令的数量。有一个额外的参数, Monkey 将再次生成相同序列的事件。这对Monkey执行期间再现一个bug真的很重要。 UI AutoMonkey 对于iOS app来说,还可以使用一个类似的工具——UI AutoMonkey [UIA04]。UI AutoMonkey也能生成多个命令来对iOS app进行压力测试。要使用UI AutoMonkey,UIAutomation工具模板就要配置Xcode。配置好了之后,需要写一个JavaScript文件讲明压力测试期间需要执行多少以及哪些命令。

monkey命令详解

Android上压力测试命令monkey详解 一、Monkey 是什么 ◆Monkey是Android SDK中附带的一个命令行工具,可以运行在模拟器或者实际设 备中 ◆向系统发送伪随机的用户事件流(按键输入、触摸屏输入、手势输入等) ◆实现对正在开发的应用程序进行压力测试 ◆Monkey测试是一种为了测试软件的稳定性、健壮性的快速有效的方法 二、Monkey程序介绍 ◆Monkey程序由Android系统自带,使用Java语言写成,在Android文件系统中 的存放路径是:/system/framework/monkey.jar ◆Monkey.jar程序是由一个名为“monkey”的Shell脚本来启动执行,shell脚本在 Android文件系统中的存放路径是:/system/bin/monkey 三、Monkey 测试的目的 开发人员结合monkey 打印的日志和系统打印的日志,分析测试中出现的问题 ◆ANR问题:在日志中搜索“ANR” ◆崩溃的问题:在日志中搜索“Exception” 说明: ANR:Application Not Responding,在Android中,如果应该程序有一段时间响应不够灵敏,系统会向用户显示一个对话框,这个对话框称作应用程序无响应对话框,用户可以选择“等待”而让程序继续运行,也可以选择“强制关闭”应用。好的程序应该能流畅运行,不能出现ANR问题。 四、Monkey 测试的特点 ◆测试的对象仅为应用程序包,有一定的局限性(不能对源码进行测试) ◆测试使用的所有事件流数据流都是随机产生的,不能进行自定义,不带任何人的主 观性 ◆可对MonkeyTest的对象,事件数量,类型,频率等进行设置 五、Monkey 命令详解 1、标准的monkey 命令 [adb shell] monkey [options] 如果不指定options,Monkey将以无反馈模式启动,并把事件任意发送到安装在目标环境中的全部包 如:adb shell monkey -p https://www.wendangku.net/doc/af11017349.html, -v 500 -p 指定测试程序包名

【Android Monkey自动测试工具使用报告】

关于Android Monkey自动化测试的报告 1自动化测试背景 软件测试是软件产品开发过程中的重要环节。测试对于发现软件中缺陷,保障软件的质量具有重要意义。统计表明,软件测试的时间通常占到软件开发时间的40%,一些可靠性要求高的软件甚至高达60%以上。 手工测试和自动化测试是软件测试的两种基本手段,二者相互补充,不可相互替代。其中,自动化测试能捕捉到资源冲突、多线程、死锁等手工测试难以发现的错误,可以高效的完成大量机械性、重复性测试,能模拟大量数据或大量并发用户等应用场景,从而有效的缩短软件测试周期,提高测试的可靠性及准确度。 2什么是Monkey Monkey测试是Android自动化测试的手段之一,它通过模拟用户的按键输入、触摸屏输入等,测试设备多长时间出现异常。Monkey是一个命令行工具,可以运行在模拟器或实际设备中,通过向系统发送伪随机的用户事件流,实现对全系统或某个应用程序进行压力测试。 Monkey工具使用非常简单,直接在命令窗口键入monkey命令即可进行测试。Monkey命令有较多的配置选项,为便于理解这些命令,此处先将其命令选项简单划分为四大类,在后文中陆续介绍各种命令选项的使用,然后在附录中附上整个monkey命令选项便于查阅。Monkey命令可简单分为如下四类: 基本配置选项,如设置尝试的事件数量 运行约束选项,如设置只对单独的一个包进行测试 事件类型和频率,如设置触摸屏事件的发生频率 调试选项,如设置忽略应用程序异常,继续向系统发送事件,直到计数完成 3使用monkey进行自动化测试 Monkey命令工具可以在模拟器和实际设备上使用。这里分别对两种环境下的monkey测试进行介绍。 3.1 在模拟器上运用Monkey进行自动化测试 3.1.1 monkey命令最简单用法 首先,介绍最简单monkey命令用法,其使用格式为如下: monkey n 其中,n为一个整数,表示用于测试的伪随机事件发生的次数。 如图3.1所示,启动模拟器。然后,在命令行窗口下输入adb shell命令,如图3.2所示。登录shell之后,即可使用monkey命令。最简单的用法是,直接在其后面指定一个数字,表示向系统发送事件的数量,如图3.3所示。模拟器的测试的结果如图3.4所示。

Android自动测试中的monkey工具使用方法

Android自动测试中的monkey工具使用方法 今天在公司使用Monkey Test这个工具进行android的自动化测试,感觉很不错,大家可以试试啊 以下是从网上看到的相关介绍,大家一起学习学习 简介 Monkey是一个命令行工具,可以运行在模拟器里或实际设备中。它向系统发送伪随机的用户事件流,实现对正在开发的应用程序进行压力测试。Monkey包括许多选项,它们大致分为四大类: ·基本配置选项,如设置尝试的事件数量。 ·运行约束选项,如设置只对单独的一个包进行测试。 ·事件类型和频率。 ·调试选项。 在Monkey运行的时候,它生成事件,并把它们发给系统。同时,Monkey还对测试中的系统进行监测,对下列三种情况进行特殊处理: ·如果限定了Monkey运行在一个或几个特定的包上,那么它会监测试图转到其它包的操作,并对其进行阻止。 ·如果应用程序崩溃或接收到任何失控异常,Monkey将停止并报错。 ·如果应用程序产生了应用程序不响应(application not responding)的错误,Monkey将会停止并报错。 按照选定的不同级别的反馈信息,在Monkey中还可以看到其执行过程报告和生成的事件。 Monkey基本用法 可以通过开发机器上的命令行或脚本来启动Monkey。由于Monkey运行在模拟器/设备环境中,所以必须用其环境中的shell来进行启动。可以通过在每条命令前加上adb shell来达到目的,也可以进入Shell后直接输入Monkey命令。基本语法如下: $ adb shell monkey [options]

如果不指定options,Monkey将以无反馈模式启动,并把事件任意发送到安装在目标环境中的全部包。下面是一个更为典型的命令行示例,它启动指定的应用程序,并向其发送500个伪随机事件: $ adb shell monkey -p https://www.wendangku.net/doc/af11017349.html, -v 500 命令选项参考 下表中列出了Monkey命令行可用的全部选项。 类别 选项 说明 常规 --help 列出简单的用法。 -v 命令行的每一个-v将增加反馈信息的级别。Level 0(缺省值)除启动提示、测试完成和最终结果之外,提供较少信息。Level 1提供较为详细的测试信息,如逐个发送到Activity的事件。Level 2提供更加详细的设置信息,如测试中被选中的或未被选中的Activity。 事件 -s 伪随机数生成器的seed值。如果用相同的seed值再次运行Monkey,它将生成相同的事件序列。 --throttle 在事件之间插入固定延迟。通过这个选项可以减缓Monkey的执行速度。如果不指定该选项,Monkey将不会被延迟,事件将尽可能快地被产成。 --pct-touch 调整触摸事件的百分比(触摸事件是一个down-up事件,它发生在屏幕上的某单一位置)。 --pct-motion 调整动作事件的百分比(动作事件由屏幕上某处的一个down事件、一系列的伪随机事件和一个up事件组成)。 --pct-trackball 调整轨迹事件的百分比(轨迹事件由一个或几个随机的移动组成,有时还伴随有点击)。

Monkeys Audio傻瓜教程

Monkeys Audio傻瓜教程 很多朋友不知道“APE”为何物,另外一些朋友下载到了APE文件之后不知道如何播放,所以写这样一篇傻瓜教程给广大菜鸟音乐爱好者还是很有必要的。 首先要弄清楚APE的本质,其实它是一种无损压缩音频格式。庞大的WAV音频文件可以通过Monkey's Audio这个软件进行“瘦身”压缩为APE。很多时候它被用做网络音频文件传输,因为被压缩后的APE文件容量要比WAV源文件小一半多,可以节约传输所用的时间。更重要的是,通过Monkey's Audio解压缩还原以后得到的WAV文件可以做到与压缩前的源文件完全一致。所以APE被誉为“无损音频压缩格式”,Monkey's Audio被誉为“无损音频压缩软件”。与采用WinZip 或者WinRAR这类专业数据压缩软件来压缩音频文件不同,压缩之后的APE音频文件是可以直接被播放的。Monkey's Audio会向Winamp中安装一个 “in_APE.dll”插件,从而使Winamp也具备播放APE文件的能力。 点击菜单栏下面第一个图标旁边向下的箭头,会出现一行单选项,第一项是“Compress”,第二项“Decompress”, 制作或是解压APE文件就靠这两个选项控制。Compress表示压缩,也就是 WAV=>APE;而Decompress表示解压缩,也就是APE=>WAV。如我们现在要将一个WAV压缩为APE,则选择“Compress”。下一步,我们则要选择,压缩的等级,按动第二个按钮边向下的箭头会出现“Fast”、“Normal”、“High”以及“Extra High”四个选项,分别代表不同的压缩等级,“Fast”级压缩速度最快,文件容量最大,以此类推,“Extra High”级压缩速度最慢,但压缩率最高,文件最小,大家可以按照自己的喜好选择最合适的压缩等级。随后便可以通过第三个或者第四个图标来加入单个WAV或者加入整个文件夹中的WAV文档。被选择的文件会出现在下面的信息栏当中。此时再按动第一个“Compress”按钮,软件就开始按照您指定的压缩等级开始工作了,进度栏在软件的右下方。 将APE还原为WAV也很方便,首先先要把软件设置在“Decompress”状态,按动第一个图标按钮选择相应的项目就行了,然后再按一下按钮,软件就自动开始解压缩工作了。 使用 Exact Audio Copy 软件,可以一次性整盘抓轨,制作成整轨CDImage.ape 文件,同时具备了CDImage.cue文件。 制作方法如下: 选择压缩选项,出现选项对话框。 在“外部压缩程序”项内,去掉“使用外部压缩程序”的选择。 在“波形”选项内,波形格式自动为“猴子3.97”,采样格式选择为如图所示的选项,含义为正常压缩。 点操作??抓取镜像并创建CUE目录文件??已压缩,开始压缩。 压缩时首先检测音轨,开始整轨抓光盘;自动进行APE压缩,保存成CDImage.ape,并产生CDImage.cue文件。

介绍5种Android自动化测试工具

作为一名软件研发者,对于Android你肯定不会陌生。随着科技的日新月异,Android 在我们的生活中已经变得无处不在,手机就是一个最好的例子,我们现在常常都会用到手机。但是你知道Android自动化测试的工具有哪几种吗?小编现在就一一为你讲解。 随着科技的发展,现在已经有很多的Android自动化测试架构或工具可以供我们使用了,其中包括:ActivityInstrumentation,DroidPilot,MonkeyRunner,Robotium,以及Robolectric。另外LessPainful也提供了服务来进行真实设备上的自动化测试。 其实,Android自身就已经提供了对instrumentation测试的基本支持,其中之一就是位于Android.test包内的ActivityInstrumentationTestCase2类,它扩展了JUnit的TestCase类用来提供Androidactivities的功能测试。在应用测试中,每一个Activity首先都会被Instrumentation初始化,然后再加载到Android模拟器或设备的Dalvik虚拟机中来执行。 1.DroidPilot:一个新出android自动化测试工具 DroidPilot是一个自动化测试工具。它可以针对于Android平台的应用程序进行测试 脚本编辑、自动回放、结果检查、报告输出等操作,以此来缩短回归测试的时间和提升项目整体进度。测试的脚本不仅可以运行于模拟器,更可以同时运行于多台移动设备,这样更能凸显测试结果的真实性和可比性。 2.MonkeyRunner:AndroidSDK自带一个测试工具 MonkeyRunner提供的API和执行环境可以运行Python语言编写的测试代码。它提供了API来连接设备,安装、卸载应用,运行应用,截屏,比对图片来判断特定命令执行后的屏幕是否包含预期信息,以及运行对应用的测试。MonkeyRunner使用ActivityInstrumentationTestCase2,ProviderTestCase, ServiceTestCasek,SingleLaunchActivityTestCase及其他类来定义测试用例,并使用InstrumentationTestRunner类来运行测试。 3.Robotium:被称之为针对Android应用的又一个Selenium Robotium是另一种通过InstrumentationTestRunner来完成Android交互式测试的架构,它可以横跨多个activities,并且支持功能测试,系统测试和接收测试。Robotium支持Activities、Dialogs、Toasts、Menus、ContextMenus甚至Honeycomb,并且它可以同Maven和Ant集成来完成持续集成测试。 4.Robolectric:Pivotal实验室声称使用Robolectric可以在28秒内运行1047个测 试 Robolectric另辟蹊径,它并不依赖于Android提供的测试功能,它使用了shadowobjects并且运行测试于普通的工作站、服务器JVM,不像模拟器或设备需要 dexing(Androiddex编译器将类文件编译成Android设备上的DalvikVM使用的格式),打包,部署和运行的过程,大大减少了测试执行的时间。

monkeyrunner详细介绍以及编写简单的python脚本

MonkeyRunner: monkeyrunner工具提供了一个API,使用此API写出的程序可以在Android代码之外控制Android设备和模拟器。通过monkeyrunner,您可以写出一个Python程序去安装一个Android应用程序或测试包,运行它,向它发送模拟击键,截取它的用户界面图片,并将截图存储于工作站上。monkeyrunner工具的主要设计目的是用于测试功能/框架水平上的应用程序和设备,或用于运行单元测试套件,但您当然也可以将其用于其它目的。 monkeyrunner工具与用户界面/应用程序测试工具,也称为monkey工具并无关联。m onkey工具直接运行在设备或模拟器的adbshell中,生成用户或系统的伪随机事件流。而monkeyrunner工具则是在工作站上通过API定义的特定命令和事件控制设备或模拟器。1、MonkeyRunner的特性 1)多设备控制:monkeyrunner API可以跨多个设备或模拟器实施测试套件。您可以在同 一时间接上所有的设备或一次启动全部模拟器(或统统一起),依据程序依次连接到每一个,然后运行一个或多个测试。您也可以用程序启动一个配置好的模拟器,运行一个或多个测试,然后关闭模拟器。 2)功能测试:monkeyrunner可以为一个应用自动贯彻一次功能测试。您提供按键或触摸 事件的输入数值,然后观察输出结果的截屏。 3)回归测试:monkeyrunner可以运行某个应用,并将其结果截屏与既定已知正确的结果 截屏相比较,以此测试应用的稳定性。 4)可扩展的自动化:由于monkeyrunner是一个API工具包,您可以基于Python模块和 程序开发一整套系统,以此来控制Android设备。除了使用monkeyrunner API之外,您还可以使用标准的Python os和subprocess模块来调用如adb这样的Android 工具。 您还可以向monkeyrunner API中添加您自己的类。我们将在使用插件扩展monkeyrun ner一节中对此进行详细讨论。 2、一个简单的monkeyrunner程序实例 以下为一个简单的monkeyrunner程序,它将会连接到一个设备,创建一个MonkeyDev ice对象。使用MonkeyDevice对象,程序将安装一个Android应用包,运行其中一个活动,并向其发送按键事件。程序接下来会将结果截图,创建一个MonkeyImage对象,并使用这个对象截图将保存至.png文件。 # 导入此程序所需的monkeyrunner模块 from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice # 连接当前设备,返回一个MonkeyDevice对象 device = MonkeyRunner.waitForConnection() # 安装Android包,注意,此方法返回的返回值为boolean,由此您可以判断安装过程是否正常 device.installPackage('myproject/bin/MyApplication.apk') # 运行此应用中的一个活动device.startActivity(component='com.android.settings/.Settings')

相关文档