Fundamentals of Software Testing

Source: Internet
Author: User

    1. 1. Six phases of the software life cycle (SDLC)

1. Definition and planning of the problem
This stage is the software developer and the demand side discussion, mainly determines the software development goal and the feasibility.

2. Demand Analysis
In determining the feasibility of software development, the software needs to implement a detailed analysis of the various functions. The requirement analysis phase is a very important stage, and this stage is well done, which will lay a good foundation for the success of the whole software development project. "The only constant is the change itself. "The same requirements are constantly changing and in-depth throughout the software development process, so we have to develop a demand change plan to cope with this change to protect the entire project."

3. Software Design
This stage is mainly based on the results of demand analysis, the whole software system design, such as system framework design, database design and so on. Software design is generally divided into general design and detailed design. Good software design will lay a good foundation for software program writing.

4. Program code
This phase translates the results of the software design into program code that the computer can run. In the code of the program must be unified, in line with the standards of the writing norms. To ensure the readability of the program, easy to maintain, improve the operation of the program efficiency.

5. Software Testing
After the completion of the software design to undergo rigorous testing to discover the software throughout the design process problems and to correct. The whole test process is divided into three stages: unit test, assembly test and system test. The test method mainly includes white box test and black box test two kinds. During the testing process, a detailed test plan needs to be established and tested in strict accordance with the test plan to reduce the randomness of the test.

6. Operation and Maintenance
Software maintenance is the longest duration of the software life cycle. After the software development is completed and put into use, due to many reasons, the software can not continue to adapt to user requirements. To extend the service life of the software, the software must be maintained. The maintenance of software includes two aspects: corrective maintenance and improved maintenance.

2 , Software life cycle model

From the moment the concept was presented, software products entered the software life cycle. After the need, analysis, design, implementation, deployment, the software will be used and into the maintenance phase, until finally due to lack of maintenance costs and gradually disappear. Such a process, called the life cycle model.

Several typical life cycle models include waterfall model, rapid prototyping model and iterative model.

The characteristics of the waterfall model (the document is the subject), a lot of problems at the end will be exposed. Iterative models are more exposed than waterfall model problems, and rapid prototyping Fabienne waterfall models are intuitive.

3. Software Testing Concepts

Generalized concept: Refers to all the inspection, review and validation in the software life cycle, including the analysis, design phase, and completion of the post-development maintenance phase of the various documents, code review and validation

Narrow concept: The process of identifying software defects, i.e. the inconsistency between actual results and expected results

4. Software testing purposes

ü The purpose of testing is to discover the various defects in the software

ü Testing can only prove that the software is defective and cannot prove that the software is not defective

ü Testing can reduce defects in software to a certain extent, rather than completely eliminate

ü Identify errors and defects in the software with fewer use cases, time and manpower to ensure the quality of the software

5 . Software Testing Principles

Ügood-enough: A principle to weigh input/output ratios

ü Guarantee the coverage of the test, but the exhaustive test is not possible

ü All tests should be traced back to the user's needs

ü The earlier the test the better, the test process and the development process should be combined

ü The size of the test is small and large, from unit testing to system testing

ü To detect errors as much as possible, it should be tested by an independent third party

ü Do not modify the program for easy testing

ü You should test what the software should do and what the software should not do.

6 . The focus of software testing

ü Design of test Cases

– The design of test cases is at the heart of the entire software testing effort

– The test case reflects the quality requirements of the subject being tested and determines the quality assessment of the test object

ü Management of test work

-especially for large-scale software systems with multiple subsystems, the testing work involves a lot of manpower and material resources, and effective test management is the necessary precondition to ensure effective testing work.

ü Setting up the test environment

– The test environment should be consistent with the actual test environment

7 . Black box Test

ü What is a black box test

– also known as functional testing or data-driven testing, is testing the functional requirements/implementations of the software, testing to see if each function meets the requirements, regardless of the logical structure within the program

ü Black Box test method

– Functional Partitioning

– Equivalence class Partitioning

– Boundary value Analysis

– Causality diagram

– false speculation, etc.

8 . What is a white box test?

– White box testing, also known as structural or logic driven testing, must know the internal work process of the software and test to see if the software is running in accordance with requirements and design.

– The main method of white box testing

– corresponding to some of the main structures of the program: statements, branches, logical paths, variables; The main methods of white-box testing are:

– Statement override method

– Branch override Method

– Logical Override Method

    1. 9. What is dynamic testing

Dynamic testing requires running the software in a dev/test environment or in a real-world environment, and using test cases to find software defects; Dynamic testing includes functional validation and interface testing, coverage analysis, performance analysis, memory analysis, etc.

What is static testing

Static testing does not actually run the software, mainly in the software programming format, structure and other aspects of evaluation. Static tests include code checking, program structure analysis, code quality metrics, and so on. It can be done manually, or it can be automated with software tools

Manual testing and automated testing

A. The disadvantage of manual testing is that the test workload is large, repeated, regression testing is difficult to achieve

B. Automated testing using software testing tools to automate all or part of the testing effort: management, design, execution and reporting; Save a lot of test overhead and be able to do some tests that can't be done by manual testing

ü The entire process of manual testing does not guarantee the scientific and rigor of the test:

– The more defects you modify, the more difficult the regression test

