Archive for December, 2009

Top down Testing vs Bottom up Testing

Posted on the December 28th, 2009 under Software Testing by Arun Vijayaraghavan

Top down Testing: In this approach testing is conducted from main module to sub module. if the sub module is not developed a temporary program called STUB is used for simulate the submodule.

Advantages:

- Advantageous if major flaws occur toward the top of the program.
- Once the I/O functions are added, representation of test cases is easier.
- Early skeletal Program allows demonstrations and boosts morale.

Disadvantages:
- Stub modules must be produced
- Stub Modules are often more complicated than they first appear to be.
- Before the I/O functions are added, representation of test cases in stubs can be difficult.
- Test conditions ma be impossible, or very difficult, to create.
- Observation of test output is more difficult.
- Allows one to think that design and testing can be overlapped.
- Induces one to defer completion of the testing of certain modules.

Bottom up testing: In this approach testing is conducted from sub module to main module, if the main module is not developed a temporary program called DRIVERS is used to simulate the main module.

Advantages:

- Advantageous if major flaws occur toward the bottom of the program.
- Test conditions are easier to create.
- Observation of test results is easier.

Disadvantages:

- Driver Modules must be produced.
- The program as an entity does not exist until the last module is added.

Stubs and Drivers

It is always a good idea to develop and test software in “pieces”. But, it may seem impossible because it is hard to imagine how you can test one “piece” if the other “pieces” that it uses have not yet been developed (and vice versa).

A software application is made up of a number of ‘Units’, where output of one ‘Unit’ goes as an ‘Input’ of another Unit. e.g. A ‘Sales Order Printing’ program takes a ‘Sales Order’ as an input, which is actually an output of ‘Sales Order Creation’ program.

Due to such interfaces, independent testing of a Unit becomes impossible. But that is what we want to do; we want to test a Unit in isolation! So here we use ‘Stub’ and ‘Driver.

A ‘Driver’ is a piece of software that drives (invokes) the Unit being tested. A driver creates necessary ‘Inputs’ required for the Unit and then invokes the Unit.

Driver passes test cases to another piece of code. Test Harness or a test driver is supporting code and data used to provide an environment for testing part of a system in isolation. It can be called as as a software module which is used to invoke a module under test and provide test inputs, control and, monitor execution, and report test results or most simplistically a line of code that calls a method and passes that method a value.

For example, if you wanted to move a fighter on the game, the driver code would bemoveFighter(Fighter, LocationX, LocationY);

This driver code would likely be called from the main method. A white-box test case would execute this driver line of code and check “fighter.getPosition()” to make sure the player is now on the expected cell on the board.

A Unit may reference another Unit in its logic. A ‘Stub’ takes place of such subordinate unit during the Unit Testing.

A ‘Stub’ is a piece of software that works similar to a unit which is referenced by the Unit being tested, but it is much simpler that the actual unit. A Stub works as a ‘Stand-in’ for the subordinate unit and provides the minimum required behavior for that unit. A Stub is a dummy procedure, module or unit that stands in for an unfinished portion of a system.

Four basic types of Stubs for Top-Down Testing are:

- Display a trace message
- Display parameter value(s)
- Return a value from a table
- Return table value selected by parameter

A stub is a computer program which is used as a substitute for the body of a software module that is or will be defined elsewhere or a dummy component or object used to simulate the behavior of a real component until that component has been developed.

For example, if the movefighter method has not been written yet, a stub such as the one below might be used temporarily – which moves any player to position 1.

public void moveFighter(Fighter player, int LocationX, int LocationY)

{fighter.setPosition(1);}

Ultimately, the dummy method would be completed with the proper program logic. However, developing the stub allows the programmer to call a method in the code being developed, even if the method does not yet have the desired behavior.

Programmer needs to create such ‘Drivers’ and ‘Stubs’ for carrying out Unit Testing.

Both the Driver and the Stub are kept at a minimum level of complexity, so that they do not induce any errors while testing the Unit in question.

Stubs and drivers are often viewed as throwaway code. However, they do not have to be thrown away: Stubs can be “filled in” to form the actual method. Drivers can become automated test cases.

