15 ms·
Is user a monkey?
- kevingadd 16y agoProbably related: http://folklore.org/StoryView.py?project=Macintosh&story=Monkey_Lives.txt http://folklore.org/StoryView.py?project=Macintosh&story...
- pgbovine 16y agowhen i was doing Palm OS programming back in the stone age, i remember the simulator had a "monkey testing mode", where it would just generate GUI events randomly. it was actually quite useful for uncovering sporadic crashes. EDIT: ha, i found a reference, they're called Gremlins http://users.jyu.fi/~mweber/teaching/docs/palmos/book/ch10.htm#P370_19896 http://users.jyu.fi/~mweber/teaching/docs/palmos/book/ch10.h...
- mayanklahiri 16y agoI believe it's also called "fuzz testing"
- JoelSutherland 16y agoCalling them Gremlins is actually a reference to the British Royal Air Force in WWII. The airmen would blame 'gremlins' for mechanical issues or even problems during flight. http://en.wikipedia.org/wiki/Gremlin#Origins http://en.wikipedia.org/wiki/Gremlin#Origins Famous children's author Roald Dahl popularized them after he left the RAF to become a writer. If you get a chance, read a biography of Roald Dahl. He truely was the most interesting man in the world. (WWII Ace Fighter Pilot, British Secret Agent, invented a brain-heart valve, married an Academy Award winning actress, pioneered a stroke recovery program and sold over 100 million books.)
- itsnotvalid 16y agoI remembered reading his books in my younger ages.
- pretz 16y agoThat's exactly why this method exists on Android. They have a similar testing tool called Monkey: http://developer.android.com/guide/developing/tools/monkey.html http://developer.android.com/guide/developing/tools/monkey.h...
- Deestan 16y agoDoesn't it defeat the testing purpose if you perform a check to take a different code path when the testing tool runs?
- lallysingh 16y agoI'll assume that it's best to put in the check after you've found a bug. Perhaps something that the monkey triggers that isn't very high on your human-customer buglist.
- ceejayoz 16y agoI'd imagine there are occasional uses for it. You could use it to start the app with a particular state you wish to test with Monkey, while leaving it usable for human users.
- flogic 16y agoMaybe. Sometimes no matter how hard you try test and production are significantly different. I wind up in a number of situations where any meaningful testing has to be done in production.
- johnrob 16y agoYou might avoid doing certain write-esque operations if you know you are in test mode. For example, you wouldn't want to charge a credit card or update someone's facebook status.
- Deestan 16y agoThat makes sense. It didn't occur to me that someone might want to run a monkey test in a live environment, but I guess it is necessary sometimes.
- scrrr 16y agoMake sure to not use this method when targeting anything below API Level 8.
- deleted 16y ago[deleted]
- adk 16y agoThis is referring to a test tool called The Monkey: http://developer.android.com/guide/developing/tools/monkey.html http://developer.android.com/guide/developing/tools/monkey.h...
- icefox 16y agoThe documentation really should mention that.
- thefool 16y agoWhat does it return?
- bmelton 16y agouhhh, True?
- orangecat 16y agohttp://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/ActivityManagerNative.java;h=f69428589e07534eeaf571f0395d289f87d1414a;hb=c1c45a4dc950865a7f5f76d8aab56be0cc8e0e91 http://android.git.kernel.org/?p=platform/frameworks/base.gi...
- sshconnection 16y agoonTransact makes me die a little bit on the inside. Must... refactor....
- nuclear_eclipse 16y agoDoesn't seem to work well, I ran this code on my mom's phone and it returned False. I'll have submit a bug report when I get home...
- Tyrannosaurs 16y agoYou're claiming to be directly and immediately descended from a monkey? Can you come and meet some creationists I know? I can't wait to knock the smug looks off their faces.
- adolfoabegg 16y agoInfinite monkey theorem applies too I think... http://en.wikipedia.org/wiki/Infinite_monkey_theorem http://en.wikipedia.org/wiki/Infinite_monkey_theorem
- tlholaday 16y agoMore euphonious in a ternary operator than an if clause: value = isUserAMonkey() ? left : right ; if (isUserAMonkey()) { ... } For an if clause, I prefer userIsAMonkey: if (userIsAMonkey) { ... }
- ramchip 16y agoIt also sounds better when you consider that the booleans are called True and False: isUserAMonkey -> Yes/No userIsAMonkey -> True/False
- kd0amg 16y agoI guess this goes up there with Be's is_computer_on_fire() http://www.tycomsystems.com/beos/BeBook/The%20Kernel%20Kit/System.html http://www.tycomsystems.com/beos/BeBook/The%20Kernel%20Kit/S...
- ben1040 16y agoOr "lp0 on fire"... http://en.wikipedia.org/wiki/Lp0_on_fire http://en.wikipedia.org/wiki/Lp0_on_fire
- lesterbuck 16y agoIn 1993, I was taking a course in Software Verification & Validation at the Univ of Houston Clear Lake, next door to Johnson Space Center and down the street from the IBM division doing the Space Shuttle software. That is the group that is CMM Level 5 and gets a bug report about once a year or so. It happened that the instructor of this course was a mid-level IBM tech guy in that organization. And he had stories... After Challenger blew up, NASA demanded that every shuttle vendor report the cumulative probability that their component of the system would lead to a loss of vehicle accident. NASA took all those probabilities and came up with their best guess of the probability of a loss of vehicle accident for each flight. While Feynman praised the software process for the shuttle, the software group still had to come up with their number. So the instructor said they took all their statistics from the (individual, unique) software loads for each historical flight, and included the failures from their loss of vehicle accidents. "Say what? The shuttle software hasn't had any loss of vehicle accidents." Well, turns out it had. Each unique software load for each mission is tested and trained against for many months before it flies. Sometimes they fail, just not yet in actual flight. For example, apparently one time the shuttle crew was practicing launch aborts, where the launch is aborted just after clearing the pad and the orbiter lands like a glider. About the only crew member involved in that is the pilot. Everyone else is just strapped in being bored, and after a few hours of sitting still, the co-pilot got "frisky." During the launch phase, he randomly tapped some keys on his keypad and ... BOOM! Loss of vehicle accident. Monkeys at work! I suppose it could be argued that with all the bumping around during the launch phase, a stray hand could accidentally "fuzz" that keypad.
- oiuyhgftrhyjuk 16y agoThat's why modern fly-by-wire aircraft have a crew of two = one man and one dog. The man's job is to feed the dog, and the dog's job is to bite the man if he tries to touch any of the controls.
- AttentionStepFn 16y agoAlways assume yes, at least when it comes to stress testing.
- mlni 16y agoSkype must to have a similarly named function in it. In skype chat window, when you press random keys on a keyboard in groups, the other side sees a cat icon in the chat. Kind of neat of them to think of that.
- regularfry 16y ago"Catlike typing detected" goes back (I think) to this: http://www.bitboost.com/pawsense/ http://www.bitboost.com/pawsense/
- sabat 16y ago"The customer is not an idiot. She is your wife." --Jean-Louis Gassee