软件测试中什么是正交实验法_软件工程中的正交性

软件测试中什么是正交实验法

正交性 (Orthogonality)

In software engineering, a system is considered orthogonal if changing one of its components changes the state of that component only.

在软件工程中,如果更改系统的组件之一仅更改该组件的状态,则认为该系统是正交的。

For instance, consider a program with three variables: a, b, and c. Changing the value of a should not change the value of b or c, provided they are independent.

例如,考虑一个具有三个变量的程序:a,b和c。 更改a的值不应更改b或c的值,只要它们是独立的。

This property is particularly critical in debugging a program since one relies on narrowing down the number of moving parts of a program to identify the root cause of the problem.

此属性在调试程序时特别重要,因为人们依赖于缩小程序的移动部分的数量来确定问题的根本原因。

See the following quote from Eric S. Raymond’s “Art of UNIX programming”:

请参见Eric S. Raymond的“ UNIX编程艺术”中的以下引用:

Orthogonality is one of the most important properties that can help make even complex designs compact. In a purely orthogonal design, operations do not have side effects; each action (whether it’s an API call, a macro invocation, or a language operation) changes just one thing without affecting others. There is one and only one way to change each property of whatever system you are controlling.
正交性是最重要的属性之一,可以帮助使复杂的设计变得紧凑。 在纯正交设计中,操作没有副作用。 每个操作(无论是API调用,宏调用还是语言操作)都只会改变一件事而不会影响其他事情。 只有一种方法可以更改您所控制的任何系统的每个属性。

Orthogonality is a software design principle for writing components in a way that changing one component doesn’t affect other components. It is the combination of two other principles, namely strong cohesion and loose coupling.

正交性是一种软件设计原理,用于编写组件,而更改一个组件不会影响其他组件。 它是另外两个原理的结合,即强内聚和松散耦合。

It's actually is a term borrowed from mathematics. For example, two lines are orthogonal if they are perpendicular. In software design, two components are orthogonal if a change in one does not affect the other.

它实际上是一个从数学借来的术语。 例如,如果两条线是垂直的,则它们是正交的。 在软件设计中,如果一个组件的更改不影响另一个组件,则两个组件是正交的。

Applying this concept to classes or other sections of code results in less coupling. To be orthogonal two classes cannot depend on each others implementation. They also cannot share global data. Changing the internals of one class does not affect the other class. Components should be independent and have only a single responsibility.

将此概念应用于类或代码的其他部分可减少耦合。 要正交,两个类不能互相依赖。 他们也不能共享全局数据。 更改一个类的内部结构不会影响另一类。 组件应该是独立的,并且只有一个责任。

Consider a method that reads a list of numbers from a file and returns them in sorted order. Now the requirements change and the numbers are in a database. Modifying this method to access the database would cause client code to change. If this were two different methods, then a new source would not affect the sorting method. Only the client code would have to know the source of the numbers.

考虑一种从文件中读取数字列表并按排序顺序返回数字的方法。 现在,需求已更改,并且编号已存储在数据库中。 修改此方法以访问数据库将导致客户端代码更改。 如果这是两种不同的方法,那么新的来源将不会影响排序方法。 只有客户代码才需要知道数字的来源。

强大的凝聚力 (Strong Cohesion)

Inside a software component, code should be strongly connected. This is an indication that the code is correctly divided.

在软件组件内部,应牢固地连接代码。 这表明代码已正确划分。

If a component had two or more relatively disconnected parts, that may indicate that those parts should be in a different component, or on its own.

如果一个组件具有两个或多个相对断开的部分,则可能表明这些部分应位于不同的组件中,或单独存在。

松耦合 (Loose Coupling)

Between software components, there should be few connections. If two components are strongly coupled, it may indicate that they need to be one component, or that they need to be differently divided into more components.

在软件组件之间,应该很少有连接。 如果两个组件紧密耦合,则可能表明它们需要是一个组件,或者需要以不同的方式将它们分为更多的组件。

翻译自: https://www.freecodecamp.org/news/orthogonality-in-software-engineering/

软件测试中什么是正交实验法

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

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

相关文章

leetcode 279. 完全平方数(dp)

题目一 给定正整数 n,找到若干个完全平方数(比如 1, 4, 9, 16, …)使得它们的和等于 n。你需要让组成和的完全平方数的个数最少。 给你一个整数 n ,返回和为 n 的完全平方数的 最少数量 。 完全平方数 是一个整数,其…

github代码_GitHub启动代码空间

github代码Codespaces works like a virtual Integrated Development Environment (IDE) on the cloud.代码空间的工作方式类似于云上的虚拟集成开发环境(IDE)。 Until now, you had to make a pull request to contribute to a project. This required setting up the enviro…

php变量

什么叫变量&#xff1f; 变量可以通过变量名访问。在指令式语言中&#xff0c;变量通常是可变的&#xff1b; 这里就先这么简单理解&#xff0c;通过对语言的研究会更加的理解变量的其他意义。 在PHP中变量是用于存储信息的"容器"&#xff1a; <?php $x5; $y6;…

js将base64做UrlEncode转码

使用 encodeURIComponent() 其详细介绍 https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent var base64 &#xff08;base64值&#xff09;encodeURIComponent(base64 ) //转化 转载于:https://www.cnblogs.com/xll-qg/p…

引用自己创建的css样式表_如何使用CSS创建联系表

