Niroshan Rajadurai

  • Increase font size
  • Default font size
  • Decrease font size
Technical


Using C++ with Test Driven Development

E-mail Print PDF
User Rating: / 1
PoorBest 
Introduction
This whitepaper explains how Test Automation tools can be used with C++ to support Test Driven Development (TDD) in an Agile-programming environment. This paper assumes some basic familiarity with Test Automation products. Traditional Software Development Most projects currently use a test automation tool in a traditional development environment where individual C++ classes are unit tested as they are developed. This pure unit testing allows the developer to ensure that the low-level requirements attributed to a unit are implemented correctly, while at the same time verifying the completeness of the testing via code coverage analysis.
Traditional Software Workflow
Figure 1 - Traditional Software Development - Waterfall Methodology
Since the code has already been written at this point, there are a number of issues in working this way:
  • The identification of a potential defect in the code developed is delayed by several days, if not weeks, after it has been written
  • There is a risk that developers will create unit tests based on the code developed, rather than deriving them directly from the requirements
  • Code is over engineered, and more code is developed than is required to satisfy the project requirements
Comments (0)
Last Updated on Wednesday, 13 July 2011 10:52 Read more...
 

Efficiently remove all files or directories with a particular name from your system

E-mail Print PDF
User Rating: / 1
PoorBest 

Useful UNIX scripting command.

If you have a common file or directory that needs to be removed from a directory tree, the following command can be useful for doing this:

find <starting_from_dir> -name <dir_OR_file_name> -exec /bin/rm -rf '{}' \;

This is ideal if you have spaces in the directory name, as the traditional method of using 'find' output inside a shell program will split the strings into blocks broken by white space. This will result in incomplete directory names.

Comments (0)
 

What code am I testing?

E-mail Print PDF

The importance of completely testing software applications, and achieving it cost effectively is currently one of the major growth areas in the software development tools industry. There are many tools that offer solutions for automating the unit and unit integration test process for our application code. These tools can parse our code, and from a few simple options automatically create test drivers to stimulate our code under test, and test stubs for our dependencies. While these tools vary in capability and automation, they all offer an improvement on current manual testing processes that are in place.

One of the areas that is relatively poorly understood, and perhaps glossed over in the selection of these tools, is the process they go through to parse the code under test and automatically build the test framework. Every unit test automation tool in the market today needs to parse the source code under test to determine types, and interfaces for functions to be tested, and implement stubs for its dependencies. As a result all of these parsers understand standard C or C++ code, however every compiler not only supports the standard C or C++ language, they have extensions.

Comments (0)
Last Updated on Wednesday, 12 January 2011 10:24 Read more...
 

Cache Theory 101

E-mail Print PDF

Cache Lookup Strategies

Let's say we have a 32KB cache with 32-byte blocks (lines).  This gives us 1024 blocks which can be held in the cache.  When we want to look in the cache to see if a particular block is present, we can use one of 3 basic strategies:

  1. look in every one of the 1024 blocks to see if the block's tag matches our access address.  This is known as a "fully-associative" cache, because any block from memory can reside in any block in the cache.
  2. use 10 bits of the access address as a selection index to one of the 1024 blocks, then compare that block's tag with our access address. This is known as a "direct-mapped" cache, where a particular block in memory can only go into one particular block in the cache.  All the memory blocks that go to the same cache block are said to be in the same "congruence class".
  3. use a fewer number of bits of the access address as a selection index into a "set" of cache blocks, then search each element of that set for a tag match.  This method is somewhere between a) and b), above, and is known as "set-associative".  For example, if I divide the cache up into 128 sets of 8 blocks each, I have an 8-way set-associative cache which is indexed by 7 bits of the access address. A particular block in memory can then go into any of the 8 blocks in its associated set.

 

Comments (0)
Last Updated on Thursday, 06 January 2011 11:25 Read more...
 

One Little Endian - Cross platform data handling issues

E-mail Print PDF
User Rating: / 1
PoorBest 

TCP/IP networks are rarely homogenous; they usually consist of a wide variety of machines, architectures, and operating systems - each storing binary data in various forms. The actual storage format is transparent as long as you access data locally (i.e., on the same machine). However, you must consider the data storage format differences when transmitting or receiving data across machines and networks.

Any data larger than a single byte can be store its bytes at least two ways: big endian order and little endian order.

Comments (0)
Last Updated on Wednesday, 05 January 2011 16:38 Read more...
 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  Next 
  •  End 
  • »


Page 1 of 3

Related Articles