软件测试[1](Guru99软件测试教程翻译!!!)

software testing:
来源于:https://www.guru99.com/unit-testing-guide.html

img

Technical Skills

Basic knowledge of Database/ SQL

Basic knowledge of Linux commands

Knowledge and hands-on experience of a Test Management Tool

Knowledge and hands-on experience of any Defect Tracking tool

Knowledge and hands-on experience of Automation tool

img

7 Software Testing Principles: Learn with a Case Study

  1. Exhaustive testing is not possible

彻底的测试是不可能的

  1. Defect Clustering

缺陷聚类,表明少量模块包含检测到的大多数缺陷。这是 Pareto Principle在软件测试中的应用:大约80%的问题出现在20%的模块中。

  1. Pesticide Paradox

农药悖论,如果进行相同的重复测试集,则该方法对于发现新缺陷将是无用的。

  1. Testing shows presence of defects

测试显示存在缺陷

  1. Absence of Error

软件测试不仅仅是发现缺陷,还可以检查软件是否满足业务需求。

  1. Early Testing

早期测试 - 测试应尽早在软件开发生命周期中开始。因此,在早期阶段捕获需求或设计阶段的任何缺陷。

  1. Testing is context dependent

测试依赖于上下文,这基本上意味着您测试电子商务网站的方式将与您测试商业现成应用程序的方式不同。所有开发的软件都不相同。您可以根据应用程序类型使用不同的方法,方法,技术和测试类型。

Guide to SDLC , STLC & V-Model

  • The left side of the model is Software Development Life Cycle - SDLC
  • The right side of the model is Software Test Life Cycle - STLC
  • The entire figure looks like a V, hence the name V - model

Different stages in Software Test Life Cycle(STLC)

STLC - Software Testing Life Cycle

**Entry Criteria:**Entry Criteria gives the prerequisite items that must be completed before testing can begin.

Exit Criteria: Exit Criteria defines the items that must be completed before testing can be concluded

进入标准:进入标准给出了必须在测试开始之前完成的先决条件。

退出标准:退出标准定义了在完成测试之前必须完成的项目

Requirement Analysis

  • Identify types of tests to be performed.
  • Gather details about testing priorities and focus.
  • Prepare Requirement Traceability Matrix (RTM).
  • Identify test environment details where testing is supposed to be carried out.
  • Automation feasibility analysis (if required).

确定要执行的测试类型。
收集有关测试优先级和重点的详细信息。
准备需求可追踪性矩阵(RTM)。
确定应该进行测试的测试环境细节。
自动化可行性分析(如果需要)。

Test Planning

  • Preparation of test plan/strategy document for various types of testing
  • Test tool selection
  • Test effort estimation
  • Resource planning and determining roles and responsibilities.
  • Training requirement

为各种类型的测试准备测试计划/策略文档
测试工具选择
测试工作量估算
资源规划和确定角色和职责。
培训要求

Test Case Development

  • Create test cases, automation scripts (if applicable)
  • Review and baseline test cases and scripts
  • Create test data (If Test Environment is available)

创建测试用例,自动化脚本(如果适用)
检查和基准测试用例和脚本
创建测试数据(如果测试环境可用)

Test Environment Setup

  • Understand the required architecture, environment set-up and prepare hardware and software requirement list for the Test Environment.
  • Setup test Environment and test data
  • Perform smoke test on the build

了解所需的体系结构,环境设置以及为测试环境准备硬件和软件需求列表。
设置测试环境和测试数据
在构建上执行冒烟测试

Test Execution

  • Execute tests as per plan
  • Document test results, and log defects for failed cases
  • Map defects to test cases in RTM
  • Retest the Defect fixes
  • Track the defects to closure

记录测试结果,并记录失败案例的缺陷
将缺陷映射到RTM中的测试用例
重新测试缺陷修复程序
跟踪缺陷到关闭

Test Cycle Closure

  • Evaluate cycle completion criteria based on Time,Test coverage,Cost,Software,Critical Business Objectives , Quality
  • Prepare test metrics based on the above parameters.
  • Document the learning out of the project
  • Prepare Test closure report
  • Qualitative and quantitative reporting of quality of the work product to the customer.
  • Test result analysis to find out the defect distribution by type and severity.

