Subscribe by Email

Friday, September 30, 2011

What are different stages involved in web application testing?

Web application is a dynamic extension of an application server. Testing of a web application is done by a web application tester. Testing a web application involves different stages as follows:

Functionality testing:
In functionality testing, tests are made to check the links in web pages, database connection, forms used in web pages to submit or retrieve information from users.

Testing the links involves the following:
- Checking the outgoing links in all the pages from the specific domain under test.
- Internal links testing.
- Checking the links that jump on the same pages.
- The Links through which the email will be sent to the admin or to other users from different web pages must be checked.
- All the above mentioned links must be checked for broken links.

Testing the forms in all the web pages:
- Each field in a form must be checked for validity.
- Default values of each field must be checked.
- Options for creating, modifying, viewing or deleting a form must be verified during testing.

Testing of cookies:
The application must be tested by enabling or disabling cookies in browser options. The cookies must be tested for encryption before writing to user system. The session cookies must be tested for login sessions and user status after session ends.

Testing of database:
Data integrity must be monitored every time when data is created, modified, viewed or deleted within a database. Every database related functionality must be tested.

Usability testing:
Usability determines the ease with which a user can handle the application. The webpage designed must be user friendly with appropriate main menu in each page. It is very important to ensure that the application is readable and understandable by a user. It is recommended to use commonly accepted standards for font, frames and colors. Anchor text links must be analyzed.

Interface testing:
Web server, application server and database server are the main interfaces. Ensure whether each interaction between each of the interfaces is executed without any errors. Errors when occurred must be handled appropriately.

Compatibility testing:
Compatibility of a web application is a very important testing aspect. A web application must be compatible mainly with Browser and Operating System.

Browser compatibility:
A web application must be tested with different browsers to ensure its compatibility. Various browsers have different settings and configurations with which the application must be compatible. Web coding must be compatible with cross browser platform. If java scripts or AJAX calls are used for UI functionality and performing security checks or validations, browser compatibility must be given importance.

OS compatibility:
New technologies such as graphic designs, interface calls used in web development must be compatible with various browsers, which are popularly used.

Performance testing:
Performance of an application is measured by its ability to sustain load and stress. Load testing and stress testing are two main types of performance testing.

Load testing:
When large number of users requests the same page, the application must have the ability to sustain the load and perform appropriately. Performance of an application must be tested on different internet connections with varying speed.

Stress testing:
In stress testing the application is put beyond its limit of sustainability, to check the reaction of the application to stress or to check how the system recovers from crash.

Security testing:
Security testing must ensure that only authorized users can use the application and none of the internal pages must be opened for non registered users. CAPTCHA can be utilized to improve security in application.

Thursday, September 29, 2011

Estimation technique for an Agile Development

In previous posts, we have discussed various methods of estimation such as lines of code and function point. These are typically used for most software projects. But when you consider a project of very short software duration(consider a project which last just a few weeks) and also where there can be changes in requirements during the timeline of the project, it is difficult to use the lines of code or function point method. In such cases, one of the possible estimation technique is called estimation for agile development.

In a typical agile project, requirements are captured as stories or user scenarios; a different estimation method can be used for such projects. Some of the steps that are to be followed in such an agile project are:

- The estimation of each of the user stories is done on a standalone basis. Suppose the overall project has ten different user stories, we would need to do, at the minimum ten separate rounds of estimation.

- Each user story is further sub-divided into functions and tasks. Typically, each task is a separate discrete engineering unit, the start and end of which can be tracked separately from other tasks.

- Each task is a lowest unit at which estimation is done; at the end of the activity all the tasks have estimates. The engineering team is thus expected to provide estimates for each individual tasks.

- All these estimates for a user story are sum to create the total estimate for each user story.

- At a higher level, the estimates of all the user stories are summed to create the overall estimate.

Wednesday, September 28, 2011

Automated Estimation Techniques and Tools - Functions and types of tools

Automated estimation techniques and tools allows the planner to estimate the cost and effort and to perform what-if analysis for important project variables such as delivery date or staffing. If applying different estimation tools on the same project data, variation in estimated results are encountered. Sometimes, the predicted values are different from the actual values. The output of estimation tools should be used as one data point from which estimates are derived.

The six functions performed by the automated estimation tools are:

- Sizing of project deliverable.
- Selecting project activities.
- Predicting staffing levels.
- Predicting software effort.
- Predicting software cost.
- Predicting software schedules.

These automated tools require an estimate of project size for example LOC and FP. They require qualitative project characteristics such as complexity, reliability, or business criticality. They also require description of the development staff and/or development environment.

- Tools like BYL (Before You Leap) and WICOMO (Wang Institute Cost Model) require the user to provide lines of code estimates and these estimates are categorized by programming language and type. These tools produces estimated elapsed project duration (in months), effort in staff-months, average staffing per month, average productivity in LOC/pm, and cost per month.
- SLIM is an automated costing system based on the Rayleigh-Putnam Model.
- ESTIMACS uses function point estimation method. It helps the planner to estimate system development effort, cost and staff, the risk and the hardware configuration.
- SPQR/20 developed by Software Productivity Research Inc. It has the user complete a simple set of multiple choice questions.

Tuesday, September 27, 2011

Estimation techniques - estimation using use cases

We have read about estimation techniques like problem and process based estimation techniques. There is another estimation approach that uses use cases which provide insight into software scope and requirements. However, it is somewhat difficult to develop an estimation technique using use cases.

- There is no standard format or style in which use cases can be described because there are many different formats and styles that a use case can use.
- The complexity of the functions are not addressed by the use cases.
- Complex behavior like interactions among many functions and features are not described by the use cases.
- Use cases are used to represent the user's view of the software.

Use case estimation technique for one person can require a lot of effort while use case estimation technique for some other person can be done in a day or two. According to Smith, use cases can be used for estimation but it is only possible and considered within the context of structural hierarchy that the use case describe.

- structural hierarchy can have not more than 10 use cases.
- each use case can have not more than 30 different scenarios.
- before using use case estimation, level within structural hierarchy is established, average length of each use case is computed, type of software is defined, rough architecture is considered.
- empirical data is used to establish lines of code or function point for each level.

Monday, September 26, 2011

Estimation techniques - Process based Estimation

