Download presentation
Presentation is loading. Please wait.
1
课程代号 : SDM312 课程标题:微软的软件测试及最新的测试工具产品 – 介绍Visual Studio 2005团队系统的测试功能
2
课程内容概述 您想知道微软是如何理解软件测试的吗?您想亲身感受微软最新发布的软件测试工具的强大功能吗?请参加这个演讲,听王志峰(Jeff Wang)阐述微软的软件测试的理念,在此基础上全面介绍“Visual Studio 2005团队系统”的测试功能,看他演示其核心的“单元测试”,“代码覆盖率”,“网页测试”和“压力测试”的用例。 听众范围:软件测试,开发人员以及软件项目管理和决策人员 预备知识:软件工程及软件测试的基本概念。有使用Visual Studio和编成经验为佳。
3
课程内容按排 微软的软件测试 Visual Studio团队系统的测试功能概述 演示: 单元测试 代码覆盖率测试 数据驱动测试 网页测试
压力测试
4
3/17/2017 2:48 PM 微软的软件测试 4 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5
两类基本的软件测试方法 第一类:验证软件是“工作的” 第二类:证明软件是“不工作的” 微软软件测试活动的基础和主要线索
微软也阶段性地进行这类测试活动 (Bug Bash)
6
软件测试发展历史 整体的开发环境和工具 -- 1960s 1970s 1980s -- 现在 软件 Software 小型 Small
一般 Moderate 大型Large 整体的开发环境和工具 流程Process 随意 Ad hoc 一般 Moderate, 有了“软件工程”的概念 “Software Engineering” 复杂,精密 Sophisticated, 质量 “Quality”, 模型 CMM & MSF 测试 Testing 捉虫子Debug 基本的 Primitive, 开发后期活动 After Development Activity 标准 IEEE/ANSI Standard, 整合的过程 Integrated Process 测试人员Tester 无 None 新手 Junior 专业人员 Professional
7
微软的软件测试 开发依赖测试 项目管理依赖测试 保证质量,协调进度 每日建造+自动化测试 代码签入验证和门槛 Bug管理是主要线索
决策的主要依据: 质量和进度的分析报告
8
完善的软件测试系统 测试用例开发环境 测试用例管理 版本控制 测试运行环境 分析报告 实验室 开发语言,驱动程序,库程序,开发工具…
测试用例的定义,设置,分类,组合,存储… 版本控制 设置参数,测试代码… 测试运行环境 资源的配置,安装和测试的运行, 结果存储… 分析报告 实验室 机器,网络等硬件基础设施
9
究竟微软如可进行软件测试? 这不是一个能够轻而易举回答的问题!
10
最新统计数据 测试人员 7500多测试工程师,与开发工程师是近1:1的比例 测试用例 实验室和测试用计算机 在过去的12个月里
Office 12 有100多万自动测试用例 Windows Vista 有670多万自动测试用例 实验室和测试用计算机 110万测试用计算机 07年度预算2.7亿多美元 在过去的12个月里 发布了260多个产品 记录了1200万个缺损Bugs 500个重要的建造Builds / 每天
11
Visual Studio团队系统 所提供的测试工具 子曰:“工欲善其事,必先利其器……”
3/17/2017 2:48 PM Visual Studio团队系统 所提供的测试工具 子曰:“工欲善其事,必先利其器……” 11 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
12
Visual Studio的最新拓展 开发 解决方案 架构师 测试 基础设施 架构师 项目经理 Developer Tester
Solution Architect 测试 Tester 基础设施 架构师 Infrastructure Architect 项目经理 Project Manager
13
VS团队系统的测试功能 整合的开发环境 多种的运行方式 高度集成团队系统的其他功能 灵活的可延展性
六种基本测试类型:单元测试,网页测试,压力测试,序列测试,手动测试和通用测试…… 多种的运行方式 VS IDE运行 / 命令行运行,本机运行 / 远程多机运行 高度集成团队系统的其他功能 集成Team Foundation Server中项目管理和代码管理功能 灵活的可延展性 自定义测试类型,个性化的运行过程…… Team System Test works best with TFS Require tests run and pass before check-in Automatically run tests on build complete Publish test results to the daily build report Log a work item from a test result Create custom reports for published test results using SQL reporting services
14
单元测试 代码覆盖率 数据驱动测试 Open sample test target project “TestChanger”, and show how it works Make sure the project file is opened already before the demo, with the functions toggled Open Source code and show how it is implemented Right click a “RemoveDuplicate()” function and generate unit test In the unit test generation dialog, explain assembly tree and output project types Point out the generated project is a separated project from the dev project, but in the same solution for convenient In the generated test code, explain the attributes Show test view window and demo the test name modification Explain generated unit test is not just a UNIT test, you can use it as a framework to do anything In code Explain the first line accessor Parameters Validation Run the test Show the test result window, and the progress View detail results Explain the result “inconclusive” Remove the last line and re-run the test Code coverage Change to release build Rebuild the project Set code coverage on in the test configuration Show code coverage window and result Double click on the result to jump to code view Explain the red/blue Data-driven Right click and generate another one Demo manually create test using [TestMethod] In test property view, add data source Mention the new generated attribute in the test code Show the contents of the xlc file Choose the data table name “Reverse$” Make change to the code to use the data source Run the test and see the failure details Make change to the data file Run the test again Mention the data change does not need to recompile the test program Go to code coverage view Merge coverage result Point out the whole scenario is all integrated
15
网页测试 压力测试 Open the solution in front
This is the exact the same application, except it is implemented in ASP.Net Explain this is a web application without IIS Launch the application Demo the function Add a new test, choose web test In recording, go to that site, use Foofoo Make four request Stop recording and show all generated script Also show how to generate coded web test, for advanced validation In script you can also do validation too Show how parameterize the web server name as an environment variable Add validation rule Click the second request Choose find text “oofooF” Click the third request Choose to find field “TextOutput” with value “of” Choose to find field “TextOutput” with value “Fof” (this is suppose foF) Run test and show failures Go to test result window and show steps For failures go to detail view Fix the problem and re-run the test Click “Edit web setting”, and explain each field, specifically the “Think time” Re-run (“click here to run the test again”) the test with “Think time” on Load test Add a load test and add two web test to the load test Explain all fields Finish wizard Show the generated script Start the test Show default counters Click on the counters, and show the value table Also see other counters, click and drag and drop Summary windows Storage
16
总结 Visual Studio团队系统提供了一整套的测试工具,全面支持软件开发周期的全过程 2005首版发布
已在微软内部很多产品团队广泛使用 具有很强的可延展性 广阔的前景 Team System Test works best with TFS Require tests run and pass before check-in Automatically run tests on build complete Publish test results to the daily build report Log a work item from a test result Create custom reports for published test results using SQL reporting services
17
我的MSDN博客 http://blogs.msdn.com/jeffwang/
团队系统官方网站 团队系统测试工具官方网站 团队系统MSDN博客 团队系统论坛 我的MSDN博客
Similar presentations