Subscribe by Email


Showing posts with label Coverage. Show all posts
Showing posts with label Coverage. Show all posts

Wednesday, December 26, 2012

What is IBM Rational Purify?


Rational Purify is another dynamic tool from IBM which is meant for carrying out the analysis of the software systems and applications and to provide help to the software developers in producing a code that is more reliable. 

The IBM rational purify comes with unique capabilities:
  1. Memory leak detection: This capability is related to the identification of the memory blocks to which there are no valid pointers.
  2. Memory debugging: This capability is related to pin – pointing memory errors which are quite hard to be discovered such as the following:
a)   Points in code where the memory is freed improperly,
b)   Buffer over flow
c)   Access to uninitialized memory and so on.
  1. Performance profiling: This capability is involved with highlighting the bottle necks of the program performance and improving the application understanding via some graphical representations of the calls to the functions.
  2. Code coverage: This capability involves the identification of the code with the line – level precision that is untested.
- Platforms such as the AIX, solaris, windows, Linux and so on support the IBM rational purify. 
- The code that is developed with the help of the IBM rational purify is not only reliable but also faster. 
- This analysis tool is very well supported by the windows application development environment. 
- It has been observed that the windows applications which have been developed using the rational purify have stood to be quite reliable throughout. - There is no need to provide rational purify with a direct access to the source code.
- This makes it capable to be used with the libraries belonging to the third–parties. 
- Languages such as the .NET, visual C++ etc are supported by the rational purify. 
- The IBM rational purify is known to integrate well with the Microsoft visual studio. 
- Almost all the software systems belonging to the windows family are supported by the IBM rational purify. 
- The corruption in the memory is identified and the debugging time is reduced significantly. 
- The reliability pertaining to the execution of the software is also reduced. 
- Also, the software systems and applications now make a better utilization of the memory. 
- The IBM rational purify comes with the binary instrumentation technology in which the code is instrumented at the level of the object or the byte level. 
- Here, re–linking or the re–compilation of the software system or application is not required for the analyzation of the code. 
- Further, the third–part libraries are also analyzed. 
- With the help of the IDE integration feature, the rational purify can integrate very well with the Microsoft visual studio thus cutting down on the need of switching between different tools having different types of user interfaces. 
- It therefore develops a more productive and cohesive development environment and experience. 
- It helps in the testing as well as the analyzation of the code as it is produced by the programmer. 
- A comprehensive support is provided to most of the programming languages. - The ‘selective instrumentation’ feature of the rational purify enables a user to limit the analyzation of the software to a subset consisting of the modules which together comprise the whole application. 
- This helps greatly in the reduction of the run-time and instrumentation overhead.  
- The reporting to the modules concerned also gets limited. 
- The rational purify can be run from the command line also since it comes with a command line interface. 
- Automated testing frame works are among the rest that are supported by the software system or application. 
- In a way the software developers are empowered in delivering the product with the quality that is expected by the users.


Tuesday, July 10, 2012

What Tools are used for code coverage analysis?


Code coverage analysis is quite an essential process that makes up the complete and efficient software testing process. 
This analyzation consists of the following three basic activities:
  1. Checking out for the areas of the software system or application that have not been exercised by the set of tests that have been performed so far.
  2. Creation of the additional test cases so that the code coverage can be increased.
  3. Determination of the quantitative measure for the code coverage which some what provides an indirect measure of the quality of the software system and application.
Apart from this, there is one more optional aspect of the code coverage analysis which is that it helps in the identification of the redundant test cases that add to the measure of the code coverage but do not merely increase it.
In this article we have discussed about the tools that make this whole process of code coverage analyzation quite easy.

Tools Used for Code Coverage Analysis


- The code coverage analyzation is quite an effort and time consuming process and therefore is nowadays automated using tools like code coverage analyzer. 
- But a code coverage analyzer cannot be used always like in situations when the tests have to be run through the release candidate.
- For different languages, there are many different and vivid tools are available for code coverage analysis.

  1. For C++ and C programming languages:
a)  Tcov
b)  Bulls eye coverage
c)  Gcov
d)  LDRA test bed
e)  NuMega True Coverage
f)   Tessy
g)  Trucov
h)  Froglogic’s squish coco
i)   Parasoft C++ soft
j)   Test well CTC++
k)  McCabe IQ
l)   Insure++
m)Cantata

  1. Tools for C#:
a)  Mc Cabe IQ
b)  Jet brains dot cover
c)  Ncover
d)  Visual studio 2010
e)  Parasoft Dottest
f)   Test driven.NET
g)  Kalistick
h)  Dev partner

  1. Tools for Java:
a)  McCabe IQ
b)  Clover
c)  EMMA
d)  Kalistick
e)  JaCoCo
f)   JMockit coverage
g)  Code coverage
h)  LDRA test bed
i)    Jtest
j)   Den partner
k)  Cobertura

  1. Tools for Java Script:
