软件测试 测试策略_测试策略| 软件工程

软件测试 测试策略

Testing is a process of checking any software for its correctness. Various strategies are followed by the testers while checking for the bugs and errors in the software. Let us have a look at these strategies:

测试是检查任何软件的正确性的过程。 测试人员在检查软件中的错误和错误时会遵循各种策略。 让我们看一下这些策略:

声明范围 (Statement Coverage)

The strategy here is to design test suites such that every statement of the software program is executed at least once. It is very important while testing software that every single of the program is executed because unless a statement is executed, we cannot determine whether it is error-free or not.

这里的策略是设计测试套件,以使软件程序的每个语句至少执行一次。 在测试软件时,必须执行程序的每一步,这一点非常重要,因为除非执行一条语句,否则我们无法确定它是否没有错误。

This type of thing should be taken at most care when there are conditional statements in the program (like if-else). The test cases should be chosen in such a way that every condition is fulfilled at least once in any of the test cases.

当程序中有条件语句时(例如if-else),这种事情应格外小心。 选择测试用例的方式应使任何一个测试用例中的每个条件至少满足一次。

分行覆盖 (Branch Coverage)

Branch testing is also known as edge testing. In the branch coverage testing strategy, the test cases are designed in such a way that both valid and invalid values are checked for that particular branch or edge. Then, according to the test cases, the result of the branch statements is assumed for true or false.

分支测试也称为边缘测试。 在分支覆盖测试策略中,测试用例的设计方式是针对该特定分支或边缘检查有效值和无效值。 然后,根据测试用例,假设分支语句的结果为是或否。

It is a stronger testing strategy than the statement coverage testing strategy because it ensures statement coverage as well as ensures that each edge condition to assume true and false values in turn.

与语句覆盖率测试策略相比,它是一种更强大的测试策略,因为它可以确保语句覆盖率,并确保每个边缘条件依次采用真值和假值。

条件覆盖 (Condition Coverage)

The condition testing strategy is a much more stringer strategy than both branch coverage and statement coverage strategies. In this technique of testing, the tester looks forward to reach every possible condition available in the program code. Now, with every condition fulfilled, comes another set of values that the particular block can have as an input. All these cases are covered in the condition coverage strategy of testing. Therefore, it assumes true and false values for every composite conditional expression, leading to a requirement of 2n test cases where n conditions are available in the program code. However, as the number of test cases in this strategy increases exponentially with the increase in the number of conditions available, it is suitable to perform this type of testing only for smaller values of n or can also be performed where the testing process is automated one.

与分支覆盖和语句覆盖策略相比,条件测试策略要严格得多。 在这种测试技术中,测试人员期待达到程序代码中可用的所有可能条件。 现在,在满足所有条件的情况下,出现了特定块可以具有作为输入的另一组值。 所有这些情况都包含在测试的条件覆盖策略中。 因此,它为每个复合条件表达式都假设为真和假值,从而导致需要2n个测试用例,其中程序代码中有n个条件可用。 但是,由于此策略中的测试用例数量随可用条件数量的增加呈指数增长,因此仅对较小的n值执行这种类型的测试是合适的,或者也可以在测试过程自动化的情况下执行。

路径覆盖 (Path Coverage)

The path coverage strategy is based on the inter-dependency of the modules on each other. The output of one module can affect the processing of the other modules. Also, a single change in the output generated by initial modules may result in a complete change in the subsequent modules. Therefore, this type of testing strategy aims to cover all the linearly independent paths available in the program. However, this type of testing requires even more test cases than the condition coverage strategy when the number of linearly independent paths is high, but still is an effective way of thoroughly checking the software for any bugs.

路径覆盖策略基于模块之间的相互依赖性。 一个模块的输出会影响其他模块的处理。 同样,初始模块生成的输出中的单个更改可能会导致后续模块中的完整更改。 因此,这种测试策略旨在覆盖程序中所有可用的线性独立路径。 但是,当线性独立路径的数量很多时,这种类型的测试需要比条件覆盖策略更多的测试用例,但仍然是彻底检查软件中任何错误的有效方法。

翻译自: https://www.includehelp.com/basics/strategies-of-testing-software-engineering.aspx

软件测试 测试策略

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/544750.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

漫画:什么是JVM的垃圾回收?

————— 第二天 —————————————————下面我们一起来研究这三个问题。问题1:哪些是需要回收的?首先我们需要知道如何哪些垃圾需要回收?判断对象是否需要回收有两种算法。一种是引用计数算法、一种是可达性分析算法。引用计…

C#日期格式

关于C#中日期DateTime的格式转换代码如下: PS:请忽略Log.v(); 这个是自定义的日志方法…… DateTime dt DateTime.Now; Log.v(dt.ToString("D"));//2017年1月23日 Log.v(dt.ToString("d"));//2017/1/23 Log.v(dt.ToString("…

48张图|手摸手教你性能监控、压测和调优

本文主要内容一、何为压力测试1.1、 大白话解释性能压测是什么:就是考察当前软件和硬件环境下,系统所能承受的最大负荷,并帮助找出系统的瓶颈所在。性能压测的目的:为了系统在线上的处理能力和稳定性维持在一个标准范围内&#xf…

java中intvalue_Java Float类intValue()方法与示例

