07c - Introduction to Software Testing

合集下载

Software Testing Introduction

Software Testing Introduction

QA Services During Development Phase:
Test planning Test case generation Code analysis Unit testing Test driver development White box testing Defect analysis Bug fixes
development is nearing completion; minor design changes may still be made as a result of such testing. Typically done by end-users or others, not by programmers or testers.
– To find out the bugs in the docs\software.
What's the principle during testing?
– Test as early as possible – Do proper testing, avoid excessive testing and
Inadequate Testing - no one will know
whether or not the program is any good until the customer complains or systems crash.
Black box testing White box testing unit testing integration testing functional testing system testing end-to-end testing sanity testing or smoke testing regression testing acceptance testing load testing stress testing performance testing usability testing install/uninstall testing recovery testing failover testing security testing compatability testing exploratory testing ad-hoc testing

07b - Introduction to Software Testing

07b - Introduction to Software Testing

Characteristics of Good Testing
Repeatable
Tests should be repeated each time the code has been changed
Once a defect has been fixed the original test that failed should be repeated Sub-sets of tests can be run against new builds as a smoke test Repeatable test results can be compared over time to measure quality and stability Tests can be reused on applications with common modules or functionality
Estimate the development and test effort
PAGE: 9
Lifecycle Testing and Testing Techniques
Objectives of Testing
Verification
Validation
PAGE: 10
Lifecycle Testing and Testing Techniques
May include testing of specific use cases or realistic user
scenarios for software use
PAGE: 16
Lifecycle Testing and Testing Techniques
System Testing

Software Testing-测试级别 Software Testing Techniques_2013 《软件测试》课件

Software Testing-测试级别 Software Testing Techniques_2013 《软件测试》课件

Software Testing Techniques
集成测试(3)
刘冬梅
• 接口划分分析包括要确定系统的边界、子系统 的边界和模块的边界;确定模块的内部接口; 确定子系统内模块间的接口;确定系统与OS的 接口;确定系统与硬件的接口;确定系统与第 三方软件的接口。
• 系统内部接口是各模块相互交互的接口,是集 成测试的重点,而系统外部接口是外部系统和 系统交互接口,是系统测试的重点。
评估
刘冬梅
• 单元测试通过的一般准则: – 软件单元功能与设计需求一致 – 软件单元接口与设计需求一致 – 能够正确处理输入和运行中的错误 – 在单元测试中发现的错误已经得到修改并 且通过了测试 – 达到了相关覆盖率的要求 – 完成软件单元测试报告
Software Testing Techniques
• 被测单元用什么语言,驱动就用什么语言 写。
Software Testing Techniques
动态测试技术的运用(4)
/*被测程序*/ int Fun(int in) { if (in >= 0) { return 1; } else { return -1; } }
刘冬梅
Software Testing Techniques
Software Testing Techniques
单元测试的目标(2)
刘冬梅
– 在为限制数据加工而设置的边界处,能否 正确工作;
– 单元的运行能否做到满足特定的逻辑覆盖
– 单元中发生了错误,其中的出错处理措施 是否有效。
Software Testing Techniques
单元测试的任务1:模块接口测试(1)
刘冬梅
– 全局变量的定义在各模块是否一致 – 若模块包括外部输入输出,则需要考虑:

Software Testing-01_Introduction

