Wednesday, May 22, 2013
What are Address Binding, Dynamic Loading and Dynamic Linking?
Posted by
Sunflower
at
5/22/2013 08:45:00 PM
0
comments
Labels: Address, Address Binding, Application, Binding, Dynamic, Dynamic Linking, Dynamic Loading, Functionality, Load, Logical, Operating System, Physical, Process, Routines, Static, Variables, Virtual
![]() | Subscribe by Email |
|
Tuesday, May 15, 2012
How does a definition use association play a role in data flow testing?
About Data Flow Testing
- Defined,
created, initialized (d)
- Killed,
undefined, released (k)
- Used (u): in calculations (c)
- In predicates (p)
About Definition Use Associations
- X is
the variable
- D is
the node consisting of a definition of variable x
- U is
either a predicate node or a statement depending up on the case and
consists of a use of x.
- (x, 3,
4)
- (x, 1,
4)
- (y, 2,
(4, t))
- (z, 2,
(3, t)) etc.
- All
uses (AU)
- All DU
paths (ADUP) and many more.
Posted by
Sunflower
at
5/15/2012 03:55:00 PM
0
comments
Labels: Anomaly, Control flow Graph, Data, Data Flow Testing, Definition Use Association, DU, DU segment, Dynamic, Graph, Nodes, Path testing, Routines, Software testing, Statements, Static, Strategy, Tools, Types, Variables
![]() | Subscribe by Email |
|
Wednesday, October 5, 2011
Some details about Pointers to Arrays in C
A pointer is a variable that holds a memory address, usually of another variable in memory. The pointers are one of the most powerful and strongest features of C language. The correct understanding and use of pointers is critical to successful programming in C. pointer’s support C’s dynamic memory allocation routines. Pointers provide the means through which the memory location of a variable can be directly accessed and hence can be manipulated in the required way. Lastly, pointers can improve the efficiency of certain routines. Arrays and pointers are very loosely linked. C treats the name of array as if it were a pointer.
Consider the following code snippet:
Int *a ; // a is a pointer to an integer
Int age [10] ; //age is an array holding ten integers
For (int I = 0; I < 10 ; I ++)
a = age ; // makes a to point to the location where age points to. Age is a pointer pointing to age [0].
.
.
.
In the above code a is a pointer and age is an array holding 10 integers. The pointer a is made to point where age is pointing to. Since the name of an array is a pointer to its first element, the array name + 1 gives the address of the second element of the array, array name + 2 gives the address of the 3rd element, and so forth.
Pointers also may be arrayed like any other data type. To declare an array holding 10 integer pointers, the declaration would be as follows:
Int *ip [10] ; // array of 10 int pointers
After this declaration, contiguous memory would be allocated for 10 pointers that can point to integers. Now each of the pointers, the elements of pointer array, may be initialized. We can use the following statement:
Ip [3] = &a ;
To find the value of a, you can use the below given statement:
*ip [3] ;
The name of an array is actually a pointer to the first element of the array, the same holds true for the array of pointers also. Most often, an operation is carried on successive elements of an array. Using a loop for it and using the array elements indices. Consider the following code fragment that initializes an array to 0:
Const int abc = 20 ;
Int arr [ abc ] ;
For ( int I = 0 ; I < abc ; i++ )
Arr [ I ] = 0 ;
To execute the above code snippet, the compiler computes the address of array [ I ] every time by multiplying the index I by the size of an array element. That is, the compiler performs the multiplication for each element. A faster alternative would be to use a pointer as shown below:
Const int abc = 20 ;
Int arr [ abc ] ;
Int * arr2 ;
For ( arr2 = arr ; arr2 < &arr [ abc ] ; arr2++ )
*arr2 = 0;
Now the compiler only needs to evaluate a subscript once, when setting up the loop, and so saves 19 multiplication operations. So it is faster to use an element pointer than an index when you need to scan the arrays in a program. Pointers in c are defined by their data type and values. The data type determines the increment or decrements of the pointer value. The value is the address of the memory location to which the pointer is pointing. If you are using array notation, you don’t need to pass the dimensions.
Posted by
Sunflower
at
10/05/2011 07:45:00 PM
0
comments
Labels: Address, Arrays, C Language, Code, Data, Efficiency, Function, Integer, Memory, Pointers, Programming, Routines, Structures, Variables
![]() | Subscribe by Email |
|
Monday, June 6, 2011
What are different testing mechanisms used to test the sofware?
After deciding the inputs and outputs for the test cases, another issue that comes into picture is writing the code that actually tests the software. Following mechanisms can be used to write codes:
- TEST DRIVERS
The lower level modules can be tested by using a test driver program. Approach that is used is to write a program that passes input data to the unit under test and comparing the output to truth. Input is selected from uniform testing, Monte Carlo testing, selected input conditions or from manufactured data. Output is compared against trusted results using an inverse function or a file containing correct data.
- WHITE BOX TESTING
Test drivers can also be used to test several modules at once to save time if you are doing white box testing. White box testing taken advantage of the internal working of the module under test. This approach saves time but disadvantages include while testing several things together, you may get a right answer indicating that everything is right but if you do not get the right answer then you are not sure what went wrong.
- BLACK BOX TESTING
This testing does not depend on the internal working of the module unde test. It only depends on the inputs and outputs of the system.
- TEST STUBS
Test Drivers are high level routines that call lower level subprograms, test stubs can be used to test higher levels of program. Stub is a simple routine that takes the place of real routine. It may be a null procedure or it may have a simple message. There is no need for test stubs to be limited to fixed data or user supplied data. Stubs need not be just input stimulators. Stubs also display or record data sent to them.
- TEST AND DEMO PROGRAMS
A test program usually does not involve much operator intervention. A demo program is a quick confidence check.
Posted by
Sunflower
at
6/06/2011 12:07:00 PM
0
comments
Labels: Black box testing, Data, Demo Programs, Drivers, Mechanisms, Messages, Module, Operations, Routines, Software testing, Sub programs, Test cases, Test Drivers, Test Stubs, White box testing
![]() | Subscribe by Email |
|
Tuesday, June 22, 2010
Testing Approaches: Top-down Approach versus Bottom-up Approach
In a large software project, it is impractical to integrate all the modules of the project together and test the software as whole. It should be build and tested in stages. There are different testing approaches.
Test Approach is the Strategy which describes the test team's approch to test the software, both overall and also in each phase.It gives better idea for the team to plan and execute the testing phase with perfection.
Top-down Approach versus Bottom-up Approach
In top-down approach, testing is done from top of hierarchy. Dummy routines called studs that simulate a module are introduced.
Advantage:
• Easy to visualize functionality.
• Sense of completeness in the requirement.
• Easy to show the progress of development.
Disadvantage:
• UI driven approach hence high possibility of redundant business logics.
• Since an UI is readily available no developer would write a Unit test cases.
• No Concrete layer to rely on, as both presentation & Business Logic keep evolving.
• Lack of concrete test suits to ensure one layer is tied up.
In bottom-up approach, testing is done from bottom of the hierarchy. Dummy routines called drivers are introduced that invoke the module.
Advantage:
• Solid Business Logic, hence zero redundancy
• Good Unit test case can be written to validate changes.
• Developer has only option to use unit testing tools to test the Logic.
• Easy to manage changes and modification.
Disadvantage:
• Effort involved to write test cases.
• Progress of implementation cannot be show very effectively.
Posted by
Sunflower
at
6/22/2010 06:04:00 PM
0
comments
Labels: Advantages, Approaches, Bottom-up Approach, Disadvantages, Module, Routines, Software, Techniques, Testing, Top-down Approach
![]() | Subscribe by Email |
|