Another technique that is used is estimating a project on the basis of estimating the base on the process that will be used. A process is decomposed into small tasks and effort that is required to fulfill each task is estimated. As apart of this process one is required to take the project scope and derive software functions from the scope. Now typically, for each function, there are a series of framework activities that must be performed. A 2*2 table would typically be constructed which maps these functions and the related framework activities.

Once you get the problem functions and the process activities, the table is filled by estimating the effort for each software activity for each software function. Once you are done with all the estimation, you have a complete table that forms an input for an estimation of the total cost. As a part of this step, you need to have values for the costing for the various activities. As an example, initial architectural and design activities are done by more senior and experienced people, with the costing for these resources being significantly more than the costing for future coding and testing.

Based on the above, we can generate a total cost. We can also generate the total cost through the lines of code and function point methods. Now, we have three methods of costing and can compare one against the other. If these are close to each other, then the estimates are reliable. If this is not so, then more investigation is required. This would require that the steps that have been taken to research and estimate through the lines of code, function point, or process based estimation would need to be re-examined in much more detail until possible errors are detected and estimates re-calculated.

Friday, September 23, 2011

Estimation techniques - Problem based Estimation

In software estimation, lines of code and function point metrics can be used in two ways:
- it can be used as an estimation variable that could size each element of the software.
- it can be used as baseline metrics that are collected from past projects and are used with the estimation variables to develop cost and effort.

Lines of code and function point are different techniques but there are some characteristics that are common. Project planning begins with scope of the software and software is decomposed into problem functions and are estimated individually and then lines of code and function point are estimated for each function.

Baseline metrics are applied to estimation variable and cost and effort is derived. It should be kept in mind when collecting productivity metrics for projects, one should be sure to establish a taxonomy of project types. This will enable to compute domain specific averages making estimation more accurate.

LOC and FP techniques differ in how decomposition is used. Consider a case when LOC is used, it is essential to use decomposition and that too to a fairly detailed level. In order to get a higher level of accuracy, it is necessary to have a high degree of partitioning.

Now considering the case of FP, the usage of decomposition is different. It is required to get the five information domain characteristics, and the complexity adjacent values. Once these are available, and using past data, an estimate can be generated.

Alongside, a project planner estimates a range of values using historical data; these are the optimistic, most likely, and pessimistic sizes for each function. Based on these, an expected value for the estimation variable can be calculated.

Thursday, September 22, 2011

Project Estimation - Decomposition techniques - Estimating the software size

In the estimation of software cost and effort, many variables that include human, technical, environmental, political can affect final cost and effort applied to software. It is a complex process. Decomposing the problem and re-characterization it into a set of smaller problems is an approach for software project estimation.

Decomposition approach has two point of views :
- problem decomposition
- process decomposition

Before estimating, estimating the size of the software is very important. The size of the software to be built can be estimated using lines of code which is a direct measure or through function point which is an indirect measure. Estimating software size is a major challenge. Size is the quantifiable outcome of software project.

Approaches to sizing problems are:
- Fuzzy logic sizing: Identify the application, its magnitude and refining the magnitude within original range.
- Function point sizing: Estimates of information domain characteristics are developed.
- Standard component sizing: The number of occurrences of each standard component
is estimated and project data is used to calculate the delivered size per standard component.
- Change sizing: Suppose an existing software is modified in some way. In this approach, the number and type of modifications are estimated.

These approaches were suggested by Putnam and Myers.

Wednesday, September 21, 2011

Task Set of Project Planning - Estimating resources

The software development effort requires to estimate resources. There are three categories of software resources:
- people
- reusable software components
- development environment.

A resource has four characteristics:
- resource description
- availability
- time when resource will be required
- time duration in which resource can be applied.


- Human Resources
The organizational position and specialty are specified. The location for each human resource is specified. After determining the estimate of development effort, the number of people required for a software project is determined.

- Reusable Software Resources
Re-usability is the creation and reuse of software building blocks which are called components and are cataloged for easy reference and standardized for easy application and validated for easy integration. Four software resource categories that are considered are :

Off the shell components
Full experience components
Partial experience components
New components

- Environmental Resources
Software engineering environment includes hardware and software. Hardware involves tools to produce work products. The software team require access to hardware elements developed by other engineering teams.

Tuesday, September 20, 2011

What is the task set for project planning? What is software scope and feasibility?

Steps that are involved for project planning are:
- Establish a project scope.
- Determine the feasibility.
- Analyze the risks.
- Define the required resources like human resources required, reusable software resources and environmental resources.
- Estimate the cost and effort by decomposing the problem, developing two or more estimates using size, function points, process tasks or use cases and reconciling the estimates.
- Developing a project schedule which includes establishing a meaningful task set, defining a task network, using scheduling tools to develop a timeline chart and defining a schedule for tracking mechanisms.

Software scope are functions and features that are delivered to end users, input and output data, content that is presented to users and the performance, constraints, interfaces and reliability that bound the system. Using either of the two techniques are used to define scope:
- set of use cases developed by end users.
- narrative description of software scope developed after communication with stakeholders.

Project feasibility is important but a consideration of business need is even more important. It does no good to build a high tech system or product that no one wants.

Monday, September 19, 2011

A general overview of software estimation techniques...

Few things should be kept in mind while the software project planner begins the project:
- how long will it take?
- how much effort is required?
- how many people are involved?
- what resources are required?
- what kind of risk is involved?
The statement of scope helps the planner develop estimates using one or more techniques that fall into two broad categories:
- decomposition
- empirical modeling.

Decomposition techniques require a delineation of major software functions followed by estimates of either:
- the number of lines of code.
- selected values within the information domain.
- number of use cases.
- number of person months required to implement each function.
- number of person months required for each software engineering activity.

Empirical techniques use empirically derived expressions for effort and time to predict these project quantities. Automated tools can be used to implement a specific empirical model.

By comparing and reconciling estimates derived using different techniques, the planner is more likely to derive an accurate estimate. Software project can never be an exact science but it is a combination of good historical data and systematic techniques that helps in improving estimation accuracy.

Saturday, September 17, 2011

Some problems inherent in creating a software test plan - Part 1

