Subscribe by Email


Showing posts with label Sequences. Show all posts
Showing posts with label Sequences. Show all posts

Thursday, May 17, 2012

Explain concatenated loops in detail?


Loops as we all know are quite an essential programming constructs in the program that involve solving the complex problems with the repetition of the simple statements. With the loops it has been possible to reduce the drudgery of the programmers and developers of writing the same code again and again innumerable number of times. Everyone is familiar with the three types of loops namely:
   (i)  For loop
   (ii) While loop and lastly
   (iii) The do while loop
Based up on the structure of the loops, they have been categorized as mentioned below:
   (i)  Structured loops and
   (ii) The unstructured loops

There are various kinds of other loops like the nested loops and simple loops. Yet there is one more kind of loops that we are going to discuss in this article namely “the concatenated loops”. Before going to the discussion regarding the concatenated loops let us clear up with the meaning of the concatenation. 

What is meant by Concatenation and Concatenated Loops


- To concatenate means to join two things mostly statements or words or strings together end by end to make them in to one single statement, word or string respectively as the case may be. 
- Concatenated loops are the loops that occur in following to the preceding loop in the code of the program.
- The execution of the next loop begins only after the termination of the previous loop. 
Concatenated loops are usually found to be the independent loops since the number of times they have to be iterated does not depends on the iterations of any other loop.
- They are treated normally as the other simple loops in the sequence.

Guidelines for testing concatenated loops


For testing these loops separate guidelines are followed rather than the simple loops.
- For the first and the last loop in the concatenated sequence, simple loop tests are conducted at the minimum possible values. 
- For the successive loops also the simple loop tests are carried out and keeping minimal values for the upper loops and typical values for the lower loops.
- Loop concatenation along with another looping technique called loop replication is used for increasing the network capacity. 
- The above mentioned approach is to be used only if the concatenated loops are found to be independent loops.
- If they are not found to be independent than the nested approach for testing is to be followed. 
- If there are two concatenated loops say loop 1 and loop 2 and if the loop counter of the loop1 is used as the initial value for the loop 2 or vice versa, then the loops are not said to be independent. 

More about Concatenated Loops


- The concatenated loops are quite easy to maintain as compared to the other types of loops except the simple loops.
- Concatenated loops form the basis of most of the program algorithms.
- The testing of these loops is carried out in accordance with the white box testing techniques. 
- The testing techniques are applied based up on the validity of the loop constructs.
- It depends up on the programmer whether the loops are tested independently or in groups. 
- The following tests can be applied to the concatenated loops:
  1. Skipping of the entire loop
  2. Giving one pass to the loop
  3. Giving m passes to the loop where the m is less than n.
  4. Giving, n, n + 1, n – 1 passes through the loop.
In the third test the n is the number of maximum passes allowed for the loop.


Wednesday, October 19, 2011

How a task network is defined for a software engineering project?

The task network is a useful mechanism for depicting inter task dependencies and determining the critical path. When more people are working on a software engineering project, tasks and sub-tasks have their own inter-dependencies and also as the number of people increases, the development activities and tasks are performed in parallel. These concurrent tasks must be coordinated so that so that they will be complete when later tasks require their work products.

What is a task network?
It is also known as activity network. It is a graphic representation of how the tasks are flowing in a software engineering project. There is a pattern and a sequence that is followed by tasks. This task network can be used as a mechanism or a way to know this sequence and pattern of the tasks that can act as an input to an automated project scheduling tool.

On a macroscopic view, task network depicts the software engineering tasks. On a microscopic view, each and every task in the task network is expanded. For a concept development project, task network includes the following tasks:
- Concept Scoping
- Concept Planning
- Technology and Risk Assessment (It constitutes three tasks).
- Proof of Concept
- Concept Implementation (It constitutes three tasks).
- Integrate the three tasks which constitutes concept implementation.
- Customer Reaction

Software engineering activities are concurrent in nature. This nature leads to scheduling requirements. The project manager should keep in mind the following points to ensure continuous progress:
- He should determine the inter-task dependencies.
- He should be aware of tasks that lie on critical path which means the tasks that should be completed on schedule if project has to completed on schedule.


Monday, July 25, 2011

Designing Conventional Components- Graphical Design Notation and Tabular Design Notation

A set of constrained logical constructs that emphasize on maintenance of functional domain are used for designing conventional components. These logical constructs are sequence, condition, and repetition. Structured programming is a design technique that constrains logic flow to three constructs: sequence, condition, and repetition. These structured constructs help in reducing the complexity of the program and enhances readability, test ability and maintainability.

GRAPHICAL DESIGN NOTATION
- Activity diagram is a descendant of flowchart in which all elements of structured programming are represented.
- In a flowchart, each step in the process is represented by a different symbol and contains a short description of the process step.
- Structured programming constructs should make it easier to understand the design. If unnecessary complexity is introduced by using them without violation, it is better ti violate them.
- Dogmatic use of structured constructs introduces inefficiency.

TABULAR DESIGN NOTATION
- Decision tables translates actions and conditions into a tabular form.
- A decision table is used when a complex set of conditions and actions are encountered within a component.
- Decision table is divided into four quadrants. Upper left quadrant lists all conditions. Lower left quadrant lists all actions. Right hand quadrants form a matrix indicating condition combinations and corresponding actions


Friday, July 22, 2011

How to create a behavioral model in software engineering?

While other analysis modeling elements provides a static view of the software, behavioral modeling depicts the dynamic behavior. The behavioral model uses input from scenario based, flow oriented and class based elements to represent the states of analysis classes and the system as a whole. To accomplish this, states are identified, the events that cause a class to make a transition from one state to another are defined, and the actions that occur as transition is accomplished are also identified. State diagrams and sequence diagrams are the UML notation used for behavioral modeling.

The behavioral model is an indication showing how a software responds to external event. Steps to be followed are:
- All use cases are evaluated.
- Events are identified and their relation to classes are identified.
An event occurs whenever the system and an user exchange information. An event is not the information that is exchanged but a fact that information has been exchanged.

- A sequence is created for use-case.
- A state diagram is built.
There are two different characterizations of states in behavioral modeling : state of class as system performs its function and the state of the system as seen from outside. The system has states that represent specific externally observable behavior whereas a class has states that represent its behavior as the system performs its functions.
- Behavioral model is reviewed for accuracy and consistency.


Wednesday, November 24, 2010

How can the testing of API calls be done?

Testing of API calls can be done in isolation or in sequence to vary the order in which the functionality is exercised and to make the API produce some useful results from these tests. Designing tests is essentially designing sequences of API calls that have a potential of satisfying the test objectives.This in turn boils down to designing each call with specific parameters and to building a mechanism for handling and evaluating return values.
Designing of test cases depends on the following criteria:
- What value should a parameter take?
- What values together make sense?
- What combination of parameters will make APIs work in a desired manner?
- What combination will cause a failure, a bad return value, or an anomaly in the operating environment?
- Which sequences are the best candidates for selection?

Some of the interesting problems for testers are:
- Ensuring that the test harness varies parameters of the API calls in ways that verify functionality and expose failures. This includes assigning common parameter values as well as exploring boundary conditions.
- Generating interesting parameter value combinations for calls with two or more parameters.
- Determining the content under which an API call is made. This might include setting external environment conditions like files, peripheral devices and also the internal stored data that affect the API.
- Sequencing API calls to vary the order in which the functionality is exercised and to make the API produce useful results from successive calls.


Facebook activity