a) Mc Cabe IQ
b) JS coverage
c) Code coverage
d) Script cover
e) Coveraje

  1. Tools for Perl:
a) Mc Cabe IQ
b)  Devel cover

  1. Tools for Haskell:
a) HPC (Haskell program coverage) tool kit

  1. Tools for Python:
a) Mc Cabe IQ
b) Fig leaf
c) Pester
d) Coverage.py

  1. Tools for PHP:
a) Mc Cabe IQ
b) PHP unit

  1. Tools for Ruby:
a) Rcov
b) Mc Cabe IQ
c) Simple cov
d) Cover Me

  1. Tools for Ada:
a) GNAT coverage
b) Mc Cabe IQ
c) Rapi Cover

Out of all the above mentioned tools for C and C++, the bulls eye coverage has proven to be the best code coverage analyzer in terms of reliability, usability and platform support etc. 
This coverage analyzer is different from the other analyzers in the following ways:
  1. Better coverage measurement
  2. Wide platform support
  3. Rigorously tested
  4. Efficient technical support
  5. Quite easy to use.
- Using this tool it can be determined that how much of the software system’s or application’s code was tested and this information later can be employed to focus your testing efforts and areas that require some improvement.
- With the bullseye coverage a more reliable code can be created and time can be saved. 
- The function coverage provided by the bulls eye coverage gives you a very high precision.

You can include or exclude the parts of the code of your choice. And what more? You can even merge the results you obtained from the distributed testing plus the run time code can also be included from custom environments. 


Saturday, June 23, 2012

What are limitations of smoke testing?


Smoke testing though being quite a helpful software testing methodology has got some limitations which will be discussed in this article. 
Smoke testing is an important software testing methodologies when it comes to the development of very large software projects. "The formal definition of the smoke testing states that it a quick and indeed a dirty software testing methodology that is deployed mainly for testing the major features and functionalities of a piece of software system or application". 

About Smoke Testing


- It is essential to perform smoke testing whenever any changes are implemented in the software system. 
- Originally, the smoke testing for software systems was adopted from the hardware industry. 
- Smoke testing is quite time and cost effective since it lays its primary focus on the components that have been changed recently in order to ensure continued compatibility.
- In addition to all this, a smoke test provides an effective means to confirm that the changed code works as desired and does not hampers the functioning of the whole build. 
- Following this approach, the bugs entering the software system can be immediately fixed. 
- Smoke testing has many advantages that outweigh the limitations but still the limitations cannot be ignored.

Limitations of Smoke Testing


  1. Biggest limitation of the smoke testing is that its field of application and usefulness is quite narrow.
  2. Smoke testing can only be used when the time frame is small during the introduction of a new functionality or feature in to the software system or application.
  3. Though being wide, a smoke test is very shallow.
  4. Smoke testing does not take into consideration the fine details of the software system or application.
  5. Smoke tests cannot be substituted for actual functional tests.
  6. Smoke testing is a kind of black box testing and does not consider the internals of the software system or application.
  7. In smoke testing the tester cannot access the source code.
  8. In smoke testing the tester has to interact with the system via an interface by giving a variety of inputs and then examining the obtained outputs.
  9. Another limitation is that the path coverage provided by the smoke tests is very limited since all the given inputs have to be checked.
  10. Smoke tests cannot keep a control on targeting the paths and code segments that might be more error prone than the other segments.
  11. Smoke test are a bit difficult to design since they should be designed in such a way that they touch every part of the application software.
  12. Usually the smoke testing can be applied only when some new components are incorporated in to the existing software system or application.
More about Smoke Tests...
- Smoke tests can be thought of as preliminary tests that facilitate the further testing of the software system or application. 
- Though the smoke tests reveal simple failure, these failures are good enough to be the cause of the rejection of a prospective and deserving software project. 
- At last we conclude that there exists no such absolute best software testing methodology, each being having its own weakness as well as strength. 
- You cannot expect a testing methodology to fit the test requirements of every application software and conditions. 
- This reason only is enough to conclude that no testing methodology is most important. 


Saturday, May 19, 2012

Explain simple loops in detail?


Loops are such an important programming constructs for various object oriented languages that they cannot be neglected. All of us are aware of the looping constructs that we have in programming languages like C and C++. We have three basic loops:
  1. For loop
  2. While loop
  3. Do while loop

Why Loops are Important?


- Loops find extensive use in programming and they are a means to tell the program to keep executing a set of statements until some break condition is encountered.
- Loops come to be a very handy tool when it comes to the repetition of the whole block of code. 
- It can be done to reduce the length of the code and the task of the programmer or developer of writing the same code again and again innumerable times. 
- In some cases it also happens that the number of times for which the loop is to be executed is obtained from the user, in such cases looping of the particular block of code becomes extremely important. 
-There are many software programs or applications that perform very complex tasks or calculations all by the virtue of the looping constructs. 

