軟件測試中什么是正交實驗法_軟件工程中的正交性

軟件測試中什么是正交實驗法

正交性 (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.pswp.cn/news/390660.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390660.shtml
英文地址,請注明出處:http://en.pswp.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] 給你由…