Example – For Unit Testing of ‘Sales Order Printing’ program, a ‘Driver’ program will have the code which will create Sales Order records using hardcoded data and then call ‘Sales Order Printing’ program. Suppose this printing program uses another unit which calculates Sales discounts by some complex calculations. Then call to this unit will be replaced by a ‘Stub’, which will simply return fix discount data.

Maturity Level – 3 : Process Standardization

Posted on the December 27th, 2009 under Quality by Arun Vijayaraghavan

Maturity Level: 3 (Defined)

Focus: Process Standardization

Process Area:

1. Requirements Development
2. Technical Solution
3. Product Integration
4. Verification
5. Validation
6. Organizational Process Focus
7. Organizational Process Definition +IPPD
8. Organizational Training
9. Integrated Project Management +IPPD
10. Risk Management
11. Decision Analysis and Resolution

2. Technical Solution

Purpose: The purpose of Technical Solution (TS) is to design, develop, and implement solutions to requirements. Solutions, designs, and implementations encompass products, product components, and product-related lifecycle processes either singly or in combination as appropriate.

The process area focuses on the following:

Evaluating and selecting solutions (sometimes referred to as “design approaches,” “design concepts,” or “preliminary designs”) that potentially satisfy an appropriate set of allocated requirements

Developing detailed designs for the selected solutions (detailed in the context of containing all the information needed to manufacture, code, or otherwise implement the design as a product or product component)

Implementing the designs as a product or product component
This Process area has 3 Specific Goals and 8 Specific Practices:

SG 1 Select Product Component Solutions

SP 1.1 Develop Alternative Solutions and Selection Criteria

 (Evidence: Alternative solution details, HLD Doc., Defined selection criteria/guidelines/checklist)

SP 1.2 Select Product Component Solutions

(Evidence: HLD Doc., DAR form, where decision is documented with rationale)

SG 2 Develop the Design

SP 2.1 Design the Product or Product Component

(Evidence: HLD. LLD. Traceability matrix)

SP 2.2 Establish a Technical Data Package

(Evidence: Requirement analysis sheet, Traceability Matrix, Test Cases, HLD Doc.)

SP 2.3 Design Interfaces Using Criteria

(Evidence: Traceability Matrix, LLD)

SP 2.4 Perform Make, Buy, or Reuse Analyses

(Evidence: Cost-Benefit Analysis record, Make-or-Buy Decision Analysis (DAR Form))

SG 3 Implement the Product Design

SP 3.1 Implement the Design

(Evidence: HLD, LLD, Peer review & Unit testing records of the product components)

SP 3.2 Develop Product Support Documentation

(Evidence: User’s manual, Maintenance manual etc.)

Asset Management Company – AMC

Posted on the December 2nd, 2009 under Banking by Arun Vijayaraghavan

A company that invests its clients’ pooled fund into securities that match its declared financial objectives. Asset management companies provide investors with more diversification and investing options than they would have by themselves.

Mutual funds, hedge funds and pension plans are all run by asset management companies.  These companies earn income by charging service fees to their clients. 

AMCs offer their clients more diversification because they have a larger pool of resources than the individual investor. Pooling assets together and paying out proportional returns allows investors to avoid minimum investment requirements often required when purchasing securities on their own, as well as the ability to invest in a larger set of securities with a smaller investment.

Forex Account

Posted on the December 1st, 2009 under Forex by Arun Vijayaraghavan

The type of account a forex trader opens with a retail forex broker. Forex accounts come in many forms, but the first that is opened is often the forex demo account.

After the trader has tried out demo accounts with a few different dealers, a funded account would be the next step. Mini accounts, full accounts and managed accounts are the most common types of funded accounts. Mini accounts are similar to full accounts except that currency is traded in lots of 10,000 rather than 100,000. This allows for lower mandatory initial deposits and greater customization of risk management.

Is is important for currency traders to consider what they want to get out of their accounts before deciding on the type to open. Demo accounts and mini accounts are great for the retail forex trader to learn a profitable system and get used to the broker’s execution methods. For currency speculators who doesn’t want to trade themselves, a managed account may be a better option.