Before taking on the loops in to your software program you should be well versed with the true and false concept of the programming language that you are using. Let us discuss all the above mentioned three loops one by one:

                1.  For Loop: 
               Here’s the syntax of the for loop:

For (initialization of the variable; test condition; increment condition)
{
Statement 1;
Statement 2; (code to be executed)
.
.
.
Statement n;
}
In the expression for the initialization of the variable one can declare the variable for the loop and initialize it with the required value. Secondly the test condition is responsible for checking the whether the loop should be executed or not on the basis of the true or false value. The increment condition lastly helps the loop to increment the value of the initialized variable. All of these 3 expressions are separated from each other by semicolon. An empty condition is evaluated to false value.

2. While Loop: 
Here’s the syntax for the while loop:

While( test condition)
{
Statement 1;
.
.
Statement n;
}
According to some programmers the while loops are perhaps the easiest to operate. While loops are supposed to be entry controlled loop since the condition is checked up on the entry itself and based on its true value it is executed. While loops are somewhat like the for loops except that they contain the initialization expression and the update expression inside their body. But the drawback with this loop is that it is quite length. This loop won’t allow the execution of the statements even once if the test condition is evaluated to be false.
      
          3. Do while loop
          Here’s the syntax for the do – while loop:
Do
{
Statement 1;
Statement 2;
.
.
.
Statement n;
} while (test condition)
This loop holds good for the programs in which the execution of a particular block of statements is required at least once irrespective of whether the test condition is true or false. The test condition is encountered in the last and is evaluated. If it is found to be false, then the loop won’t be eligible for a second iteration. Because of this factor the do while loop is commonly known as the exit controlled lop. 


Wednesday, April 25, 2012

How does a definition clear path play a role in data flow testing?


Definition clear path is a quite less heard term! This article is focussed up on the concept of definition clear path and what role do it plays in the data flow testing. First let us define what is a definition clear path in actual. 

"A definition clear path as it can made out from the term itself that it is a path through which other variables cannot be defined or through which other variable definitions cannot be made."

To make the meaning of definition clear path clearer we shall look up to an example:
- Suppose X be a variable declared or appearing in a software program or procedure. 
- Suppose there is a path which do not contain any nodes with definition of the variable X.
- Such a path not containing any variable definitions has been termed as a definition clear path. 

We can now define this definition clear path as a path between the two nodes namely A and B, with X being defined in A and an use in node B and there exists no other definition of variable X between the two nodes present in the path. 

Let us see another example to explore another type of definition clear path that can exist. 
- Suppose the above same variable X be defined at a node A along with an use defined at the another node B.
- Suppose the path formed by these two nodes A and B does not appears in the sub path, then such a path is also defined as a definition clear path for the X variable defined by the nodes A and B if the variable X is not defined in the sub path. 
- There is another common name for the definition clear path which is “def- clear path”. 

Now let us talk about the role that the definition clear path plays in the data flow testing. Actually in the data flow testing, there are three types of coverage that have to be provided namely:
  1. Statement coverage
  2. Branch coverage and lastly
  3. Path coverage
Basically problems are faced with the path selection process. A definition of the variable X reaches a use if and only if there exists a sub path such that the sub path is a definition clear path with respect to the variable X. The path selection in the data flow testing is based up on the two criteria:

  1. Rapps and Weyuker criteria: Under these criteria the definition clear sub paths from definitions to uses are listed.
  2. Laski and Korel criteria: Under these criteria the various combinations that reach uses at a node via some sub path are listed.

How does Definition Clear Path play a role in Data Flow Testing?



- Definition clear paths have been known to make remarkable improvements in the control flow techniques for data flow testing.
- A rational is obtained for which there is a need to take in to consideration all the combinations of the sub paths. 
- The “all uses” is the most commonly preferred criteria.
- There are some paths in a program that are infeasible and it is these paths that pose a big problem in the data flow testing. 
- The path testing strategies are based up on the data flow anomalies. 
- Enough paths are required to be tested so that it is ensured that every object in the program has been initialized before use and have been used at least once during the program execution. 
- For a complete data flow testing it is required that definition clear paths are executed by the test cases from each node that contains a defined variable.


Tuesday, March 20, 2012

Basis Path Testing is a white box testing technique - Explain?

As we all know in a typical software system or application, there exist so many possible paths between the entry and exit of the paths and the number of such potential paths is doubled by every decision that comes in the way.

On top of this every case statements adds to the number of the potential paths by multiplying the number of cases with the number of potential paths and this is further incremented by the loops which multiply all the different possible iteration values with the number of potential paths.