Creating an effective software test plan & test cases is critical for the success of a software project. Sometimes, when teams are in a big hurry in terms of the time available for the project, there is a tendency to see whether some of this time can be compromised in terms of creating the test plans and test cases. Such compromises sometimes pay off (I will not say that teams get into trouble every time), but taking such short cuts means that you are indeed compromising on the quality of the end project, and dramatically increasing the risks that the project will run into serious problems.
So what are some of the problems that happen in creating a test plan:
- The test plan and test cases are not created by the people who have analysed the design. Typically, test plans and test cases should be created well in advance of the actual testing process; the test engineers should study the requirements and design, ensure that all their doubts are answered, and then start work on the testing documents. They should have access to the people who have created the requirements and the design documents, and be able to have a discussion where required. One big problem that occurs is when the test documents are prepared long after the requirements have been created (with the test engineers not being involved in the process). When such a situation happens, any doubts that the test engineers have in terms of the requirements or the design process are left unanswered and carry over to the actual test documents. If the discrepancy is minor, then such problems can go through to the actual product without much of an impact, but where this is a questions of requirements (consider cases such as weapons engineering, aerospace, financial, etc), such errors can be very significant, and yet not easily caught. End user testing does not really cover all the requirements of the users (especially in the case of complex requirements) and such errors can go all the way through to the actual finished product.

More details in part 2 ..

Thursday, September 15, 2011

Some details about Pointers and Structures in C...

A pointer can be defined as a variable pointing to another variable or a variable storing the location or address of another variable.Pointers can be used to point to any data type.There are object pointers, function pointers, structure pointers and so on. Like any other pointers, structure pointers are also a very useful tool in C programming.Pointer structures are easy to declare and declared similarly like any other kind of pointer by putting a “*” sign before the name of the structure. See the example below:

Struct address *a1, *a2;
a1 = &b2;
a2 = &b3;

where b2 and b3 are the actual structure address variables. Using the below given assignment statement you can copy the details of structure pointed by a2 to a1:

*a1 = *a2;

Any member of a structure can be accessed using a pointer in the following way:

Here A is a pointer pointing to a structure and b is a data member or a member function of the structure being pointed. And there’s another way to access a member of a structure which has been given below:


Both the statements are equivalent. Use of structure pointers is very common and useful.Be careful while dealing with structure pointers like any other normal pointer.The precedence of operators matters a lot. Be careful with the precedence of operators while programming in C.If we enclose *A is parentheses, an error will be generated and the code will not be compiled since the “.” Operator has got a high precedence than the”*” operator.Using so many parentheses can be quite a tedious job so, C allows us to use a shorthand notation to reduce the bombastic jargon. ” (*A).” can also be written as given below:

A ->

This is equivalent to (*A). but takes less characters. We can create pointers to structure arrays. A lot of space can be saved if we declare an array of pointers instead of an array to structures. In this only one structure is created and subsequently values are entered and disposed. Even structures can contain pointers as shown below:

Typedef struct
Char a[10];
Char *b;
} c;
c d;
char e[10];
d.b = (char *) malloc (sizeof (char[strlen(e)+ 1]));
strcpy(d.b, e);

This method is implemented when only a few records are required to be stored. When the size of the structure is large, it becomes difficult to pass and return the structures to the functions. To overcome this problem we can pass structure pointers to the functions. These structures can be accessed indirectly via pointers. Given below is a small code to illustrate the passing of structure pointers to the function and accessing them:

struct product
Int pno;
Float price;
Void inputpno (struct product *pnoptr);
Void outputpno (struct product *pnoptr);
Void main()
Struct product item;
Printf(“product details\n\n”);
Inputpno (&item);
Outputpno (&item);
Void outputpno (struct product *pnoptr)
Printf( “product no. = %d, price = %5.2f \n”, ( *pnoptr). Pno, (*pnoptr).price);
Void inputpno (struct product *pnoptr)
Int x;
Float y;
Struct product pno;
Printf( “product number: “);
Scanf( “%d”, &x);
( *pnoptr).pno = x;
Printf ( “price of the product: “);
Scanf( “%f”, &y);
( *pnoptr). Price = y;

In this program code, the prototypes, function calls and definitions have been changed in order to work with structure pointers. Dereferencing of a structure pointer is very common in programs. “->” (arrow) is an operator that is provided by C for accessing the member function of a structure. The 2 statements given below are equivalent:

Pnoptr -> pno;

Wednesday, September 14, 2011

Some details about pointers and strings in C...

There doesn’t exist anything in C like real strings. A string is an array. It can be defined as an array of characters. A string is terminated by a nul character “\0”. A string can be initialized normally as follows:

Char string[10];
String[0] = ‘c’;
String[1] = ‘a’;
String[2] = ‘t’;
String[3] = ‘s’;

Another way of initializing and declaring a string is as follows:
Char string[10] = “cats”;

The following statement asks compiler to allocate 10 bytes of memory for the string entered by the user. The string can store only 9 characters and the tenth one being used for “nul” character.

We can easily access strings and their constituent characters using character pointers. The string arrays are mostly used for storing char data type elements in the memory. The array of string pointers is preferred over two dimensional arrays of characters mainly for two reasons. The first reason is by implementing array of pointers, you can make more efficient use of available memory since it consumes lesser number of bytes for storing arrays of strings. The second main reason is that an array of string pointers makes the manipulation of strings easier. You can easily exchange the positions of strings in the array using pointers without touching their memory locations. This makes managing strings very convenient. Another way of initializing a string is by using pointers like

for example:
Char string[ ] = “cats”;
Char *a;

Here is a pointer pointing to the string “string”. Pointers are another suitable way to access string arrays and modify them as we want. Since strings are composed of characters, we should use pointers to characters. The types of the variable and the pointers must match otherwise an error will be generated. Be careful that you don’t use “&” (address of) operator to assign the address of a variable to the desired pointer. If you used it, the name of the array will be used as the address of that particular array. For this reason only we do not use “&” (address of) while passing a string to the function scanf(). For example see the following code:

Int a;
Char name[10];
Scanf(“%d%s”, &a, name);

The pointer allows us to access the required character in the string because we made it to point to that string. Functions can be passed to print labels and to call the function. Below is an example:

Void printlbl(char lbl[ ])
Printf (“the label: %s\n”, lbl);
int main()
char lbl2[] = "abc";



Now if we want to pass a pointer to the string array lbl2, we will use the following code:
Char *lblptr = lbl2;