引用自己创建的css样式表First we create the HTML elements - input fields for First Name, Last Name, Email and a Text Area for the message.首先&#xff0c;我们创建HTML元素-名字&#xff0c;姓氏&#xff0c;电子邮件和消息的文本区域的输入字段。 Later we apply C…

leetcode 1449. 数位成本和为目标值的最大数字(dp)

这是我参与更文挑战的第12天 &#xff0c;活动详情查看更文挑战 题目 给你一个整数数组 cost 和一个整数 target 。请你返回满足如下规则可以得到的 最大 整数&#xff1a; 给当前结果添加一个数位&#xff08;i 1&#xff09;的成本为 cost[i] &#xff08;cost 数组下标…

风能matlab仿真_风能产量预测—深度学习项目

风能matlab仿真DL DATATHON- AI4ImpactDL DATATHON- AI4影响 Published by Team AI Traders — Suyash Lohia, Nguyen Khoi Phan, Nikunj Taneja, Naman Agarwal and Mihir GuptaAI交易员团队发布 -Suyash Lohia&#xff0c;Nguyen Khoi Phan&#xff0c;Nikonj Taneja&#x…

android JNI调用(Android Studio 3.0.1)(转)

最近回头复习了一下android 的jni调用&#xff0c;却发现按以前的方法调用失败&#xff0c;一怒之下就重新摸索&#xff0c;碰了几次壁&#xff0c;发现网上好多教程都不能成功调用&#xff0c;于是记录一下现在AS版本成功好用的调用方法。 这里设定你的ndk已经下载并且设置没问…

安卓源码 代号,标签和内部版本号

SetupSecurityPortingTuningCompatibilityReference转到源代码Getting Started OverviewCodelines, Branches, and ReleasesCodenames, Tags, and Build NumbersProject RolesBrand GuidelinesLicensesFAQSite UpdatesDownloading and Building RequirementsEstablishing a Bui…

git 列出标签_Git标签介绍:如何在Git中列出,创建,删除和显示标签

git 列出标签Tagging lets developers mark important checkpoints in the course of their projects development. For instance, software release versions can be tagged. (Ex: v1.3.2) It essentially allows you to give a commit a special name(tag).通过标记&#xff…

leetcode 278. 第一个错误的版本(二分)

题目 你是产品经理&#xff0c;目前正在带领一个团队开发新的产品。不幸的是&#xff0c;你的产品的最新版本没有通过质量检测。由于每个版本都是基于之前的版本开发的&#xff0c;所以错误的版本之后的所有版本都是错的。 假设你有 n 个版本 [1, 2, …, n]&#xff0c;你想找…

腾讯哈勃_用Python的黑客统计资料重新审视哈勃定律

腾讯哈勃Simple OLS Regression, Pairs Bootstrap Resampling, and Hypothesis Testing to observe the effect of Hubble’s Law in Python.通过简单的OLS回归&#xff0c;配对Bootstrap重采样和假设检验来观察哈勃定律在Python中的效果。 In this post, we will revisit Hub…

JAVA中动态编译的简单使用

一、引用库 pom文件中申明如下&#xff1a; <dependencies><!-- https://mvnrepository.com/artifact/junit/junit --><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version><…

程序员实用小程序_我从阅读《实用程序员》中学到了什么

程序员实用小程序In short: old but gold.简而言之&#xff1a;古老而又黄金。 Published in 1999, The Pragmatic Programmer is a book about how to become a Pragmatic Programmer. Which really means a ‘Good Programmer’. 《实用程序员》于1999年出版&#xff0c;是一…

leetcode 5786. 可移除字符的最大数目(二分法)

题目 给你两个字符串 s 和 p &#xff0c;其中 p 是 s 的一个 子序列 。同时&#xff0c;给你一个元素 互不相同 且下标 从 0 开始 计数的整数数组 removable &#xff0c;该数组是 s 中下标的一个子集&#xff08;s 的下标也 从 0 开始 计数&#xff09;。 请你找出一个整数…

如何使用Picterra的地理空间平台分析卫星图像

From April-May 2020, Sentinel-Hub had organized the third edition of their custom script competition. The competition was organized in collaboration with the Copernicus EU Earth Observation programme, the European Space Agency and AI4EO consortium.从2020年…

df -l查看本地文件系统

df -l, --locallimit listing to local file systems 转载于:https://www.cnblogs.com/jonathanyue/p/9301222.html

在Packet Tracer中路由器静态路由配置

实验目标&#xff1a;<1>掌握静态路由的配置方法和技巧<2>掌握通过静态路由方式实现网络的连通性<3>熟悉广域网线缆的链接方式技术原理&#xff1a;<1>路由器属于网络层设备&#xff0c;能够根据IP包头的信息&#xff0c;选择一条最佳路径&#xff0c;…

python示例_带有示例的Python功能指南

python示例Python函数简介 (Introduction to Functions in Python) A function allows you to define a reusable block of code that can be executed many times within your program.函数允许您定义一个可重用的代码块&#xff0c;该代码块可以在程序中多次执行。 Function…

leetcode 852. 山脉数组的峰顶索引(二分查找)

题目 符合下列属性的数组 arr 称为 山脉数组 &#xff1a; arr.length > 3 存在 i&#xff08;0 < i < arr.length - 1&#xff09;使得&#xff1a; arr[0] < arr[1] < … arr[i-1] < arr[i] arr[i] > arr[i1] > … > arr[arr.length - 1] 给你由…