So you see with so many paths all over, a single unit of the code makes it extremely difficult to provide a 100 percent coverage to that unit. This can be illustrated by the following example:

- Consider a software program consisting a straight line code having only a single loop that is to be executed 50 times.
- For such a code we can easily make out that it will have 50 paths.
- Like all the other processes, the testing also does not have any unlimited amount of resources.
- There are a limited number of people to perform testing, limited resources, time, efforts and equipment to make up to the successful testing in a stipulated period of time.
- The testing processes always face a challenge of covering all the possible paths without going out of the specified limits.
- But this seems like very difficult to be achieved!

"This all can be possibly achieved if all the redundancy is eliminated from the source code to the maximum extent that is possible and at the same time, adequate coverage must be maintained."

How was basis path testing developed?

- Basis path testing was developed as a hybrid between the two testings namely the path testing and the branch testing.

- The path testing is the testing methodology that has been defined to execute paths all over a computer program whether all or selected and the branch testing is the testing methodology that has been defined for the execution of all the outcomes of every decision in a software source code.

- It can be thought of as a testing methodology that tests every branch and also all the independent paths throughout the software program.

- A path can be a sequence of statements or instructions to the system that starts at one junction and ends at the other and in between it may encounter several other junctions.

- An independent path is a bit different from the normal path in the way that it introduces a new set of processing statements or conditions.

What steps are involved in basis path testing?

It is a path that takes in to account only the paths with the linear combination of the iterations and in no other way. The following steps are involved in the basis path testing:

1. Drawing out of the control flow graph
2. Calculation of the cyclomatic complexity
3. A basis set of paths is chosen
4. Generation of the test cases for the execution of each and every path in the code

Benefits of Basis Path Testing

1. It clearly defines the number of the independent paths and the number of the test cases required.
2. It executes every statement at least once.
3. It executes every condition for both outcomes i.e., true and false at least once.
4. It pays attention to the logic of the program.
5. It facilitates the arbitrary test case design in contrast to the analytical test case design.

Basis path testing is a white box testing technique since one requires an in-depth knowledge of the program.


Thursday, March 8, 2012

What is meant by negative testing?

Negative testing is one of the most sought after software testing methodology. Negative testing is the counterpart of positive testing.

Facts about Negative Testing

- Negative testing is really very helpful when it comes to handling the invalid input test data and abnormal behavior of the software system or application.

- The purpose of the negative testing is to prevent such situations in which the invalid data might be taken by the system and which in turn may disrupt the functioning of the whole software system or application.

- For example, when a user tries to enter numerical data in the alphabetic field, the software system displays a message like “incorrect data type”.

- Such response from the software system or application is required since it avoids the crashing or hanging of the whole system by preventing input of invalid data.

- Not only this, the negative testing helps one improve the quality of the software system or application by knocking out its weak points.

- In positive testing, giving some invalid data as input to the system is considered to be an exception but this is not so in the case of negative testing.

- In negative testing, giving some exceptional input to the software system or application is treated just like a normal event.

- Negative testing is all about testing the exceptions.

- Usually for a better software testing results, both the negative testing as well as positive testing are combined together and implemented.

- Using such a testing methodology provides greater test coverage rather than using just one of the either mentioned software testing methodologies.

Situations which are typically tested by the negative testing:

1. Filling up fields by user
- Most of the web sites as well as web applications require the user to fill up all the fields that are marked compulsory.
- To test this functionality, leave all the marked fields blank and hit the submit button and observe the response of the site or the application.
- The expected outcome here can be a message asking you to fill up all the compulsory fields.

2.Checking correspondence between field and data type
- Negative testing also checks the correspondence between the field and data types.
- For example, the different fields in a form can accept the specified type of data. - To test this, you can enter various sorts of invalid data types in to those fields and check the behavior of the application.

3. Checks allowed limits and data bounds
- It also checks for the allowed limits and allowed data bounds.
- Fields in a form can accept data only within a specified data range and not above or below that.
- This can be tested in two ways. You can either enter value that is less than the lower range of the data or you can enter value that is above the specified range.
- Another example can be of text box which accepts only a finite number of characters.
- You can test it by inputting less or more number of characters.

4. Checking reason ability of input data. - Negative testing is also an effective tool for checking the reasonability of the input data.
- The age fields in some web forms etc do not allow any negative integers and also no floating point value.
- This can be tested by simply putting in the wrong data types like a negative integer.

5. Tests the web sessions
- Negative testing can also be used to test the web sessions either for timing or for log-in purposes.
- There are some web pages for viewing which you first have to log in.
- This can be tested by trying to open that web page without logging in.

Negative testing is pretty easy to be carried out manually, but still you can find many automation tools for it.


Facebook activity