The above declared pointer can be used in the function also like shown below:
Printlbl (lblptr) ;

After execution you will observe that both the statements give the same output. Now you will ask me why so? The answer for this is that when we pass an array as a parameter or an argument to a function, a pointer is automatically created without we knowing it and the arrays are passed by reference method automatically the way a pointer is passed. So the above written code can also be written the other way as follows:

void Printlbl(char *lbl)
printf("the Label: %s\n",lbl);
a code for dynamically allocated string is given below:
string = (char *)malloc(sizeof(char) * (len+1));

Some stings can be allocated dynamically. This is done when we don’t know how much long a string will go until the program is executed or when we don’t what size of string the user will enter.

Tuesday, September 13, 2011

Some details about the types of pointers and arrays in C

Arrays are linear data structures whose data elements form a sequence. The elements of these linear structures are stored in memory as the contiguous memory locations and are represented as the same. These are the simplest data structures and are easy to be performed operations like insertion, deletion, searching, and traversal, sorting and merging. An array can store a finite number of data elements homogenous in nature i.e., they should be of same data type. The number of elements of the array represents the length or size of the array. The front and end index of the array are called lower bound and upper bound respectively. In C, the lower bound is always 0 and the upper bounds calculated as (size – 1). There are basically two types of arrays namely one dimensional arrays, two dimensional arrays and multi-dimensional arrays. The one –dimensional arrays are the simplest ones. Every name has a unique name. Each element of the array is represented by an index number or subscript of the element. An array is represented as:
Array name[ lower bound L, upper bound]

One - dimensional elements are implemented in C by allocating a sequence of contiguous memory location. The starting address of the first element of the array is called the “base address” of the array. C allows many searching algorithms namely linear search and binary search.
Two dimensional arrays are the arrays in which each element is itself an array. For example, a two dimensional array “A” can be represented as a table of M*N elements, where M is the number of rows and N is the number of columns. These arrays also like one dimensional array are stored as contiguous memory allocations. They must be linearized before storing.
These two dimensional arrays can be implemented in two ways i.e., row- major and column major. Row major implementation technique stores the arrays as rows whereas column major implementation technique stores arrays as columns i.e., it stores first row of the array as the first column in the memory. Algebraic Operations that can be performed on two- dimensional arrays are addition, subtraction, multiplication, division and transposition.
Pointer is a variable which stores the address of another variable. Pointers are the strongest as well as the weakest feature of the C programming language. Pointers are a mean to access and modify the address of a variable and its value. Pointers provide a way to implement dynamic allocation of memory and to improve the efficiency of program routines. But, they have a downside which is that they can cause your system to crash or hang if used in an incorrect way. There are no real arrays in a C program, but a chain of pointers. The name of the array is itself a pointer pointing to the first element of the array. There are many kinds of arrays. We will discuss them one by one. First is “array pointers”. These pointers store the address of the first element of the array. An array pointer can be declared as follows:
Int *a[10];
The second kind of pointers is “string arrays”. Strings as we know are nothing but just arrays of characters. A character pointer can be declared as:
Char name[ ]=”abc”;
Char *cpr;
The third type of pointer is called “const pointer” and can be defined as the constant pointer or a pointer to a constant. The fourth type of pointers is known as “structure pointers”. These pointers point to the structures. They too are declared by placing “*” in front of a structure name. Fifth type of pointer is called “object pointer” and points to an object the last and sixth type of pointer is the “THIS pointer” and it is used to automatically pass an implicit argument or a pointer to the object invoked in the function call.

Monday, September 12, 2011

How to define effective metrics? What is the use of quality metrics?

The goal of software engineering is to develop a product that is of high quality. Metrics that are derived from these measures indicates the effectiveness of individual. Metric is a standard for measurement. A metric is a measure that captures performance and allows comparisons and supports business strategy.

The use of quality metrics is to spot the performance trends, comparing alternatives and predicting the performance. However, the costs and benefits of a particular quality metric should be considered as collecting data will not necessarily result in higher performance levels.

Effective metrics should define performance in quantifiable entity and a capable system exists to measure the entity. Effective metrics allow for actionable responses if the performance is unacceptable.

Identifying effective metrics is a bit difficult. Ranges can be identified for an acceptable performance of a metric. It can be referred as breakpoints in case metrics are defined for services and targets, tolerances, or specifications for manufacturing.

Breakpoints are levels where there is a chance that the improved performance will change the behavior of the customer. A target is a desired value of a characteristic. A tolerance is an allowable deviation from target value.

Sunday, September 11, 2011

Why C compilers are better than other language Compilers?

A compiler as we all know is a program that translates source code into object code so that the code becomes executable, or we can say A compiler converts high level language code into a low level language code (assembly language).A compiler performs six major operations namely preprocessing, semantic analysis,lexical analysis, code generation, code optimization and parsing.

A compiler has basically 3 main parts. First is the front end that checks the semantics and syntax of the program and the errors are reported.Second, the middle end which does the optimization removing any unwanted or bad code.The last part is called the back end which translates the middle level intermediate representation or IR into the assembly language.

Processor registers are assigned. The back end also draws the schedule for the hardware units. Today we see a number of compilers available in the market like clang, Microsoft C, GCC, etc. C is still the favorite language of many programmers in the world. What makes it so special? It is its compiler. C compiler is better than any other language because it is small in size, so that you can execute a program everywhere. The C compiler is usually faster than any other language compiler. Furthermore there is no overhead byte code generated.

