Testing implementation: Difference between revisions

From Computer Science Wiki
No edit summary
 
(23 intermediate revisions by one other user not shown)
Line 4: Line 4:
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. 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 the process of executing a program or application with the intent of finding software bugs (errors or other defects).
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. 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 the process of executing a program or application with the intent of finding software bugs (errors or other defects).


Software testing involves the execution of a software component or system component to evaluate one or more properties of interest. In general, these properties indicate the extent to which the component or system under test:
Software testing involves the execution of a software component or system component to evaluate one or more properties of interest. In general, these properties indicate the extent to which the component or system under test<ref>https://en.wikipedia.org/wiki/Software_testing</ref>:


* meets the requirements that guided its design and development,
* meets the requirements that guided its design and development,
Line 11: Line 11:
* is sufficiently usable,
* is sufficiently usable,
* can be installed and run in its intended environments, and
* can be installed and run in its intended environments, and
* achieves the general result its stakeholders desire.<ref>https://en.wikipedia.org/wiki/Software_testing</ref>
* achieves the general result its stakeholders desire.
<br />
<br />
=== What the IB wants you to know about testing ===


The crucial importance of testing at all stages of implementation should be emphasized, with the stages clearly defined.
Types of testing can include: user acceptance testing, debugging, beta testing.
Students should be aware that there are programs that can test other programs, thereby automating parts of the testing process and reducing costs.
=== Video ===
Please watch this video for a nice example:
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/TDynSmrzpXw" frameborder="0" allowfullscreen></iframe>
</html>
===  Distinctions ===
It will be helpful to understand these distinctions:  
It will be helpful to understand these distinctions:  


Line 26: Line 42:


Validation is the process to make sure the product satisfies the specified requirements at the end of the development phase. In other words, to make sure the product is built as per customer requirements.<ref>http://www.codeproject.com/Tips/351122/What-is-software-testing-What-are-the-different-ty</ref>
Validation is the process to make sure the product satisfies the specified requirements at the end of the development phase. In other words, to make sure the product is built as per customer requirements.<ref>http://www.codeproject.com/Tips/351122/What-is-software-testing-What-are-the-different-ty</ref>
Please watch this video for a nice example:
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/TDynSmrzpXw" frameborder="0" allowfullscreen></iframe>
</html>
=== SL version ===
Testing seeks to answer the simple question: '''does this unit of code work the way it is supposed to work'''. Another way of asking this question is '''is this software defect-free'''?  In order to answer this question, you need to exactly understand: 
# what unit of code you are testing
# how is it supposed to work (which normally is derived from a design document or blueprint)
There are different types of testing. You should be able to recognize different types of testing, describe the purpose of each type of testing, and given an scenario, suggest appropriate testing approaches.


===Types of testing ===
===Types of testing ===
 