– No one can provide precise data to decision-makers to measure current work progress and productivity

– Burnout and other human factors that result from repeated testing are inconsistent with test standards

– The longer the test takes, the less stringent the test will be

ü Automated testing frees testers from repetitive, chores test execution, with more time for test design and results analysis

ü Software testing cannot be fully automated

ü Cannot complete all manual test tasks

ü No creativity and poor flexibility to improve the effectiveness of testing

You may encounter many unexpected problems in the process, especially when the software is unstable

ü High maintenance of test scripts

Test Flow

ü Unit Test

ü Integration Testing

ü System Test

ü User Acceptance Test

ü Regression test

Unit Testing

ü Complete validation of the smallest software design Unit-module

ü The goal is to ensure that the module is correctly encoded

ü Use process design descriptions as a guide to test important control paths to identify errors within the module

ü Normally the case is for white box

ü Static testing of code style and rules, program design and structure, business logic, etc., to detect and resolve errors that are not easy to manifest early

ü Content of unit tests

– Interface Testing

– Internal data structures

– Global Data structure

– Boundary

– Statement overlay, error path

Integration Testing

ü Test to find problems related to module interface

ü The goal is to take the module that passed the unit test and construct a program structure described in the design.

ü You should avoid one-time integration (unless the software is small) and use incremental integration

Integration Testing Main Content

Üapi

üapi/parameter Combinations

the . System Testing

ü System Testing according to the requirements of the software requirements, confirm the requirements of the system to meet the requirements

ü The system tester is equivalent to the user spokesperson

ü Determine the testability of the software in the requirement analysis phase, and ensure the system testing work is completed effectively.

ü System test Main content

ü All functional requirements are met

ü All performance requirements are met

ü Other requirements (e.g. security, fault tolerance, compatibility, etc.) are met

User acceptance / validation Test

Üalpha Test

– is performed by the user at the developer's site, and the alpha test is performed in a controlled environment

Übeta Test

– By the end user of the software in one or more user sites, the developer is not usually on-site, the user records the problems encountered in the test and reports to the developer

- . Stress testing VS Performance Testing
The goal of performance testing is not to find bugs, but to rule out bottlenecks in the system and establish a benchmark for future regression testing. The performance test is actually a very carefully controlled measurement analysis process. Under ideal circumstances, the tested software is already stable enough at this time

Performance test is to check the system's reflection, operating speed and other performance indicators, his premise is to require under a certain load, such as checking a website in 100 people at the same time the performance of the situation, each user can also be normal to complete the operation.
The summary is: under the different load (the load is certain), through some system parameters (such as reaction time, etc.) to check the operation of the system;

The stress test is to discover the maximum load that the system can support, and his premise is to require that the system performance be within acceptable range, such as the frequently prescribed foliar response within 3 seconds, and a summary of the maximum load that the system can support under the assumption

For example, to test a Web site, simulating 10 to 50 users is a routine performance test, and the user's increase to 1000 or even tens of thousands becomes a stress/load test. The strength test is included if a large number of data queries are performed on the system at the same time.

test flow of mainstream testing tools

========winrunner
1 Select the plugin to load at startup
2 make some settings (such as recording mode, etc.)
3 The GUI to identify the application, that is, to create a map (that is, the interface to learn the software being tested)
4 Creating test scripts (recording and writing)
5 Debug the script (guaranteed to run out)
6 inserting various checkpoints (pictures, text, controls, etc.)
7 Executing test scripts in the new version of the application
8 analysis results, return defects
 
=========quicktestpro========
1 Preparing to record
Open the application that you want to test, and check that the settings in QuickTest are appropriate for your current requirements.
2 to record
Open the recording feature of QuickTest, and operate the tested application as described in the test case.
3 Editing test Scripts
By adding test points, parametric tests, and adding control statements such as branching and looping, you can enhance the functionality of your testing scripts so that future regression testing is truly automated.
4 Debugging Scripts
Debug script to check the script for errors.
5 Run the test in a regression test
In the regression test of the application, the operation of the application is replayed by QuickTest, the correctness of the software is verified, and the automation of the test is realized.
6 analysis results, reporting problems
Review the running results of the QuickTest record, record the problem, and report the test results.

= =testdirect============
After installation, go to site management.
1 Creating domains and projects
2 adding users
3 editing licenses and the server
4 Editing a database
--td
1 Select New Project to customize (list, user, group, version, etc.)
2 increasing demand in require
3 Turn demand into plan
4 new test-specific use cases and executions in Testlab by plan

5 bug found, submit bug in defect
(each part can be used relatively independently)

======loadrunner
1 Developing a Load test plan
(Analyze application, determine test target, plan how to execute LoadRunner)
2 Developing test scripts
(record basic user script, perfect test script)
3 Creating a Run scenario
(Choose scene Type Manual Scenario, choose Scene Type, understand various types, scene type conversion)
4 Running the test
5 Monitoring Scenarios
(MEMORY related, processor related, network swallow volume and bandwidth, disk-related, Web application, iis5.0,sql server,network delay, etc.)
6 Analyzing test Results
(Analyze real-time monitoring charts, analyze transaction response times, decompose pages, identify webserver issues, other useful features)

Fundamentals of Software Testing

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.