根据时间,测试覆盖率,成本,软件,关键业务目标,质量评估周期完成标准
根据上述参数准备测试指标。
记录项目的学习情况
准备测试结束报告
向客户定性和定量报告工作产品的质量。
测试结果分析,根据类型和严重程度找出缺陷分布。

STLC Stage Entry Criteria Activity Exit Criteria Deliverables
Requirement Analysis Requirements Document available (both functional and non functional)Acceptance criteria defined.Application architectural document available. Analyse business functionality to know the business modules and module specific functionalities.Identify all transactions in the modules.Identify all the user profiles.Gather user interface/ authentication, geographic spread requirements.Identify types of tests to be performed.Gather details about testing priorities and focus.Prepare RequirementTraceability Matrix (RTM).Identify test environment details where testing is supposed to be carried out.Automation feasibility analysis (if required). Signed off RTMTest automation feasibility report signed off by the client RTMAutomation feasibility report (if applicable)
Test Planning Requirements DocumentsRequirement Traceability matrix.Test automation feasibility document. Analyze various testing approaches availableFinalize on the best suited approachPreparation of test plan/strategy document for various types of testingTest tool selectionTest effort estimationResource planning and determining roles and responsibilities. Approved test plan/strategy document.Effort estimation document signed off. Test plan/strategy document.Effort estimation document.
Test case development Requirements DocumentsRTM and test planAutomation analysis report Create test cases, test design, automation scripts (where applicable)Review and baseline test cases and scriptsCreate test data Reviewed and signed test Cases/scriptsReviewed and signed test data Test cases/scriptsTest data
Test Environment setup System Design and architecture documents are availableEnvironment set-up plan is available Understand the required architecture, environment set-upPrepare hardware and software development requirement listFinalize connectivity requirementsPrepare environment setup checklistSetup test Environment and test dataPerform smoke test on the buildAccept/reject the build depending on smoke test result Environment setup is working as per the plan and checklistTest data setup is completeSmoke test is successful Environment ready with test data set upSmoke Test Results.
Test Execution Baselined RTM, Test Plan , Test case/scripts are availableTest environment is readyTest data set up is doneUnit/Integration test report for the build to be tested is available Execute tests as per planDocument test results, and log defects for failed casesUpdate test plans/test cases, if necessaryMap defects to test cases in RTMRetest the defect fixesRegression Testingof applicationTrack the defects to closure All tests planned are executedDefects logged and tracked to closure Completed RTM with execution statusTest cases updated with resultsDefect reports
Test Cycle closure Testing has been completedTest results are availableDefect logs are available Evaluate cycle completion criteria based on - Time,Test coverage , Cost , Software Quality , Critical Business ObjectivesPrepare test metrics based on the above parameters.Document the learning out of the projectPrepare Test closure reportQualitative and quantitative reporting of quality of the work product to the customer.Test result analysis to find out the defect distribution by type and severity Test Closure report signed off by clie

Manual Testing Tutorial for Beginners

Manual Testing vs Automation Testing

Manual Testing Automated Testing
Manual testing requires human intervention for test execution. Automation Testing is use of tools to execute test cases
Manual testing will require skilled labour, long time & will imply high costs. Automation Testing saves time, cost and manpower. Once recorded, it’s easier to run an automated test suite
Any type of application can be tested manually, certain testing types like ad-hoc and monkey testing are more suited for manual execution. Automated testing is recommended only for stable systems and is mostly used for Regression Testing
Manual testing can be become repetitive and boring. The boring part of executing same test cases time and again, is handled by automation software in Automation Testing.

Tools to Automate Manual Testing

自动化提高了测试执行的速度
自动化有助于提高测试覆盖率

Which Test Cases to Automate?

Test cases to be automated can be selected using the following criterion to increase the automation ROI

  • High Risk - Business Critical test cases
  • Test cases that are repeatedly executed
  • Test Cases that are very tedious or difficult to perform manually
  • Test Cases which are time-consuming

高风险 - 业务关键测试用例
重复执行的测试用例
测试案例非常繁琐或难以手动执行
测试用例非常耗时