There are different types of testing. You should be able to recognize different types of testing, describe the purpose of each type of testing, and given a scenario, suggest appropriate testing approaches.
==== Installation testing ====
See [https://en.wikipedia.org/wiki/Software%20testing Wikipedia Software Testing]. Specifically: [https://en.wikipedia.org/wiki/Software%20testing Testing Levels]
 
An installation test assures that the system is installed correctly and working at actual customer's hardware.
 
==== Compatibility testing ====
 
A common cause of software failure (real or perceived) is a lack of its compatibility with other application software, operating systems (or operating system versions, old or new), or target environments that differ greatly from the  original (such as a terminal or GUI application intended to be run on the desktop now being required to become a web application, which must render in a web browser). For example, in the case of a lack of backward compatibility, this can occur because the programmers develop and test software only on the latest version of the target environment, which not all users may be running. This results in the unintended consequence that the latest work may not  function on earlier versions of the target environment, or on older hardware that earlier versions of the target environment was capable of using. Sometimes such issues can be fixed by proactively abstracting operating system  functionality into a separate program module or library.
 
==== Smoke and sanity testing ====
 
Sanity testing determines whether it is reasonable to proceed with further testing.
Smoke testing consists of minimal attempts to operate the software, designed to determine whether there are any basic problems that will prevent it from working at all. Such tests can be used as build verification test.
 
==== Regression testing ====
 
Regression testing focuses on finding defects after a major code change has occurred. Specifically, it seeks to uncover software regressions, as degraded or lost features, including old bugs that have come back. Such regressions occur whenever software functionality that was previously working correctly, stops working as intended. Typically, regressions occur as an unintended consequence of program changes, when the newly developed part of the  software collides with the previously existing code. Common methods of regression testing include re-running previous sets of test-cases and checking whether previously fixed faults have re-emerged. The depth of testing  depends on the phase in the release process and the risk of the added features. They can either be complete, for changes added late in the release or deemed to be risky, or be very shallow, consisting of positive tests on each  feature, if the changes are early in the release or deemed to be of low risk. Regression testing is typically the largest test effort in commercial software development,[38] due to checking numerous details in prior software features,  and even new software can be developed while using some old test-cases to test parts of the new design to ensure prior functionality is still supported.


==== Acceptance testing ====
==== Acceptance testing ====


Acceptance testing can mean one of two things:
  Acceptance testing performed by the customer, often in their lab environment on their own hardware, is known as user acceptance testing (UAT). Acceptance testing may be performed as part of the hand-off process between any two phases of development.
 
A smoke test is used as an acceptance test prior to introducing a new build to the main testing process, i.e., before integration or regression.
  Acceptance testing performed by the customer, often in their lab environment on their own hardware, is known as user acceptance testing (UAT). Acceptance testing may be performed as part of the hand-off process between any two phases of development.


==== Alpha testing ====
Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. Alpha testing is often employed for off-the-shelf software as a form of internal acceptance  testing, before the software goes to beta testing.


==== Beta testing ====
==== Beta testing ====


  Beta testing comes after alpha testing and can be considered a form of external user acceptance testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team   known as beta testers. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Beta versions can be made available to the open public to increase the feedback field to a   maximal number of future users and to deliver value earlier, for an extended or even indefinite period of time (perpetual beta).[citation needed]
  Beta testing comes after alpha testing and can be considered a form of external user acceptance testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team known as beta testers. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Beta versions can be made available to the open public to increase the feedback field to a maximal number of future users and to deliver value earlier, for an extended or even indefinite period of time (perpetual beta).
 
==== Functional vs non-functional testing ====
 
Functional testing refers to activities that verify a specific action or function of the code. These are usually found in the code requirements documentation, although some development methodologies work from use cases or user  stories. Functional tests tend to answer the question of "can the user do this" or "does this particular feature work."
 
Non-functional testing refers to aspects of the software that may not be related to a specific function or user action, such as scalability or other performance, behavior under certain constraints, or security. Testing will determine the  breaking point, the point at which extremes of scalability or performance leads to unstable execution. Non-functional requirements tend to be those that reflect the quality of the product, particularly in the context of the suitability  perspective of its users.
 
==== Continuous testing ====
 
Continuous testing is the process of executing automated tests as part of the software delivery pipeline to obtain immediate feedback on the business risks associated with a software release candidate.[40][41] Continuous testing  includes the validation of both functional requirements and non-functional requirements; the scope of testing extends from validating bottom-up requirements or user stories to assessing the system requirements associated with  overarching business goals.
 
==== Destructive testing ====
 
Destructive testing attempts to cause the software or a sub-system to fail. It verifies that the software functions properly even when it receives invalid or unexpected inputs, thereby establishing the robustness of input validation  and error-management routines.[citation needed] Software fault injection, in the form of fuzzing, is an example of failure testing. Various commercial non-functional testing tools are linked from the software fault injection page; there  are also numerous open-source and free software tools available that perform destructive testing.
 
==== Performance testing ====
 
Performance testing is generally executed to determine how a system or sub-system performs in terms of responsiveness and stability under a particular workload. It can also serve to investigate, measure, validate or verify other  quality attributes of the system, such as scalability, reliability and resource usage.
 
==== Load testing ====
 
Load testing is primarily concerned with testing that the system can continue to operate under a specific load, whether that be large quantities of data or a large number of users. This is generally referred to as software scalability.  The related load testing activity of when performed as a non-functional activity is often referred to as endurance testing. Volume testing is a way to test software functions even when certain components (for example a file or  database) increase radically in size. Stress testing is a way to test reliability under unexpected or rare workloads. Stability testing (often referred to as load or endurance testing) checks to see if the software can continuously  function well in or above an acceptable period.
 
There is little agreement on what the specific goals of performance testing are. The terms load testing, performance testing, scalability testing, and volume testing, are often used interchangeably.
 
Real-time software systems have strict timing constraints. To test if timing constraints are met, real-time testing is used.
 
==== Usability testing ====
 
Usability testing is to check if the user interface is easy to use and understand. It is concerned mainly with the use of the application.
 
==== Accessibility testing ====
 
Accessibility testing may include compliance with standards such as:
 
* Americans with Disabilities Act of 1990
* Section 508 Amendment to the Rehabilitation Act of 1973
* Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C)
 
 
==== Security testing ====
 