java中intvalue浮动类intValue()方法 (Float class intValue() method) intValue() method is available in java.lang package. intValue()方法在java.lang包中可用。 intValue() method is used to return the value denoted by this Float object converted to type int (by…

JTable demo

简单讲就是在没有使用layout manager的时候用setSize,在使用了layout manager 的时候用setPreferredSize 并且setPreferredSize通常和setMinimumSize、setMaximumSize联系起来使用setSize()是你手动来设置组件的大小 Dimension 类封装单个对象中组件的宽度和高度&am…

C#操作Cookie

简单的存储Cookie和获取Cookie例子 public string SaveCookie(string name) {// 登陆成功要将必要数据存储到 Cookie 里HttpCookie httpCookie new HttpCookie("cookie");// 设置过期时间httpCookie.Expires DateTime.Now.AddHours(1);// 设置姓名httpCookie.Valu…

Java生成随机数的4种方式,以后就用它了!

作者 | 王磊来源 | Java中文社群(ID:javacn666)转载请联系授权(微信ID:GG_Stone)在 Java 中,生成随机数的场景有很多,所以本文我们就来盘点一下 4 种生成随机数的方式,以…

Java LinkedList addFirst()方法与示例

LinkedList addFirst()方法 (LinkedList addFirst() method) This method is available in package java.util.LinkedList. 软件包java.util.LinkedList中提供了此方法。 This method is used to insert an object at the initial or beginning stage of the linked list. 此方…

二层冗余网络引起的问题

1.广播风暴 环路会引起广播风暴 网络中主机会收到重复数据帧 2.MAC地址表震荡 环路引起的MAC地址表震荡,交换机死机 3.有可能收到重复的流量转载于:https://www.cnblogs.com/hotshotgg/p/4537817.html

Everything是如何搜索的

写在前面 使用了Everything之后,一直对他的搜索速度感兴趣,在网上也看了很多对其原理的揭秘,终于有空找了个源码研究了一下,原理就是对NTFS的USN特性进行使用。 原理 详细解释我参照别人家的博客来一段: 当扇区的文…

漫话:如何给女朋友解释String对象是不可变的?

String的不变性String在Java中特别常用&#xff0c;相信很多人都看过他的源码&#xff0c;在JDK中&#xff0c;关于String的类声明是这样的&#xff1a;public final class String implements java.io.Serializable, Comparable<String>, CharSequence { }可以看到&#…

XenServer 6.5实战系列之十一:Install Update For XenServer 6.5

为了保证XenServer主机的安全及功能的更新&#xff0c;在企业环境中我们需要定期的到Citrix官网或通过XenCenter进行下载和更新。今天我们会从在线和离线两种不同的方法进行Update的安装。更新补丁之前请务必阅读对应Update的相关资料、注意事项和做好备份。1. 离线安装更新在…

机器学习 属性_属性关系文件格式| 机器学习

机器学习 属性Today, we will be looking at the use of attribute relation file format for machine learning in java and we would be writing a small java code to convert the popularly used .csv file format into the arff (Attribute relation file format). This f…

C#标记废弃方法

一、普通用法 在C#中&#xff0c;如果一个方法我们不再使用&#xff0c;我们可以将其标记为“废弃”的方法&#xff0c;只需要在方法前&#xff0c;加一个[Obsolete]即可&#xff1b; [Obsolete] public void BiuBiuBiu(){// 嘿嘿嘿 }废弃方法并非不能使用&#xff0c;而是在…

阿里二面一问MySQL就开始野了,抓着底层原理不撒手啊!

最近项目增加&#xff0c;缺人手&#xff0c;面试不少&#xff0c;但匹配的人少的可怜。跟其他组的面试官聊&#xff0c;他也抱怨了一番&#xff0c;说候选人有点儿花拳绣腿&#xff0c;回答问题不落地&#xff0c;拿面试最常问的MySQL来说&#xff0c;并不只是懂“增删改查”、…

[转]“Ceph浅析”系列之(—)—Ceph概况

转载自&#xff1a;http://yizhaolingyan.net/?p11本文将对Ceph的基本情况进行概要介绍&#xff0c;以期读者能够在不涉及技术细节的情况下对Ceph建立一个初步印象。2.1 什么是Ceph&#xff1f;Ceph的官方网站Ceph.com上用如下这句话简明扼要地定义了Ceph&#xff1a;“Ceph…

关于C#监视剪贴板信息

##1、常规方法 在C#中&#xff0c;有一个常规检测剪贴板的方法&#xff0c;用的是 System.Windows.Forms.Clipboard&#xff1b; 使用起来很简单&#xff0c;代码如下&#xff1a; /// <summary> /// 设置剪贴板的文本内容 /// </summary> /// <param name&qu…

图解Java中的18 把锁!

乐观锁和悲观锁独占锁和共享锁互斥锁和读写锁公平锁和非公平锁可重入锁自旋锁分段锁锁升级&#xff08;无锁|偏向锁|轻量级锁|重量级锁&#xff09;锁优化技术&#xff08;锁粗化、锁消除&#xff09;乐观锁和悲观锁悲观锁悲观锁对应于生活中悲观的人&#xff0c;悲观的人总是想…

在CSS中使用not:first-child选择器

Introduction: 介绍&#xff1a; Well, selectors are a very common term to deal with while we are developing a website or web page. You might know quite a few of them and might as well be implementing them. You might also have noticed that all the selectors…

linux/unix 段错误捕获【续】

本文为“在C/C中捕获段错误&#xff0c;打印出错的具体位置”的续篇&#xff0c;进一步解决涉及动态链接库的情况。背景知识&#xff1a;linux/unix下动态链接库的基本原理/proc/pid/maps文件的基本格式动态链接库&#xff1a;在进程执行过程中动态加载&#xff0c;进程间可以共…