Monkey testing

Last updated

In software testing, monkey testing is a technique where the user tests the application or system by providing random inputs and checking the behavior, or seeing whether the application or system will crash. Monkey testing is usually implemented as random, automated unit tests.

Contents

While the source of the name "monkey" is uncertain, it is believed by some that the name has to do with the infinite monkey theorem, [1] which states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare. Some others believe that the name comes from the classic Mac OS application "The Monkey" developed by Steve Capps prior to 1983. It used journaling hooks to feed random events into Mac programs, and was used to test for bugs in MacPaint. [2]

Monkey Testing is also included in Android Studio as part of the standard testing tools for stress testing. [3]

Types of monkey testing

Monkey testing can be categorized into smart monkey tests or dumb monkey tests.

Smart monkey tests

Smart monkeys are usually identified by the following characteristics: [4]

Some smart monkeys are also referred to as brilliant monkeys,[ citation needed ] which perform testing as per user's behavior and can estimate the probability of certain bugs.

Dumb monkey tests

Dumb monkeys, also known as "ignorant monkeys", are usually identified by the following characteristics:[ citation needed ]

Advantages and disadvantages

Advantages

Monkey testing is an effective way to identify some out-of-the-box errors. Since the scenarios tested are usually ad-hoc, monkey testing can also be a good way to perform load and stress testing. The intrinsic randomness of monkey testing also makes it a good way to find major bugs that can break the entire system. The setup of monkey testing is easy, therefore good for any application. Smart monkeys, if properly set up with an accurate state model, can be really good at finding various kinds of bugs.

Disadvantages

The randomness of monkey testing often makes the bugs found difficult or impossible to reproduce. Unexpected bugs found by monkey testing can also be challenging and time consuming to analyze. In some systems, monkey testing can go on for a long time before finding a bug. For smart monkeys, the ability highly depends on the state model provided, and developing a good state model can be expensive. [1]

Similar techniques and distinctions

While monkey testing is sometimes treated the same as fuzz testing [5] and the two terms are usually used together, [6] some believe they are different by arguing that monkey testing is more about random actions while fuzz testing is more about random data input. [7] Monkey testing is also different from ad-hoc testing in that ad-hoc testing is performed without planning and documentation and the objective of ad-hoc testing is to divide the system randomly into subparts and check their functionality, which is not the case in monkey testing.

See also

Related Research Articles

Software testing is the act of examining the artifacts and the behavior of the software under test by validation and verification. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation. Test techniques include, but are not necessarily limited to:

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

C++Builder is a rapid application development (RAD) environment for developing software in the C++ programming language. Originally developed by Borland, as of 2009 it is owned by Embarcadero Technologies, a subsidiary of Idera. C++Builder can compile apps for Windows, iOS, macOS, and Android. It includes tools that allow drag-and-drop visual development, making programming easier by incorporating a WYSIWYG graphical user interface builder.

<span class="mw-page-title-main">Delphi (software)</span> General-purpose programming language and a software product

Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop, mobile, web, and console software, currently developed and maintained by Embarcadero Technologies.

<span class="mw-page-title-main">Fuzzing</span> Automated software testing technique

In programming and software development, fuzzing or fuzz testing is an automated software testing technique that involves providing invalid, unexpected, or random data as inputs to a computer program. The program is then monitored for exceptions such as crashes, failing built-in code assertions, or potential memory leaks. Typically, fuzzers are used to test programs that take structured inputs. This structure is specified, e.g., in a file format or protocol and distinguishes valid from invalid input. An effective fuzzer generates semi-valid inputs that are "valid enough" in that they are not directly rejected by the parser, but do create unexpected behaviors deeper in the program and are "invalid enough" to expose corner cases that have not been properly dealt with.

In computer programming, an input kludge is a type of failure in software where simple user input is not handled. For example, if a computer program accepts free text input from the user, an ad hoc algorithm will mishandle many combinations of legal and illegal input strings. Input kludges are usually difficult for a programmer to detect in a unit test, but very easy for the end user to find. The evidence exists that the end user can easily crash software that fails to correctly handle user input. Indeed, the buffer overflow security hole is an example of the problems caused.

<span class="mw-page-title-main">Metasploit</span> Computer security testing tool

The Metasploit Project is a computer security project that provides information about security vulnerabilities and aids in penetration testing and IDS signature development. It is owned by Boston, Massachusetts-based security company Rapid7.

Dynamic program analysis is analysis of computer software that involves executing the program in question. Dynamic program analysis includes familiar techniques from software engineering such as unit testing, debugging, and measuring code coverage, but also includes lesser-known techniques like program slicing and invariant inference. Dynamic program analysis is widely applied in security in the form of runtime memory error detection, fuzzing, dynamic symbolic execution, and taint tracking.