* Security testing is essential for software that processes confidential data to prevent system intrusion by hackers.
 
The International Organization for Standardization (ISO) defines this as a "type of testing conducted to evaluate the degree to which a test item, and associated data and information, are protected to that unauthorised persons or  systems cannot use, read or modify them, and authorized persons or systems are not denied access to them."[45]
 
==== Internationalization and localization ====
 
The general ability of software to be internationalized and localized can be automatically tested without actual translation, by using pseudolocalization. It will verify that the application still works, even after it has been translated i into a new language or adapted for a new culture (such as different currencies or time zones).[46]
 
Actual translation to human languages must be tested, too. Possible localization failures include:
 
* Software is often localized by translating a list of strings out of context, and the translator may choose the wrong translation for an ambiguous source string.
* Technical terminology may become inconsistent if the project is translated by several people without proper coordination or if the translator is imprudent.
* Literal word-for-word translations may sound inappropriate, artificial or too technical in the target language.
* Untranslated messages in the original language may be left hard coded in the source code.
* Some messages may be created automatically at run time and the resulting string may be ungrammatical, functionally incorrect, misleading or confusing.
* Software may use a keyboard shortcut which has no function on the source language's keyboard layout, but is used for typing characters in the layout of the target language.
* Software may lack support for the character encoding of the target language.
* Fonts and font sizes which are appropriate in the source language may be inappropriate in the target language; for example, CJK characters may become unreadable if the font is too small.
* A string in the target language may be longer than the software can handle. This may make the string partly invisible to the user or cause the software to crash or malfunction.
* Software may lack proper support for reading or writing bi-directional text.
* Software may display images with text that was not localized.
* Localized operating systems may have differently named system configuration files and environment variables and different formats for date and currency.
 
==== Development testing ====
 
Development Testing is a software development process that involves synchronized application of a broad spectrum of defect prevention and detection strategies in order to reduce software development risks, time, and costs. It is  performed by the software developer or engineer during the construction phase of the software development lifecycle. Rather than replace traditional QA focuses, it augments it. Development Testing aims to eliminate construction  errors before code is promoted to QA; this strategy is intended to increase the quality of the resulting software as well as the efficiency of the overall development and QA process.
 
Depending on the organization's expectations for software development, Development Testing might include static code analysis, data flow analysis, metrics analysis, peer code reviews, unit testing, code coverage analysis,  traceability, and other software verification practices.
 
==== A/B testing ====
 
A/B testing is basically a comparison of two outputs, generally when only one variable has changed: run a test, change one thing, run the test again, compare the results. This is more useful with more small-scale situations, but very useful in fine-tuning any program. With more complex projects, multivariant testing can be done.
 
==== Concurrent testing ====
 
In concurrent testing, the focus is on the performance while continuously running with normal input and under normal operational conditions, as opposed to stress testing, or fuzz testing. Memory leak, as well as basic faults are easier to find with this method.
 
==== Conformance testing or type testing ====
 
In software testing, conformance testing verifies that a product performs according to its specified standards. Compilers, for instance, are extensively tested to determine whether they meet the recognized standard for that language.<ref>https://en.wikipedia.org/wiki/Software_testing#Testing_types</ref>
 
=== HL version ===
In addition to understanding everything in the SL version:
 
==== Unit testing ====
 
Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing is often automated but it can also be done manually. This testing mode is a component of Extreme Programming (XP), a pragmatic method of software development that takes a meticulous approach to building a product by means of continual testing and revision.<ref>http://searchsoftwarequality.techtarget.com/definition/unit-testing</ref>
 
Adding tests into the software you write adds more time to  implementations, but saves time in the long run. You should:
 
# define unit testing
# create a php unit test for a small piece of code
 
== Real-world practical advice ==
 