Software Testing-01_Introduction
2. 是否有这样的测试用例,代表一个有效的等边三角形?
Software Testing Techniques
刘冬梅
一次简单的测试之旅 • 设计一组测试用例,适当地测试以下程序: 从一个输入对话框中读取三个整数值,这三个整 数值代表了三角形三条边的长度。程序显示提出 信息,指出该三角形是何种三角形:等边三角形 、等腰三角形、不规则三角形(任意两条边不相 等)。 • 用你的测试用例集回答下列问题,回答“是”的 可以得1分:
13. 是否至少有一个这样的测试用例,输入的边长个数不 对?
Software Testing Techniques
刘冬梅
一次简单的测试之旅 • 设计一组测试用例,适当地测试以下程序: 从一个输入对话框中读取三个整数值,这三个整 数值代表了三角形三条边的长度。程序显示提出 信息,指出该三角形是何种三角形:等边三角形 、等腰三角形、不规则三角形(任意两条边不相 等)。 • 用你的测试用例集回答下列问题,回答“是”的 可以得1分:
Software Testing Techniques
刘冬梅
一次简单的测试之旅 • 设计一组测试用例,适当地测试以下程序: 从一个输入对话框中读取三个整数值,这三个整 数值代表了三角形三条边的长度。程序显示提出 信息,指出该三角形是何种三角形:等边三角形 、等腰三角形、不规则三角形(任意两条边不相 等)。 • 用你的测试用例集回答下列问题,回答“是”的 可以得1分:
——软件测试变得越来越重要!
Software Testing Techniques
刘冬梅
基本现状
• 学校 – 一门课程 – 40多本教科书,很多学校都设置 • 工业界 – 一个职业
– “Microsoft in terms of this quality stuff–we have as many testers as we have developers. And testers spend all their time testing, and developers spend half their time testing. We’re more of a testing, a quality software organization than we’re software organizations”,By Bill gates, 2002

Software Testing-软件测试基本概念

Software Testing-软件测试基本概念

Software Testing Technology
刘冬梅
测试与软件开发各阶段的关系
• 软件开发过程是一个自顶向下逐步细化的过 程。 –系统规划阶段定义项目范围 –系统分析阶段建立数据域、功能和性能 需求、约束等 –系统设计阶段建立物理设计蓝图 –系统构造阶段把物理设计蓝图用某种程 序设计语言转换成程序代码 • 测试过程是依相反顺序安排的自底向上逐步 集成的过程。
Software Testing Technology
刘冬梅
软件测试的不修复原则
并非所有软件缺陷都能修复,其原因在于: • 没有足够的时间 • 不算真正的软件缺陷 • 修复的风险太大 • 不值得修复
Software Testing Technology
刘冬梅
Pareto原则
Pareto原则暗示 着测试发现的 错误中的80% 很可能起源于 程序模块中的 20%。
Software Testing Technology
刘冬梅
软件测试的目的(1)
• 基于不同的立场,存在着两种完全不同的测 试目的。 – 从用户角度出发,普遍希望通过软件测试 暴露软件中隐藏的错误和缺陷,以考虑是 否可接受该产品。 – 从软件开发人员角度出发,则希望测试成 为表明软件产品中不存在错误的过程,验 证该软件已正确地实现了用户的需求,确 立人们对软件质量的信心
Software Testing Technology
刘冬梅
一个测试生命周期
错误 错误 需求规 格说明 缺陷 设计 缺陷 编码 缺陷 缺陷解决
错误 错 误
修复
缺陷隔离
事故
测试
缺陷分类
Software Testing Technology
刘冬梅

Software Testing Verification and Validation:软件测试验证和确认.

Software Testing Verification and Validation:软件测试验证和确认.

Tuesday, September 15, 2020
14
Ch.19 - Verification & Validation
Tuesday, September 15, 2020
6
Regression Testing
• Canned test runs to verify that new defects were not introduced during “debugging” session.
• Can find some dynamic problems that compiler cannot catch (depends on language…)
• C/C++ tools: Purify, BoundsChecker
Ch.19 - Verification & Validation
Static techniques
• Software Inspections
– of requirements documents – of design documents (design reviews) – of source code (code reviews) – automated static analysis
System specification
System design
Detailed design
Acceptance test plan
System integration test plan
Sub-system integration test plan
Service
Acceptance test
Ch.19 - Verification & Validation

Chapter 1 Software Testing Introduction

Chapter 1 Software Testing Introduction

1.2 Basic Concepts of Software Testing
Concepts related to software testing – Test & debug Automated test vs. manual operate Don’t know details are OK vs. must know details Correctness proof and how to do with failure vs. correctness proof only Checking vs. reasoning Plan , under control vs. out of control 测试条件已知,规程可定义,结果可预知 测试可以计划,过程可控;调试不可控 测试是检验,调试是推理过程 测试除了表明程序正确还要验证程序如何处理失败,调试表明正确 测试可不了解设计细节,调试必须了解设计细节 测试可自动化,调试无法自动化
Qualified rate of products
– Qualified rate of airplane manufacturing industry
“Aerobus747-400” are made up of 1000,000 parts Qualified rate of every part: 99.9999% Do you know the qualified rate?
1.2 Basic Concepts of Software Testing
Concepts related to software testing
– Correct program
No syntax error No obvious errors during running No improper statements Valid input - correct output Invalid input - correct output Any possible input - correct output