- You can use the dynamic C library directly.
- Most of the C compilers include memory and bound checker.
- Many C compilers are capable of running under windows XP and windows Vista and are also able to compile the command line.
- Most of them support integrated environment.
- C compilers are capable of handling multi- threaded programming and are good for exploiting dynamic parallelism which otherwise can make it difficult for passing messages.
- C compilers are algorithmic in nature and provide a scheduler to schedule the performance of the programs.
- They compile and link the codes very fast and they have a very powerful optimization technology.
- They come with a library source which is complete and brows able.
- They do extensive checking during the process of compilation.
- Some C compilers are safe from the risk of pointers and are capable of fast prototyping of the programs.
- They also don’t allow violation of array bonding.
- They can be run as interactive or non- interactive phases.
- They support enumerated data types, all data type variables like int, long, and float etc. some may also provide you with some sample programs to help you understand the features of the language.
- They are perfect for parallel computing. Global vectorization and optimization is also supported.
- These C compilers do inter procedural analysis. While doing optimization they give the user necessary feedback. They are able of transferring loops.
- C compilers are capable of code generation and give optimal performance from the processors.
- They simplify the execution thus, accelerating it. No limitations are imposed code size and optimization. They are very fast and accurate as compared to the compilers of other languages.
- Latest compilers are capable of building internet, distributed and windows applications. The code generation includes compiling, assembling, linking, resource compiling and adding library files.
- The integrated development includes editing, debugging, generating files and resource editing.
- They come with documentation and user’s manual.
- Most of the C compilers don’t come as freeware.
- C compilers require Windows 95 and other latest versions for implementing command lines.
- If a C compiler is supporting IDE, you need to have windows 2000 and following versions. The system should have a minimum of 32 MB of RAM and 500 MB of ROM.

We can say they are like many in one package which allow writing, developing, compiling, interpreting, assembling and debugging, and execution of the programs.

Saturday, September 10, 2011

What are the steps to prepare a test plan?

To prepare a test plan, you should have a well thought-out approach. It is not such a difficult task but in immersed with one’s deep thoughts and experience. You should be well aware of the reason of testing before you continue with the testing plan. Test plan give a general idea of testing strategy, assets and list of the projected testing actions. Test plan is generally written in combination with testing policy. The strategy of the test plan also envisages and highlights various levels of the test, which would be carried out while performing the test.

In the simple words it can be said that a test plan provides you information about what you are going to test and which testing procedure is involved in it. Here, the steps for preparing a test plan are being elaborated in six stages, which might be quite helpful for doing the test.

- First stage: For each stage of the test, proper responsibilities should be assigned to the people that who will prepare the design of the test, who will gather the information of each stage, who will carry out the test, and who will verify that the test plan is being executed in a decent way. When these points would be discussed then only the problems will arise, and those should be identified and tackled out at the initial stage.

- Second stage: You should be very well aware of your budget limitations, which involves lump sum idea of the expenditures that would arise on performing the test, which also includes the procurement of the testing equipments.

- Third stage: The requirement of testing equipments should be observed. Every testing equipment, which is required for testing purpose, should be recognized. Many people neglect this part of the whole process, which is also the most important part. If one testing model is required or two or more testing models are required, then it should be planned very at the initial stage. It is to be decided that whether you are going to test on one testing model or on one pre-production portion of hardware? Also in how many shifts the testing would take place? Also how many persons would get involved in the testing process? It the testing equipments should be identified at the early stage then those equipment can be easily procured or can be taken on rent, which would be also be beneficial not only on the financial front but also it prevents the wastage of one’s precious time, as it would allow stress to occupy one’s mind. Moreover, it also involves the availability of the hardware or software material, required for the test.

- Fourth stage: The number of risks and defects that are involved in the testing procedure should be identified at the early stage, which will help in preventing the financial, as well as the any kind of physical loss to the person conducting the test.

- Fifth stage: The testing resource and the testing environment for executing the test should also be considered at the early stage.

- Sixth stage: After executing the test, the test leader must consider and verify, where exactly the test stands in terms of testing actions. He should also checkout that how many tests have become successful and how many tests have failed or proved useless.It helps in improving the mistakes that are committed in the present, so that the same should not be repeated in the future, to avoid any kind of damage to the person performing the test and also in preventing the wastage of the testing material.

Friday, September 9, 2011

Understanding the Structure of a C Program

The best way to get started with any programming language is to study a program, so in order to make you understand C program structure, we will take into consideration an example program whose code is:

1. /* this is a simple c program
2. Written to explain basic program structure */ -------------------------multiple line comment
3. #include //header file. ---------------------- single line comment
4. int main()
5. {
6. return 0;
7. }

This is the simplest C program and this program unfortunately doesn’t do anything. “#include” is called a preprocessor command. It tells the compiler to do processing before the compilation. This command tells the compiler to include the header file “stdio.h” in the program.

Functions are the basic building blocks of any program. The function “main()” is the most important function in any C program. You can say that this is the point of execution of a program. This function should exist as an entry point. Following the main is a pair of parentheses. These two parentheses indicate that the main is a function. Now coming to the opening and closing pair of braces in lines 5 and 7, are used to define the limits of a function or the program. Usually these braces contain executable statements of a function. The main() is preceded by word int. it means that this function returns an integer value. This value is returned using the “return” statement.

Now let’s take a program “abc.C” that does something. It’s same as the previous except that it has an executable statement between the braces in addition to the obligatory return statement. The executable statement calls a function which is already included in the header files as a part of the C library. The function is namely “printf()” and in order to make it print text the desired text is written with quotation marks within the parentheses of the function. The text will be displayed on the monitor when program is run. Notice the semicolon at the end of the executable statements. A semi colon in C is used as a statement terminator.

Consider the following statement:
printf("Hello World!\n");

Notice the “\n” character. The back slash is used to indicate to the compiler that a special character is being inserted. Here “n” indicates a new line. This is used whenever you want to print something in a new line. The function “printf()” prints the text and returns the carriage. Consider the following statements:

int index;

the key word int stands for integer and is used to declare a variable of type integer called index. Always keep in mind that the number of field descriptors and the number of variable definitions must be the same or else the runtime system will generate something we are not expecting. Another common and important part of C program structure is “comments”.Comments are optional but it’s good to include because they make the program more readable although they don’t mean anything to the compiler. Comments are of two types: single line comments and multiple line comments. Single line comments are used to give only one line description of a function or any other statement. A multiple line comment spans through several lines and is used to give a detailed description of a program or function.Look at the above program code for an example of comments. Another important part of a program are statements and expressions which combine variables and constants and can be assignments, function calls etc.Coming to the line breaks they are necessary to for good style formatting of your programs. This makes it easy for you to understand how your program flows when you want to maintain or modify it.You can also use “blank lines” after pre compiler declarations and declaration of new variables.Indentation should also be used in order to make your program more readable and to define the body of functions.

Thursday, September 8, 2011

How is program controlled in C?