The crucial importance of testing at all stages of implementation should be emphasized, with the stages clearly defined.
Types of testing can include: user acceptance testing, debugging, beta testing.
Students should be aware that there are programs that can test other programs, thereby automating parts of the testing process and reducing costs.
Inadequate testing can reduce employee productivity and lead to end-user dissatisfaction.
 
== Do you understand this material? ==
 


==== Debugging ====


== Do you have an advanced understanding of this material? ==
In computers, debugging is the process of locating and fixing or bypassing bugs (errors) in computer program code or the engineering of a hardware device. To debug a program or hardware device is to start with a problem, isolate the source of the problem, and then fix it. A user of a program that does not know how to fix the problem may learn enough about the problem to be able to avoid it until it is permanently fixed. When someone says they've debugged a program or "worked the bugs out" of a program, they imply that they fixed it so that the bugs no longer exist.<ref>http://searchsoftwarequality.techtarget.com/definition/debugging</ref>


Debugging is the process of finding and resolving of defects that prevent correct operation of computer software or a system. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another.<ref>https://en.wikipedia.org/wiki/Debugging#Typical_debugging_process</ref>


Please see also our fuller [[Debugging]] article.


== Standards ==
== Standards ==


* Suggest various types of testing. [[Level 3]]
* Suggest various types of testing.


== References ==
== References ==

Latest revision as of 14:44, 23 February 2024

System Fundamentals[1]


Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. 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 the process of executing a program or application with the intent of finding software bugs (errors or other defects).

Software testing involves the execution of a software component or system component to evaluate one or more properties of interest. In general, these properties indicate the extent to which the component or system under test[2]:

  • meets the requirements that guided its design and development,
  • responds correctly to all kinds of inputs,
  • performs its functions within an acceptable time,
  • is sufficiently usable,
  • can be installed and run in its intended environments, and
  • achieves the general result its stakeholders desire.



What the IB wants you to know about testing[edit]

The crucial importance of testing at all stages of implementation should be emphasized, with the stages clearly defined.
Types of testing can include: user acceptance testing, debugging, beta testing.
Students should be aware that there are programs that can test other programs, thereby automating parts of the testing process and reducing costs.

Video[edit]

Please watch this video for a nice example:


Distinctions[edit]

It will be helpful to understand these distinctions:

Software Testing

Software testing is the process of evaluation a software item to detect differences between given input and expected output. Also to assess the feature of A software item. Testing assesses the quality of the product. Software testing is a process that should be done during the development process. In other words software testing is a verification and validation process.

Verification

Verification is the process to make sure the product satisfies the conditions imposed at the start of the development phase. In other words, to make sure the product behaves the way we want it to.

Validation

Validation is the process to make sure the product satisfies the specified requirements at the end of the development phase. In other words, to make sure the product is built as per customer requirements.[3]

Types of testing[edit]

There are different types of testing. You should be able to recognize different types of testing, describe the purpose of each type of testing, and given a scenario, suggest appropriate testing approaches. See Wikipedia Software Testing. Specifically: Testing Levels

Acceptance testing[edit]

Acceptance testing performed by the customer, often in their lab environment on their own hardware, is known as user acceptance testing (UAT). Acceptance testing may be performed as part of the hand-off process between any two phases of development.


Beta testing[edit]

Beta testing comes after alpha testing and can be considered a form of external user acceptance testing. Versions of the software, known as beta versions, are released to a limited audience outside of the programming team known as beta testers. The software is released to groups of people so that further testing can ensure the product has few faults or bugs. Beta versions can be made available to the open public to increase the feedback field to a maximal number of future users and to deliver value earlier, for an extended or even indefinite period of time (perpetual beta).

Debugging[edit]

In computers, debugging is the process of locating and fixing or bypassing bugs (errors) in computer program code or the engineering of a hardware device. To debug a program or hardware device is to start with a problem, isolate the source of the problem, and then fix it. A user of a program that does not know how to fix the problem may learn enough about the problem to be able to avoid it until it is permanently fixed. When someone says they've debugged a program or "worked the bugs out" of a program, they imply that they fixed it so that the bugs no longer exist.[4]
Debugging is the process of finding and resolving of defects that prevent correct operation of computer software or a system. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another.[5]
Please see also our fuller Debugging article.

Standards[edit]

  • Suggest various types of testing.

References[edit]