The following category of test cases are not suitable for automation:

  • Test Cases that are newly designed and not executed manually at least once
  • Test Cases for which the requirements are frequently changing
  • Test cases which are executed on an ad-hoc basis.

测试用例是新设计的,至少不能手动执行一次
需求经常变化的测试用例
在临时基础上执行的测试用例。

Automated Testing Process:

AUTOMATION TESTING Tutorial: Process, Planning & Tools

Test Tool selection largely depends on the technology the Application Under Test is built on.

Define the scope of Automation

  • The features that are important for the business
  • Scenarios which have a large amount of data
  • Common functionalities across applications
  • Technical feasibility
  • The extent to which business components are reused
  • The complexity of test cases
  • Ability to use the same test cases for cross-browser testing

对业务非常重要的功能
具有大量数据的场景
跨应用程序的常见功能
技术可行性
业务组件重用的程度
测试用例的复杂性
能够使用相同的测试用例进行跨浏览器测试

Planning, Design, and Development

  • Automation tools selected
  • Framework design and its features
  • In-Scope and Out-of-scope items of automation
  • Automation testbed preparation
  • Schedule and Timeline of scripting and execution
  • Deliverables of Automation Testing

Framework for Automation

A framework is set of automation guidelines which help in

  • Maintaining consistency of Testing
  • Improves test structuring
  • Minimum usage of code
  • Less Maintenance of code
  • Improve re-usability
  • Non Technical testers can be involved in code
  • The training period of using the tool can be reduced
  • Involves Data wherever appropriate

保持测试的一致性
改进了测试结构
代码的最低使用量
减少代码维护
提高可重用性
非技术测试人员可以参与代码
可以减少使用该工具的训练期
在适当的地方涉及数据

four types of frameworks

  1. Data Driven Automation Framework
  2. Keyword Driven Automation Framework
  3. Modular Automation Framework
  4. Hybrid Automation Framework

数据驱动的自动化框架
关键字驱动自动化框架
模块化自动化框架
混合自动化框架

To get maximum ROI of automation, observe the following

  • The scope of Automation needs to be determined in detail before the start of the project. This sets expectations from Automation right.
  • Select the right automation tool: A tool must not be selected based on its popularity, but it’s fit to the automation requirements.
  • Choose appropriate framework
  • Scripting Standards- Standards have to be followed while writing the scripts for Automation. Some of them are-
    • Create uniform scripts, comments, and indentation of the code
    • Adequate Exception handling - How error is handled on system failure or unexpected behavior of the application.
    • User-defined messages should be coded or standardized for Error Logging for testers to understand.
  • Measure metrics- Success of automation cannot be determined by comparing the manual effort with the automation effort but by also capturing the following metrics.
    • Percent of defects found
    • The time required for automation testing for each and every release cycle
    • Minimal Time is taken for release
    • Customer Satisfaction Index
    • Productivity improvement

自动化范围需要在项目开始之前详细确定。这为自动化设定了期望。
选择正确的自动化工具:不能根据工具的受欢迎程度选择工具,但它适合自动化要求。
选择合适的框架
脚本标准 - 在编写自动化脚本时必须遵循标准。他们之中有一些是-
创建统一的脚本,注释和代码缩进
足够的异常处理 - 如何处理系统故障或应用程序的意外行为时出错。
用户定义的消息应编码或标准化,以便错误记录以供测试人员理解。
衡量指标 - 无法通过将手动工作与自动化工作进行比较来确定自动化的成功,但也可以通过捕获以下指标来确定。
发现的缺陷百分比
每个发布周期自动化测试所需的时间
发布时间最短
客户满意度指数
提高生产力

自动化测试的好处:

Different types of software testing that can be automated

How to Choose an Automation Tool?

  • Environment Support
  • Ease of use
  • Testing of Database
  • Object identification
  • Image Testing
  • Error Recovery Testing
  • Object Mapping
  • Scripting Language Used
  • Support for various types of test - including functional, test management, mobile, etc…
  • Support for multiple testing frameworks
  • Easy to debug the automation software scripts
  • Ability to recognize objects in any environment
  • Extensive test reports and results
  • Minimize training cost of selected tools

