Tuesday, July 29, 2008

Software Testing

Software Testing is a process of evaluating a system by manual or automatics means and verify that it satisfies specified requirements or identify differences between expected and actual results.

Life Cycle of a Software Bug

Once a bug(defect or error) is found, it should be communicated to the developers who can fix it. Once the bug is fixed/resolved, the fix should be verified by the testers and should be closed.

The following topics are discussed in this page
Bug Information:Information that should be captured in the bug so that developers can clearly understand the bug and fix it.
List of Bug statuses:
Lifecycle of some types of bugs:
Analysis of bugs:Bugs logged during a testing phase a invaluable source to improve the existing testing processes.

Why developers should not test?

Surely they can test, but they can't be good testers.
If the developers test their own work or the work of their peers,then the following problems comes up
  • Misunderstandings of the requirements/specifications will go unnoticed.
  • Given the time, developers tend to allocate more time improving the code or documentation rather than testing the code.
  • They tend to be optimistic of producing defect free work and thus 'under' test the product.
  • Testing needs skill, occassional tester with no prior training in testing techniques is no match to a trained bug hunter whose sole activity is testing.
  • To catch a higher percentage of bugs, tester needs to be aggressive.Nobody will be aggressive, if they are testing their own product.Testers are rewarded if they hunt lots of bugs, developers are rewarded if the product they developed has less number of bugs and this balance can only be maintained if the separate teams exist for testing and development.

  • Then who does unit testing and integration testing?
    Ofcourse Developers. Its very very difficult for a tester to do unit testing and integration testing as it involves understanding the code.So developers have to do the unit testing and integration testing. Misinterpretation of requirements might escape, but its better to test with these issues than not do testing at all.
    For better success, code developed by one developer should be unit tested by his peer.

Why software has to be tested?

The simple reason is development 'process' is unable to produce defect free software.Even if the process produces defect free software, how do you know until you test it.Will you get enough confidence that it will work without testing it. I dont think so.

Testing not only identifies and reports defects but also measures the quality of the product which helps to decide whether to release the product or not.

Coming to why development process is unable to product defect free software, blame it on the ever increasting complexity of the software products and on process variation.

Monday, July 28, 2008

Stress Testing

Stress testing deals with the quality of the application in the environment. The idea is to create an environment more demanding of the application than the application would experience under normal work loads. This is the hardest and most complex category of testing to accomplish and it requires a joint effort from all teams.
Race conditions and memory leaks are often found under stress testing. A race condition is a conflict between at least two tests. Each test works correctly when done in isolation. When the two tests are run in parallel, one or both of the tests fail. This is usually due to an incorrectly managed lock. A memory leak happens when a test leaves allocated memory behind and does not correctly return the memory to the memory allocation scheme. The test seems to run correctly, but after being exercised several times, available memory is reduced until the system fails.

A test environment is established with many testing stations. At each station, a script is exercising the system. These scripts are usually based on the regression suite. More and more stations are added, all simultaneous hammering on the system, until the system breaks. The system is repaired and the stress test is repeated until a level of stress is reached that is higher than expected to be present at a customer site.

Definition of Testers

Testers as doctors need to have knowledge about possible defects. Testers goal is to determine if all the logical and data elements in the s/w unit are functioning properly.

Regression Testing

Regression testing is any type of software testing which seeks to uncover regression bugs. Regression bugs occur whenever software functionality that previously worked as desired, stops working or no longer works in the same way that was previously planned. Typically regression bugs occur as an unintended consequence of program changes.

Regression testing is the process of testing changes to computer programs to make sure that the older programming still works with the new changes. Regression testing is a normal part of the program development process and, in larger companies, is done by code testing specialists. Test department coders develop code test scenarios and exercises that will test new units of code after they have been written. These test cases form what becomes the test bucket. Before a new version of a software product is released, the old test cases are run against the new version to make sure that all the old capabilities still work. The reason they might not work is because changing or adding new code to a program can easily introduce errors into code that is not intended to be changed.