软件测试 测试策略_测试策略| 软件工程
軟件測試 測試策略
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
軟件測試 測試策略
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的软件测试 测试策略_测试策略| 软件工程的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ruby array_Ruby中带有示例
- 下一篇: 恒生估值系统_恒生指数和恒生国企指数投资