Monday, 12 August 2013

Structure Based Technique White Box

Structure based testing is a strategy in which testing is based solely on the internal working and structure of the code. Testing is based on the internal paths, structure, and implementation of the software under test (SUT). In contrast to its complement, black box testing, it generally requires detailed programming skills.
Structure based testing is commonly referred to as "white box testing". It is also called as "Glass box" or "Clear Box" testing.

Process involved in white box testing are follows:
  1. Analyze the SUT's implementation and then identify paths through the SUT.
  2. Choose the inputs to cause the SUT to execute selected paths. Expected results for those inputs are determined.
  3. Execute the tests. Actual outputs are compared with the expected outputs.
  4. A determination is made as to the proper functioning of the SUT.
Notre: The tester must have programming skill to understand and evaluate the SUT.

White box testing comprises following techniques under static and structural testing:
Desk checking
Code walkthrough
Formal or fagan inspection
statement coverage
Flow graph and path testing
Data flow testing
syntax testing

How To use All Pairs Technique Testing

All PairsTesting: It is also known as Pairwise Testing Technique which is a combinatorial software testing method where, for each pair of input parameters to a system, all possible discrete combinations of those parameters are identified and tested.

In this method, a set of test cases is generated that covers all combinations of the selected test data values for each pair of variables. It's also referred as 2-way testing. It is also possible to do all triples or all quadruples testing, but the size of the higher order test sets grows very rapidly.

This technique normally begins by selecting values for the system's input variables. These individual values are often selected using domain partitioning. The values are then permuted to achive coverage of all the pairings.

The steps for using all pairs testing technique follows:
STEP 1: Analyze the given test inputs or requirements and list out the variables in the application to be tested. This can be listed in the form of a table where column headers represent the various variables to be tested.

Note: Equivalence class partitioning technique can also be used at this point to partition and group together variables.

STEP 2: List out the various possible values each of the variables can hold. These values can be put in rows just beneath the corresponding variables.

STEP 3: Create the "ALL Pairs" table by putting the variables in the top row and start by filling in the values for the variables in each column.

STEP 4: If a combination does not exist, then swap around with the values to see if the combination can be got.

STEP5: Else add a new row
Posted on 07:56 | Categories:

Wednesday, 31 July 2013

Technique with examples orthogonal array testing

Orthogonal array testing is combinatorial software testing which uses a systematic, statistical way of deriving test conditions and test cases. It is followed in places where there are a large number of combinations that should be tested and would be risky if we do not test them.

Technique:
The steps for using orthogonal array technique are:
STEP 1: Analyze the given test inputs or requirements and list out the variables that needs to be tested for interaction.
STEP 2: Determine the number of choices or values for each variable.
STEP 3: Locate an orthogonal array which has a column for each variable and values within the columns that correspond to the values for each variable.
STEP 4: Map the variables with their values on to the orthogonal array.
STEP 5: Each row in the table corresponds to a test condition or a unique test case.

Examples: Company A has designed a web page with three distinct sections (Top, middle, and bottom). These sections can be individually shown or hidden by the user. The browsers on which the webpage can be viewed with are internet explorer and firefox. The server used for launching the application can be IIS, Apache and weblogic. Create an orthogonal array to test the interactions of the different sections. Use orthogonal array to select the test conditions that would be required to test this scenario.

Solution:
STEP1: The variables that needs to be tested for interaction are sections, visibility, browsers and servers.
STEP 2: The number of choices or values for each variable is:
  • Sections: Top, middle, bottom
  • Visibility: shown, hidden
  • Web browser: Internet explorer, firefox
  • Servers: IIS, APache amd weblogic
STEP 3: The orthogonal array that can be used would be Lbase 9(3power 4)array.
STEP4 : Map the variables with their values on to the orthogonal array

Tuesday, 30 July 2013

State transition diagram in testing

State Transition Testing Technique:
Steps for using state transition testing are:
STEP 1: Understand the various states that the system , user, or object can be in, including the initial and final states. Examples of states can be 'User raising a purchase order' or 'leave request is accepted'.  State are represented as,

STEP 2: Identify transitions, events, conditions, and actions that can and can't apply in each state.

STEP 3: Use a graph or table to model the system. This graph or table also serves as an oracle to predict correct system behavior along with a requirement specification.

STEP 4: For each event and condition (i.e each transition) verify that the correct action and next state occurs.

STEP 5: Create test cases in such a way that all states are visited at least once, all events are triggered at least once and all paths are executed at least once. (i.e all transitions in the system are tested at least once).

Example for using state transition testing:

What is State Transition Testing

State Transition Testing:
State-Transition diagrams are an excellent tool to capture certain types of system requirements and to document internal system design. These diagrams document the events that come into and are processed by a  system as well as the system's responses. When a system must remember what happened before or when valid and invalid orders of operation exist, then state transition testing could be used. It is useful in situations when workflow modelling or dataflow modelling has been done, which mean that the system moves from one state to another.

State Transition diagrams uses states, events, actions and transitions of the system to be tested. Together with all these components, they represent how a system interacts with the outside world and process them.

Some of the terms use din state transition testing are:
State: A state is a condition in which a system is waiting for one or more events. States remember inputs the system has received in the past and define how the system should respond to subsequent events when they occur. These events may cause state transitions and or initiate actions. The state is generally represented by values of one or more variables within a system.

Transition: It represents a change from one state to another caused by an events.
Event: Something that causes the system to change state. Events may have parameters associated with them. Events can be independent or casually related.

Actions:  An action is an operation initiated because of state change. Often these actions causes something to be created that is outputs of the system.