ISO、IEC29119SoftwareTesting(英文版)PPT(共24页)

ISO、IEC29119SoftwareTesting(英文版)PPT(共24页)

Organisational Test Process
Develop test specification
Draft Test Specification
Gain consensus on test
specification
Approved Test Specification
[Major revision required]
Testing vocabulary
Part 2: Testing Processes
Organisational Test Proses
Static Test Processes
Dynamic Test Processes
Instantiating Testing Processes
ISO 29119 – Scope & Structure
Part 1 Concepts & Vocabulary
BS 7925-1
Part 4 Testing Techniques
BS 7925-2
Part 2 Processes
BS 7925-2 IEEE 1008
Part 3 Documentation
IEEE 829
Part 1: Concepts & Vocabulary
Software testing concepts
Introduction to software testing Relationship between testing,
development & maintenance Implications of lifecycle models Approaches to testing
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Testing Types and Techniques
Challenges of Security Testing
Black box testing approaches are not sufficient
Contradicts traditional Quality Assurance approaches May require a high level of expertise and skill to conduct
Test script maintenance
Adoption and acceptance Training and skill set
Unrealistic automation goals
Testing Types and Techniques
Summary
A variety of test techniques are needed to measure the quality of an application
Testing Types and Techniques
White Box Testing
White Box Testing uses the code structure of the
software requires knowledge of the code
• Tests cannot be created until the code is complete
Are formats correct the particular culture?
L10N testing requires tester who have some experience with the target culture.
Testing Types and Techniques
Testing Types and Techniques
Internationalization (I18N) Pseudotranslation
A common technique in internationalization testing is to translate parts of every string and message with special characters.
No knowledge of the programming is used
Software
Testing Types and Techniques
Black Box Testing
Pros and Cons
Pros
• Catches issues that end uses would see • No special knowledge
Can start earlier in the development lifecycle
Testing Types and Techniques
Performance Testing
A broad test area focused on measuring the following:
• Response time • Scalability
Testing Types and Techniques
Internationalization (I18N) testing
Internationalization testing ensures that an application can be adapted to different languages without requiring additional engineering.
costs
• End result is better quality
Testing Types and Techniques
Benefits of Automated Testing
Reduced test time
Reduced test costs More consistent test execution
• Load
Testing Types and Techniques
Security Testing
Security testing attempts to determine the risk of
intrusion and/or theft The more important the information the greater need for
Different test types use different tools and
techniques and tend to uncover different types of problems
It is important to understand the pros and cons of the various types of testing before you can create a successful test plan
Ensure that an applications functionality is not broken when utilizing a different language or locale Additionally I18N testing confirms that all the messages are properly externalized. Externalized strings will display the new language not the original.
Pseudo-translation allows testers to visually inspect the application to confirm that the strings have been properly externalized. This approach allows users to test the product without needing to know another language or fully translate the message files. Inexpensive and effective technique to check an application before having it localized.
Cons
• Takes more time to write test cases
Must understand the code Difficult to perform independently
• Cannot start until code is complete • Does not directly test end user functionality • Will not find omitted requirements
• Tests are designed early based only on requirements
Cons
• May be inefficient if input domain is large
• Large parts of code may not be covered
• May duplicate unit tests
Testing Types and Techniques
Localization Testing (L10N)
Localization Testing (L10N) confirms that the application
is properly adapted to a particular culture Is the translation correct?
Allows comprehensive regression testing
Pre-requisite for some types of testing (e.g., load testing)
Testing Types and Techniques
Challenges of Automated Testing
Automated Testing
Automated testing is an approach where tests are
executed using driver application instead of manually Record and play applications allow tester to record
activities and then replay them for regression testing
Test results are stored in logs or in databases Automated testing allows increased testing with reduced
Testing Types and Techniques
Testing Types and Techniques
Overview
Black box
White box
Stability
Usability
Gray box
Performance Security
Internationalization
and localization Test automation
Analyzes paths through the code and internal data values
Code
Test case
Testing Types and Techniques
White Box Testing
相关文档
最新文档