Skip to main content

Structural Testing

Structural Testing is the type of testing in which user should have the knowledge of the code because in this testing user need to check the structure of the system. Structural Testing is White Box Testing.

The intension of  Structural Testing is not to check the input and generated output. Structural Testing intension have to check the internal structure of the software and check the various structure and data structure of the software.

In Structural Testing, tester need to know the show the software implemented and how the software is working. Structural Testing can be perform in all level of testing. Generally developers use this kind of testing in Component Testing and Component Integration Testing.

There are some techniques to cheek the Structural Testing
  • Statement Coverage: By using Statement Coverage we can identity that which Statement is executed and which code is not executed so we need to verify the every line to code to check the execution of statement. The main goal of this Statement Coverage to test the complete code with the minimum usage of Test Cases. Means in Statement Coverage we verify that how we can execute the complete code by using minimum number of Test Cases.
Formula to find the Statement Coverage

Statement Coverage = (Total Number of Statement exercised/ Total Number of Statement) * 100%

  • Branch Coverage: Branch Coverage is used to ensure that there should be a Test Case so that all Branches should be tested at least once. This is also called Decision Coverage. Branch Coverage we use when there are possibilities of two outcomes . It may be IF Statement , Do While Loop , Cases Statement because in all this 2 outcomes can come. One is True and other is False. So Branch Coverage say that each out come of control statement should be executed at least once. 

Formula for Branch Coverage

    Branch Coverage = (Total Number of Decision Outcome Executed/ Total Number of Decision Outcomes) * 100%

    • Path Coverage: In Path Coverage every possible path should be executed at least once . It means it cover all statement and branch at least once. 

    Formula for Path Coverage

      Path Coverage = (Total Number of Path Exercised/ Total Number of Path in the Program) * 100%

      Comments

      Popular posts from this blog

      What is API?

      In general way, API (Application Programming Interface) is the intermediate software which is useful for two applications to communicate. API is the tool which is used for interaction of two applications. If developer developing any software which have multiple blocks (Modules) than developer use APIs to put them together.

      How to login into Yahoo Mail by using Selenium Web Driver

      In this example i am explaining you how to login into Yahoo Mail with your credential by using Selenium Web Driver. here you will learn also how to locate the Text box , Button in any web page. here you will learn to login with hard coded just for explaining you to locate web element. In later articles i will explaining you how you can take data from another file and how you can take data from the excel file to login into Yahoo Mail so that no one can see your login credential to make it secure.

      XPath Expression to locate Web Element

      In last article i mentioned you how to locate the Web Element with id, Name, LinkText, Partial LinkText, CSS Selectors, Class Name and Tag Name. We use FireBug add-one to use these 7 locators to locate the Web Element on Web Page. Now we are talking about XPath expression. Which is also a type of Locator. We need FirePath add-ons to use it.