Every program follows a control path. C program control constructs are conditionals and loops. Almost every program needs to go through some sort of decision making. Decision making processes are simulated in C using conditionals. We can state a conditional as a statement that instructs the compiler to execute a function or statement if a certain condition is proved true. Decision making is done on the basis of some logic. Logic is treated as arithmetic by C compiler. The value 0 stands for true and rest any other value stands for a false value. The most common conditionals are if-else statements, switch case statements and loops.

If-else statements are used for conditional branching. It starts with if followed by an expression in its parentheses. The enclosed expression is evaluated and if the condition proves out to be true the succeeding statement is executed. If the condition is false the succeeding statement is skipped. Break and continue statements are used in if else and switch case constructs. Break will cause the execution to jump out of the loop and execute the following immediate statements whereas continue statement causes the loop to execute again and again until the condition is proved false.

Switch case begins with keyword switch followed by a variable to be switched enclosed in a parentheses. The word case is used to begin each case followed by a variable for that case, then a colon and then by the statements to be executed. Statements will be executed until a break is found. Any of the above constructs can be nested. Now coming to the go to statement, with this goto statement you can jump in between anywhere in a program except you are not allowed to jump in a loop. Goto statements are mostly risky but if there’s a place in the program where a goto statement fits , feel free to use it. However you should not be used.

Let’s define the loops now. C has 3 types of loops namely the while loop, for loop and the do while loop. The “while loop” continues to execute till the condition proves to be false. It’s an entry controlled loop which means that the loop will execute only when the condition is met. In this loop the keyword while is followed by some expression in parentheses, followed by a compound statement enclosed in braces. After reaching at the end of the loop, the control goes back to the top and the condition is revaluated.

Do while loop is an exit controlled loop. The test condition is evaluated at the end only. So even if the condition is false the loop is executed once compared to the while loop which doesn’t allows execution even once if the condition is false. You can call the do while loop as a pos check loop. This is the main difference between the while loop and the do while loop. These loops can also be nested. Nesting is unlimited. The “for loop” is the easiest loop. All its loop controlled elements are gathered at one place while in other loops they are scattered everywhere in the program. In a for loop firstly the initialization expression is executed. Then, the test expression is evaluated. If it’s true, the body of the loop is executed. After the execution the update expression is implemented, the test expression is again evaluated. If it’s true the whole sequence is repeated. You should use a for loop hen you have to repeat a block of statements specific number of times. These are the tools that programs need to perform repetitive tasks and make decisions.

Wednesday, September 7, 2011

How are strings and arrays defined in C?

A string can be defined as a group of characters, usually letters of the alphabet. When C is either to compare a string with another string, output it, copy it to another string, or whatever, the functions are intended to do what they are called to do until a null, which is a zero, is detected. Such strings are often called an ASCII-Z string. C treats a string as an array termination with a NULL character. C does not have a separate data type for strings and so strings exist as the arrays of characters. An extra byte must be left to store the NULL “\0”. Strings are declared as the arrays of characters. For example:

char name[25];

Strings can be fully or partially initialized depending on the requirements of the user. For example:
char fill[10] = { ‘a’, ‘ ‘, ‘r’,’o’,’p’,’l’,’a’,’n’,’e’,’\0’ };

There exist certain predefined functions for modifying strings. The library cstring.h houses all these functions. Strcpy() is used to copy one string into another string. Strlen() is used to determine the length of the string. Strcmp() is function for comparing two strings i.e., which one is bigger in terms of length. Strcat() is used to concatenate two strings. The second string is appended to the end of the first string. Strrev() is used to reverse a string alphabetically.

An array is a C derived data type and can be defined as a collection of variables of the same data type that are referenced by a common name. All arrays consist of contiguous memory locations where the lowest address corresponds to the first element and highest address corresponds to the last element. Arrays are useful when quite many elements of the same data type are needed to be stored and processed. The numbers in [ ] are called indices or subscripts. A string itself is an array of characters. Arrays are of two types namely one- dimensional arrays and multi dimensional arrays. Multi dimensional array comprises of elements which themselves are arrays. The general form of an array declaration is as follows:

Type array-name [size];

Here type states the data type of the array elements. The array name declares the name of the array, and finally the size defines how many elements will be there in the array. The data type of the array is called the base type.

A multidimensional array consists of M*N elements where M is the number of rows and N is the number of columns. It can be declared as follows:

Type array-name [rows][columns];

Where single dimensional arras can be read using a single loop, it takes nested loops to read and access the elements of a multi dimensional array. One loop is used to process the rows and the other one is used to process the columns. The arrays can be initialized during the run time as follows:

Type array-name [size 1]……….[size N]= {value list};

The value list consists of the array elements. C allows you to skip the size of arrays in an initialization statement. These types of arrays are called unsized arrays. For example:
Int abc[ ] = {1,2,3,5,7};

The best way to assign values to an array is using a "for" or "while" loop because it’s not affordable to write a separate initialization for every element. Arrays can be passed s parameters to the functions to maintain a structured design. Always keep in mind that in C subscripts start from 0. A string from an array of strings can be accessed by using pointers. But keep in mind that pointers hold only address of the strings. From there it is able to obtain the whole chunk of the contiguous memory.

Tuesday, September 6, 2011

What are functions,variables and prototyping in C?

Variables or identifiers are the fundamental basic building blocks of a program. They are general terminology for objects, classes, functions, arrays etc. It can be defined as an arbitrarily long sequence of letters and digits and the first character must always be a letter. Upper and lower case letters are treated differently and all the characters are significant. C is implementation dependent. C is case sensitive as it treats lower and upper case letters differently. These are basically named storage, whose values can be manipulated during the execution of the program. There are 2 values associated with every variable namely r value and l value. The value of the variable is called r value whereas l value is the address in memory where the variable is located. Generally a variable is declared as :

type name;

A simple definition consists of a type specifier followed by a variable name. There are 2 types of variables: local variables and global variables. Local variables are declared inside a function and are available to that function only whereas global variable are declared outside main() and are available to all the functions.