环境支持

易用性

测试数据库

目标识别

图像检测

错误恢复测试

对象映射

脚本语言使用

支持各种类型的测试-包括功能,测试管理,移动等等…

支持多个测试框架

易于调试的自动化软件脚本

能够识别任何环境中的对象

广泛的测试报告和结果

最小化所选工具的培训成本

Automation Testing Tools

1.Tricentis

  • 功能和回归测试工具:

  • 基于风险的测试

  • 脚本的端到端自动化测试时

  • 支持API、BI、Mobile、Cross Browser、RPA等自动化测试类型

  • 业界最广泛的技术支持

2.mabl

  • 专有的机器学习模型自动识别和表面应用问题

  • 当UI更改时,测试将自动修复

  • 对每个构建的自动回归分析

3.TestIM

  • Testim。io利用人工智能来编写、执行和维护自动化测试用例。

4.Selenium

  • It provides the provision to export recorded script in other languages like Java, Ruby, RSpec, Python, C#, etc
  • It can be used with frameworks like JUnit and TestNG
  • It can execute multiple tests at a time
  • Autocomplete for Selenium commands that are common
  • Walkthrough tests
  • Identifies the element using id, name, X-path, etc.
  • Store tests as Ruby Script, HTML, and any other format
  • It provides an option to assert the title for every page
  • It supports selenium user-extensions.js file
  • It allows to insert comments in the middle of the script for better understanding and debugging

5.QTP (MicroFocus UFT)

  • QTP被广泛用于功能测试和回归测试,它解决了每个主要的软件应用和环境。为了简化测试的创建和维护,它使用了关键字驱动测试的概念。它允许测试人员直接从应用程序构建测试用例。

  • 非技术人员更容易适应和创建工作测试用例

  • 通过为开发人员完整地记录和复制缺陷,它可以更快地修复缺陷

  • 在单个站点上折叠测试创建和测试文档

  • 参数化比WinRunner简单

  • QTP支持。net开发环境

  • 具有较好的对象识别机制

  • 通过使用ActiveScreen,它可以在没有“测试中的应用程序”可用的情况下增强现有的QTP脚本

6.Rational Functional Tester

  • 它是一个面向对象的自动化功能测试工具,能够执行自动化功能、回归、数据驱动测试和GUI测试。这个工具的主要特性是

  • 它支持广泛的协议和应用程序,如Java、HTML、NET、Windows、SAP、Visual Basic等。

  • 它可以根据需要记录和回放操作

  • 它很好地集成了源代码管理工具,例如Rational Clear Case和Rational Team Concert集成

  • 它允许开发人员创建与关键字相关的脚本,以便重用它

  • Eclipse Java Developer Toolkit editor帮助团队使用Eclipse在Java中编写测试脚本

  • 它通过代理SDK (Java/.Net)支持自定义控件

  • 它支持版本控制,以支持测试脚本的并行开发和地理分布团队的并发使用

7.WATIR

  • 它是一个用于回归测试的开源测试软件。它使您能够编写易于阅读和维护的测试。Watir只支持windows上的internet explorer,而Watir webdriver支持Chrome、Firefox、IE、Opera等。

  • 它支持不同平台上的多个浏览器

  • 它没有使用专有的供应商脚本,而是使用了功能齐全的现代脚本语言Ruby

8.SilkTest

  • Silk测试是为做功能测试和回归测试而设计的。对于电子商务应用,silk test是领先的功能测试产品。这是2006年Borland接管Segue软件的产品。它是一种面向对象的语言,就像c++一样。它使用对象、类和继承的概念。其主要特征包括

  • 它由所有源脚本文件组成

  • 它将脚本命令转换为GUI命令。在同一台机器上,命令可以在远程或主机上运行

  • 要识别鼠标随着按键的移动,可以执行Silktest。它可以利用回放和记录方法或描述性编程方法来获得对话框

  • 它将测试应用程序的所有控件和窗口标识为对象,并确定每个窗口的所有属性和属性

猜你喜欢

转载自blog.csdn.net/nicezheng_1995/article/details/81589398