Learning Software Testing: Software Testing is a confidence that a program can run as expected.

Source: Internet
Author: User

Original works of the Dharma Sweeper: Reprint please indicate the source
Testing: The process of running or measuring a software system using manual or automated means to verify that the software system meets the prescribed requirements and to identify discrepancies with the expected results.

Software test = program Test?? Wrong.
Software testing. (software summary design, software detailed design, software operating environment, software testing, software requirements, software source code, can run programs.) )

The five requirements of software testing and two goals.
Quality, personnel, test coverage, test efficiency, resources, processes, technology.


The principles followed by software testing;
1. Test shows the existence of defects, but does not prove that the system is not defective,
2. Exhaustion testing is not possible, the termination conditions should be set.
3. Testing should be conducted as early as possible,
4. The defect has cluster characteristics. 、
5. Testing the Pesticide Paradox
6. The 28 principles of testing,
7. Test activity depends on the test background

Classification of software Testing

The different stages of testing are differentiated by the means of testing. Test Type

Classification according to the test phase
Unit tests:

The smallest testable unit in the software is checked and validated,
Test for the code.
Ensure that each test case is independent of each other as much as possible.
Typically implemented by developers of code. To verify that the code developed conforms to its own design requirements.

The benefits of unit testing
can detect defects as soon as possible. Early stage.
Facilitates refactoring.
Simplifies integration.
Document. Reduce our documentation as much as possible.
for design.

Disadvantage: It is not possible to overwrite all the execution paths, so it is impossible to ensure that all paths are caught in error.
Each line of code typically requires 3-5 lines of test code to complete the unit test. So there is input and output at a balance point.

Unit Test Framework . Xunitz, Cppunit, PHPUnit.

Inheritance testing: Based on unit testing, tests are carried out to assemble all software units in accordance with the requirements outlined in the outline design specification, to meet or achieve the relevant technical specifications and requirements for each part of the process of the subsystem or system.

1.Big Bang
2. From top to bottom,
3. Top-up, (lowest-level module test)
4. Core system integration. (Test the Core module)
5. High-frequency integration. 、


The difference between integration and unit testing

1. The test object is different.
2. The basis of the test is different.
3. The method of testing is different.

System Testing
is to say that the software is integrated testing, as a part of the computer system, and other parts of the systems, in the actual operating environment of the computer system to carry out a series of rigorous and effective testing to discover software potential problems, to ensure the normal operation of the system.


Focus on the point.
Focus on the use of the system itself
Focus on connectivity between the system and other related systems
Focus on the performance of the system under different use pressures,
Focus on the performance of the system in a real-life environment.

System testing and integration testing.
The test object.
Test time.
Test the content.
Test the angle.


Acceptance testing.
Definition: Also known as delivery testing, for user requirements, business process formal testing, determine whether the system meets the acceptance criteria, by the user, customer or other authorized agencies decide whether to accept the system.

Acceptance testing, (user acceptance test, run acceptance test, contract and specification acceptance test)

Alpha Test. User execution, location and environment are provided by the developer
Beta testing. User-side testing.
——————
Classification by means of testing

Black box test, white box test
Static testing, dynamic testing,
Manual testing, automated testing

The black box test is to test the test as a box that cannot be opened. Tested by the associated exposed interfaces,

Whether the program can properly input and output,. More is from the user's point of view.
Advantages: Easy to implement. There is no need to focus on internal implementations.
Closer to the user's point of use.

Disadvantage, the test coverage is low, generally can only cover the amount of code less than 40%
For the automatic test of black box, the reuse rate is low and the maintenance cost is higher.


Black box testing is primarily used to test what
1. Focus book focus on what is incorrect or missing function
2. On the interface, enter whether the input can be received correctly. Can output the correct result,.
3. Whether there is a data structure error or external information (such as data file) Access error.
4. Whether the performance can meet the requirements. 、

The main design method of black box test

The white box test is tested with logical coverage.

Logical units: statement, condition, condition combination, branch, path.

Advantages of white Box testing:
1. Forcing testers to think carefully about the implementation of the software, understanding the principle.
2. You can detect each branch and path in your code.
3. Explain the errors that are hidden in the code.
4. The test of the code is quite thorough.

Cons: Expensive. High coverage: The workload is large and the cost is high.
You cannot detect future paths and data sensitivity errors in your code.
The correctness of the requirements cannot be directly verified.


The main test method for white box testing.

Gray box test: between Black and white box test.

Static testing.
Static testing refers to the execution of the program under test, but by reviewing the software documentation or code. Measure the static complexity of the program, check whether the software conforms to the standard of programming, to find out the shortcomings of the program written, reduce the probability of error occurrence


Static test methods, mutual audit. Walk-through, meeting

Dynamic testing.
The dynamic test is to check the difference between the running result and the expected result by running the program under test, and analyze the operating efficiency/accuracy rate.


Manual testing: The behavior of a specific tester from the user's vision to verify that the software meets the design requirements is more appropriate for testing in depth and for emphasizing subjective judgments.
Crowdsourcing testing, exploratory testing.

Automated testing, using a separate test tool software to control automated execution of tests and automatic checking of expectations and results.

Advantages of manual testing: easy to find defects, easy to implement. Creative, flexible ... (shortcomings, difficult to cover quantification, low repetition efficiency, inconsistency, low reliability, human resource dependence)
Automated tests (high efficiency, fast, high reusability, easy measurement of coverage, readiness, reliability, more than exhaustion.) Disadvantages, mechanical, low defect rate, one-time input larger/)

Learning Software Testing: Software Testing is a confidence that a program can run as expected.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.