A large program is difficult to manage and understand. Thus, it is broken down into different modules called functions which can be put together to form the complete program. So we can define a function as a sub program that acts on data and often returns a value. A good function contains a number of functions since it is easier to maintain update and debug. Each function has its own name. On the encounter of the function’s name in any part of the program the function is called. There are basically 2 types of functions namely built-in functions and user-defined functions. Built in functions are parts of the compiler package and are made available to the program by header files. For example: exit(), sqrt(), strlen(), size() etc. user defined functions are created by the programmer as per the requirements of the program. A function has 3 parts: function definition, function call and function prototype. In C a function must be defined before it is used anywhere. Generally a function is defined as:

type function-name(parameter list)
Body of the function

Here the type specifies the type of return value. The parameter list is the list of arguments passed to the function separated by commas. A function may be defined without any arguments or it can also have an open parameter. A function definition must have a return statement.

One of the most important features of C is function prototyping as it describes the function interface to the compiler. It can be defined as the declaration of the function that tells the program about the type of the value returned by the function and the number and type of arguments. Therefore, we can say that a prototype has following parts:
- Return type
- Name of the function
- Argument list

Function prototyping is essential as it allows a compiler to compare each use of the function with the prototype to determine whether the function has been invoked properly or not. This makes it easy for compiler to correct the errors. The function prototype and function definition must exactly agree on the function name, return type, and argument list. The prototype looks just like a function definition except that the code is missing. A prototype introduces a function to the program whereas a definition being a declaration also tells the program what the function is doing and how it is doing. C makes prototyping essential. We can skip the arguments in a prototype but not in the definition.

What is Assignment and Logical Comparison in C...

An expression as we all know is composed of one or more operations. When the expression is terminated by a semi colon, it becomes a statement which is the small executable unit in any program. The assignment statements are used to assign a value to a variable. The assigned value can be a constant variable or an expression. An assignment statement can be written in general form as:


Where A is a variable to whom we are assigning a value and bcd is the assigned value. The “=” sign is called assignment operator. Assignments can be chained together. The assigning operator “=” assigns the value to the left hand operand and returns the value of the assignment. Assignment statements are very much needed for variable initialization since variables are initialized using assignment statements. There are 2 ways to do this:
- Un-initialized variable
- Initialized variable
An un-initialized variable has to be initialized in separate statements whereas an initialized variable combines declaration and assignment in to one statement.

Examples are:
Int a;
a=3; ------------------------uninitialized variable
int a= 3; -------------------- initialized variable

Assignment also follows when you use dynamic initialization. Sometimes variables of different types are mixed with each other. It’s a very common and observed phenomenon. In such cases a type conversion takes place. Here also it follows from the principal of assignment statement that “the value of the right side of the expression or of the assignment is converted to the type of the variable on left side i.e., target variable. Both the sides of assignment should be compatible with each other for type conversion. When conversion takes place from smaller data type to a larger data type no data is lost. Precedence of operators while assigning values with an expression should always be kept in mind.
Some programs need the power of decision making or comparison. This is granted through logical expressions which are nothing but the statements resulting into a 0 (true) or 1 (false) value. These are a combination of constants, variables and logical and relational operators. Be careful that two or more variables and operators should not occur in continuation. A logical expression may contain just one signed or unsigned variable or a constant or it may have two or more also joined by varied relational and logical operators. Following are some valid logical operators: the logical OR operator (||), the logical AND operator (&&) and the logical NOT (!) operator. The OR operator combines 2 expressions as its operands. If either of its operand evaluates to true, the OR operator also evaluates to true. This operator is basically used for testing evaluating expressions. The AND operator combines 2 expressions into one and the operator evaluates to one if and only if both the operands evaluate to 1. The NOT operator works on a single operand since it is a unary operator. It is used to negate or reverse the truth value of the operand. It has a higher precedence than of the relational and logical operators. Therefore, this should be enclosed within parentheses. This operator is useful as a test for zero. OR and AND operators have lower precedence than relational operators. Relational operators are used to define relationships between variables. C provides 6 basic relational operators : < (less than), > (greater than), <= (less than or equal to), >= (greater than or equal to), == (equal to), and != (not equal to). Do not confuse the = and the == operators. “=” is assignment operator whereas “==” is relational equality operator.

Monday, September 5, 2011

What are different web engineering project metrics?

The objective of a good web application is that it delivers a combination of good content and appropriate functionality for the end user. Web engineering project metrics are defined that assess its internal productivity and quality are:

- Number of static web pages measure provides an indication of the overall size of the application and the effort required to develop it. This measure has less complexity and requires less effort to get construct.
- Number of dynamic web pages measure high complexity and more effort to get construct. It provides an indication of the overall size of the application and effort required to develop it.
- Number of internal page links measure gives an indication of degree of architectural coupling within the web application. Effort on navigation and construction increases as the number of page links increase.
- As Number of persistent data objects increases, the complexity and effort to implement it also grows.
- As Number of external systems interfaced increases, the complexity of the system and effort required for the development also increases.
- Number of static content objects includes static text, graphics, video, animation and audio within the application. Multiple content objects appear on single web page.
- Number of dynamic content objects includes objects based on end user action and includes text, graphic, video, animation and audio within the application. Multiple content objects appear on single web page.
- As the Number of executable functions increases, the modeling and construction effort also increases. A metric can be defined reflecting the degree of end user customization required for web application. An executable function provides a computational service to end user.

Web application metrics can be computed and correlated with measures like effort, errors and defects uncovered, models or documentation pages produced.

Sunday, September 4, 2011

What are C Compilers and their properties?