In software engineering, graphical user interface testing is the process of testing a product's graphical user interface (GUI) to ensure it meets its specifications. This is normally done through the use of a variety of test cases.

Stress testing is a software testing activity that determines the robustness of software by testing beyond the limits of normal operation. Stress testing is particularly important for "mission critical" software, but is used for all types of software. Stress tests commonly put a greater emphasis on robustness, availability, and error handling under a heavy load, than on what would be considered correct behavior under normal circumstances.

<span class="mw-page-title-main">TestComplete</span> Software test automation tool

TestComplete is a functional automated testing platform developed by SmartBear Software. TestComplete gives testers the ability to create automated tests for Microsoft Windows, Web, Android, and iOS applications. Tests can be recorded, scripted or manually created with keyword driven operations and used for automated playback and error logging.

Concolic testing is a hybrid software verification technique that performs symbolic execution, a classical technique that treats program variables as symbolic variables, along a concrete execution path. Symbolic execution is used in conjunction with an automated theorem prover or constraint solver based on constraint logic programming to generate new concrete inputs with the aim of maximizing code coverage. Its main focus is finding bugs in real-world software, rather than demonstrating program correctness.

Metamorphic testing (MT) is a property-based software testing technique, which can be an effective approach for addressing the test oracle problem and test case generation problem. The test oracle problem is the difficulty of determining the expected outcomes of selected test cases or to determine whether the actual outputs agree with the expected outcomes.

<span class="mw-page-title-main">FireMonkey</span>

FireMonkey is a cross-platform GUI framework developed by Embarcadero Technologies for use in Delphi, C++Builder or Python, using Object Pascal, C++ or Python to build cross platform applications for Windows, macOS, iOS, and Android. A 3rd party library, FMX Linux, enables the building of FireMonkey applications on Linux.

Random testing is a black-box software testing technique where programs are tested by generating random, independent inputs. Results of the output are compared against software specifications to verify that the test output is pass or fail. In case of absence of specifications the exceptions of the language are used which means if an exception arises during test execution then it means there is a fault in the program, it is also used as a way to avoid biased testing.

<span class="mw-page-title-main">Data scraping</span> Data extraction technique

Data scraping is a technique where a computer program extracts data from human-readable output coming from another program.

<span class="mw-page-title-main">American fuzzy lop (fuzzer)</span> Software fuzzer that employs genetic algorithms

American fuzzy lop (AFL), stylized in lowercase as american fuzzy lop, is a free software fuzzer that employs genetic algorithms in order to efficiently increase code coverage of the test cases. So far it has detected dozens of significant software bugs in major free software projects, including X.Org Server, PHP, OpenSSL, pngcrush, bash, Firefox, BIND, Qt, and SQLite.

This article discusses a set of tactics useful in software testing. It is intended as a comprehensive list of tactical approaches to Software Quality Assurance (more widely colloquially known as Quality Assurance and general application of the test method.

Differential testing, also known as differential fuzzing, is a popular software testing technique that attempts to detect bugs, by providing the same input to a series of similar applications, and observing differences in their execution. Differential testing complements traditional software testing, because it is well-suited to find semantic or logic bugs that do not exhibit explicit erroneous behaviors like crashes or assertion failures. Differential testing is sometimes called back-to-back testing.

This page details the history of the programming language and software product Delphi.

References

  1. 1 2 "What is Monkey Testing | IT Training and Consulting – Exforsys". www.exforsys.com. Retrieved 2016-04-22.
  2. "Folklore.org: Monkey Lives". www.folklore.org. Retrieved 2016-04-22.
  3. "UI/Application Exerciser Monkey | Android Developers". developer.android.com. Retrieved 2016-04-25.
  4. Patton, Ron (2001). "Random Testing: Monkeys and Gorillas". Software testing. Indianapolis, Ind: Sams. ISBN   978-0-672-31983-9.
  5. Brummayer, Robert; Lonsing, Florian; Biere, Armin (2010-07-11). Strichman, Ofer; Szeider, Stefan (eds.). Automated Testing and Debugging of SAT and QBF Solvers. Lecture Notes in Computer Science. Springer Berlin Heidelberg. pp. 44–57. CiteSeerX   10.1.1.365.777 . doi:10.1007/978-3-642-14186-7_6. ISBN   9783642141850.
  6. "Fuzz Testing in Delphi - DelphiTools". www.delphitools.info. Retrieved 2016-04-22.
  7. "Difference between "fuzz testing" and "monkey test"". stackoverflow.com. Retrieved 2016-04-22.