Uploaded by onetwo55

How to test a soft ware?

advertisement
How to test software?
The most comprehensive software testing method in history
1、 Unit testing (module testing)
Unit testing is the testing of software components. Its purpose is to verify the correctness of the software
components. The test object is: module.
Testing modules, a separate module testing, falls under the category of static testing
Testing phase: After coding or before coding (TDD)
Test object: minimum module
Tested by: White box testing engineer or development engineer (testing source code)
Test basis: code and comments+detailed design documents
Testing method: White box testing (because the source code needs to be tested)
Test content: module interface testing (testing whether the parameters in the module are passed
correctly), local data structure testing (testing the scope of variables), path testing (if else judgment must
cover all branches), error handling testing, boundary testing (for loop)
2、 Integration testing
Integration testing, also known as joint testing, involves assembling program modules using appropriate
integration strategies to verify the correctness of the system's interfaces (white box testing) and
integrated functions (black box testing). The main purpose of integration is to check whether the
interfaces between software units are correct.
Testing phase: after general unit testing
Test object: Interface between modules
Tested by: White Box Testing Engineer or Development Engineer
Test basis: module for unit testing+summary design document
Testing method: Combining black box testing with white box testing
Test content: data transmission between modules, functional conflicts between modules, correctness of
module assembly functions, global data structure, impact of single module defects on the system
3、 System testing
Consider a software system as a system test. This includes testing of functionality, performance, and the
software and hardware environment in which the software runs. Most of the time is during the system
testing execution phase, including regression testing and smoke testing.
Testing phase: After passing the integration test
Test object: The entire system (software and hardware)
Tested by: Black box testing engineer (for functional testing)
Test basis: requirement specification document
Test method: black box test
Test content: functionality, interface, reliability, usability, performance, compatibility, security, etc
Regression Testing
4、 Regression testing
Regression testing refers to retesting after modifying old code to confirm that the modifications did not
introduce new errors or result in errors in other code.
After modifying the code, perform regression testing and determine the regression range based on the
testing stage.
Throughout the entire software testing process, there is a significant proportion of workload, and multiple
regression tests are conducted at each stage of software development. With the increasing size of the
system, the cost of regression testing is increasing. It is meaningful to improve the efficiency and
effectiveness of regression testing by selecting the correct regression testing strategy.
5、 Smoke test
This terminology comes from the hardware industry.
After making changes or repairs to a hardware or hardware component, directly power up the device. If
there is no smoke emitted, the component passes the test. It can also be understood that this type of
testing takes a short time and only requires a bag of cigarettes.
The object of smoke testing is each newly compiled software version that needs to be formally tested,
with the aim of confirming that the basic functions of the software are normal and can be used for
subsequent formal testing work. The executor of the smoke test is the version compiler.
Concept: Testing the core backbone process, and if successful, it is considered successful
Function: The standard for determining whether to accept the test. If the core and backbone cannot go
through, then directly continue the test
6、 Acceptance testing
When buying a new phone, there is usually a 7-day return policy and a 1-month exchange policy. We will
try to test all the functions of the phone within 7 days.
Acceptance testing is the last testing operation before deploying software. It is the final stage of technical
testing, also known as delivery testing. The purpose of acceptance testing is to ensure that the software
is ready, and to demonstrate to the software purchaser that the software system meets the original
requirements in accordance with the project contract, task book, and acceptance basis documents
agreed upon by both parties.
Testing phase: After the system test passes
Test object: The entire system (including software and hardware).
Testers: Mainly end users or demand side.
Test basis: user requirements, acceptance standards
Testing method: Black box testing (testing functionality)
Test content: Same system test (functions, various documents, etc.)
7、 Static testing (without running the program itself, testing documentation)
Static testing refers to checking the correctness of a program by analyzing or checking its syntax,
structure, procedures, interfaces, etc., without running the tested program itself‘ Perform structural
analysis, flowchart analysis, and symbol execution on requirement specifications, software design
specifications, and source programs to identify errors.
8、 Dynamic testing
The dynamic testing method refers to running the tested program, checking the differences between the
running results and the expected results, and analyzing the performance of running efficiency,
correctness, and robustness. Most software testing work belongs to dynamic testing.
9、 Manual testing
It is a relatively primitive but indispensable step where people input test cases one by one and observe
the results, which correspond to machine testing.
Summary of advantages and disadvantages:
(1) Advantages: Automation cannot replace exploratory testing and divergent thinking results testing.
(2) Disadvantages: Slow execution efficiency, high volume, and prone to errors.
10、 Automated testing
It is to run a system or application under preset conditions, evaluate the running results, and the pre
conditions should include normal and abnormal conditions.
Simply put, automated testing is a process of transforming human driven testing behavior into machine
execution.
Automation implementation steps:
1. Complete functional testing, and the version is basically stable
2. Select automation tools suitable for the project based on project characteristics and build an
environment
3. Extract test cases from manual testing and convert them into automated testing cases
4. Implement automated input construction through tools and code, and automatically detect whether the
output results meet expectations
5. Generate automatic test reports
6. Continuous improvement and script optimization.
11、 Business testing
Business testing is the process in which testers connect various modules of a system to run, simulate the
actual workflow of real users, and meet the defined functions of user needs for testing.
For example, viewing emails:
Log in to the website - Enter username and password to log in - Enter inbox - Find email - Click on open View - Close email - Exit email - Close website
Business testing focuses on requirements and users
Test all business processes, including backbone processes, branch processes, and even smaller
processes
Testing different businesses requires a special understanding of the project's requirements
12、 Interface testing
Interface testing (referred to as UI testing) tests whether the layout of functional modules in the user
interface is reasonable, the overall style is consistent, and the placement of various controls conforms to
customer usage habits. In addition, it also tests the convenience of interface operation, navigation
simplicity, usability of page elements, correctness of text in the interface, uniformity of naming, aesthetics
of the page, and perfect combination of text and images.
13、 Document testing
14、 Compatibility testing
People often go online, and the same website performs differently on different browsers
WEB testing; APP testing
Compatibility mainly refers to whether software can operate well between them, whether it will have an
impact, whether software and hardware can work efficiently, and whether it will affect the system crash.
Platform testing
Browser testing
Can the software itself be forward or backward compatible
Test whether the software is compatible with other related software
Data compatibility testing
The most common is browser compatibility testing, where different browsers' differences in CSS and
JavaScript parsing can lead to different page displays.
15、 Usability testing
Usability is a concentrated manifestation of the adaptability, functionality, and effectiveness of interaction.
The phone call function is not located on the homepage, but in a directory. Click three or four times to find
the call function. Is this function easy to use?
16、 Performance testing
Check if the system meets the performance specified in the requirements specification manual.
Usually manifested in the following aspects:
The accuracy of resource utilization (such as memory, processor cycles, etc.)
Execution interval
Log events (such as interrupts, errors)
response time
Throughput (TPS)
Secondary storage area (such as buffer, workspace size, etc.)
Monitoring of processing accuracy, etc
17、 Usability testing
Usability is a concentrated manifestation of the adaptability, functionality, and effectiveness of interaction.
Usability belongs to the category of ergonomics, which is a discipline that designs everyday objects for
ease of use and strong practicality.
The phone call function is not located on the homepage, but in a directory. Click three or four times to find
the call function. Is this function easy to use?
In some large factories, there will be specialized departments to conduct usability testing, also known as
user experience testing.
Eighteen Installation testing
Installation and uninstallation of testing programs
Typical installation and uninstallation of apps
19、 Safety testing
Security testing is a relatively independent field that requires more professional knowledge. For example,
web security testing requires familiarity with various network protocols
TCP/HTTP, firewall, CDN, familiar with various operating system vulnerabilities, familiar with routers, etc.
From a software perspective, familiar with various attack methods, such as
SQL injection, Xss, etc.
As a web entry test, it can be done using IBM's appscan.
20、 Memory leak test
There are too many things open on the computer, causing the machine to react slowly or even crash.
After restarting, it will be fine, but the same problem will occur later
Many software systems suffer from memory leaks, especially programs written in "unmanaged"
languages that lack automatic garbage collection mechanisms, such as C, CH, Delphi, etc. From the
perspective of user usage, memory leaks themselves do not pose any harm, and most users may not
even feel the presence of memory leaks. However, memory leaks can accumulate, as long as the
number of executions is sufficient, it will eventually deplete all available memory, causing the software to
execute more and more slowly, and ultimately stop responding. The problem with this software can be
likened to a "chronic disease" of the software.
There are many reasons for memory leaks, and the most common ones are the following.
1. Forgot to recycle after allocating memory.
2. There is a problem with the programming method, which makes it impossible to recycle.
3. Incorrect use of certain API functions can cause memory leaks.
4. Failure to release in a timely manner.
Detection of memory leaks:
1. Different methods can be used to check for memory leaks for different programs, and specialized tools
such as MemProof can also be used to check for memory issues AQTime, Purify, BundsChecker, etc.
Some development tools themselves come with memory issue checking mechanisms. It is important to
ensure that programmers turn on these features when writing and compiling programs.
2. Check through code scanning and analysis tools
Download