A compiler is a program that translates source code into object code. The compiler got its name from the way it works, checking the entire piece of source code and collecting and reorganizing the procedural instructions. Thus in this way a compiler differs from an interpreter which analyzes and executes each line of source code in succession, without looking at the entire program. Compilers require some time for producing an executable source code. However, programs produced by compilers execute much faster than the same programs executed by an interpreter. Many compilers are available for the same language. More than a dozen companies develop and sell compilers for C language. So here are some C compilers at your finger tips listed along with their properties:
1. AMPC: By Axiomatic Solutions Sdn Bhd. Supports all Operating systems. Proprietary license. not available online. Supports IDE.
2. Amsterdam Compiler Kit: By Andrew Tanenbaum and Cerial Jacobs. Works with UNIX and other OSs except windows. BSD license. Not available online. Does not support IDE.
3. Clang: By low level virtual kit. Supports all OSs. BSD license. Not available online. Does not support IDE.
4. Compiler: By Ninja Otter Inc. supports all OSs. Proprietary license. Available online. supports IDE.
5. DMS software reengineering Tool Kit: By semantic Designs. Supports all operating systems. Proprietary license. Not available online. Does not support IDE.
6. GCC: By GNU project. Supports all Oss. GPL license. Not available online. Doesn’t support IDE.
7. RCC (RCOR C compiler): By Rodrigo Caetano (rcor). Supports only windows and UNIX. GPL license. Not available online. Does not supports IDE.
8. Ideone: unknown author. Doesn’t support any OS. Freeware. available online. Does not support IDE.
9. Lab windows/ CVI: by National Instruments. All OSs. Proprietary license. Not available on web. Supports IDE.
10. Icc: By Chris Fraser and David Hanson. Supports all OSs. Freeware. Not available online. Supports IDE in windows only.
11. Mark Williams C: By Mark Williams Company. Supports all Oss except UNIX. Proprietary license. Not available online. Supports IDE.
12. Microsoft C: by Microsoft. Supports only windows. Proprietary license. Not available online. supports IDE.
13. Nwcc: By Nils Weller. Supports all OSs. BSD license. Not available online. Doesn’t support IDE.
14. Open64: By SGI Google, HP, and Intel, Nvidia, Path Scale, Tsinghua University and team. Supports all OSs. GPL license. Not available online. Doesn’t support IDE.
15. Pelles C: by Pelle Orinius. Supports only windows. Freeware. Unavailable on web. Supports IDE.
16. PGCC: By The Portland Group. Supports all OSs. proprietary license. Not found on web. Supports IDE.
17. Portable C compiler: By Anders Magnusson and team. Supports all OSs. BSD license. Not available online. Does not support IDE.
18. Power C: by Mix Software. Supports all Oss except windows and UNIX. Proprietary license. Doesn’t support IDE. Not available online.
19. QuickC: By Microsoft. Supports only windows. Proprietary license. Supports IDE. Not available online.
20. SAS/ C: Its author is SAS institute. Works with all Oss. Proprietary license. Supports IDE. Not available online.
21. Tiny C compiler: Its author is Fabrice Bellard. Supports only windows and UNIX. LGPL license. Doesn’t support IDE. Not available online.
22. Turbo C: By Embarcadero. Supports all Oss except windows and UNIX. Proprietary license. Supports IDE. Not available online.
23. CCS C compiler: By CCs, Inc. supports all OSs. Proprietary license. Supports IDE. Not available online.
24. Ups debugger: By Tom Hughes, Ian Edwards and team. Supports all Oss except windows. GPL license. Not available online. Supports IDE.
25. VBCC: by Dr. Volker Barthelmann. Supports all OSs. Doesn’t support IDE. Not available online.

Saturday, September 3, 2011

What is a C PREPROCESSOR ? Why is it important?

C preprocessor or cpp is a program that is executed prior to the execution of the compiler. It’s very important as it removes all the comments from the source and performs textual substitution based on the code and passes it to the compiler for actual compiling and it also handles directives for the inclusion of source files. Consider the following statement:
This is the way all macros and defines are declared. Before the start of compilation, the preprocessor resolves all of the defines. Macro is also a kind of define, but it is capable of appearing to perform some logical operations, math’s functions and it has a unique name. While defining a macro, it is imperative that there should be no space between the name of the macro and opening parentheses. If a space is present, it makes it difficult for the compiler to determine whether its macro or not. Instead it’ll handle it like a simple substitution define statement.
Often there are a lot of extra parentheses in a macro definition but they are extremely important. Most experienced C programmers always put parentheses around each and every variable in a macro and entire expression. This avoids error and allows any macro to work properly. A macro cannot be expanded within a quoted string, although, the arguments’ text can be quoted and that will be treated as a string literal. This can be done using “#” directive. There are macros called variadic macros which can take a varying number of arguments. They are useful when writing wrappers to variables of number functions. X macro is a header file which contains a list of similar macro calls. Macros are of two types namely object-like and function-like.
Object like macros do not accept parameters whereas function like macros do. Function like macro should not have a whitespace between the variable and the opening parentheses. Presence of a whitespace will make the compiler treat it as an object like macro. Object like macros are conventionally used to create symbolic names for constants and are generally considered as part of good programming. You can extend a macro across many lines by using a back slash escape sequence at the end of every line. The ternary conditional operator “?:” is also a function like macro. Token pasting or concatenation is another very easy to abuse feature of C preprocessor. Using this we can join together two arguments using ## preprocessor. This is basically used to create more elaborated macros. Multiple statements macros must be avoided as far as possible because they can show unexpected behavior. We can make a macro safe by replacing the semicolon with comma since it has lowest precedence.
Conditional compilation is a very useful construct and is used to include a feature if we are using a certain processor, a certain operating system and certain hardware. The following are the directives that can be used for conditional compilation: #if, #ifdef, #ifndef, #else, #elif and #endif. More trivial programs are too large and cannot be place within a single file and it becomes very cumbersome to work with. Therefore, it becomes very necessary for these files to work and communicate together as one large program.
What do we mean by pragma? It’s a kind of instruction to the compiler to perform a particular action at the time of compilation. The pragmas vary from compiler to compiler since they are not standardized. If the compiler provides a source listing file, then it does have pragmas to format output. #ptragma is used suppress specific error messages, to stack debugging and to manage heaps.

Thursday, September 1, 2011

What is meant by Use-case oriented metrics?

Using the use case method is not dependent on the programming language. Typically, you can use use cases as another method of generating the size of the application; the value of use cases is in most cases to the lines of code (LOC) and also to the number of test cases that will have to be written for comprehensive testing of the application. Like many other estimation techniques, the use case method is used early in the software life cycle, before design, development and testing happens.

A use case is written to capture user interactions and functions that describe a system. Many users try to work out what a standard size for a use case is, but use cases can exist at different levels of abstraction. As a result, though there are many attempts to use the use case method as a instrument of trying to measure the effort required for building the application, the inability to define a size and coverage of the use case, means that not many people have been successfully able to do this.

Estimation through use case method is not a simple one; there are multiple steps required such as determining technical factors, determining environmental factors, determining use case points, determining product factors, and then overall, putting all these factors together to get use case points which translate into man-days or man-weeks.

Facebook activity