Difference Between While
Difference Between While
While-Loop Entry-Controlled Loop Loop Condition has to be initially TRUE for body to be executed
Do-While Loop Exit-Controlled Loop Loop body will be executed at-least once
Initialization,Condition,Update Statements are to be written Separately Syntax : exp1; while(exp2) { statement... statement... exp3 }
Software Testing is the process of executing a program or system with the intent of finding errors. Or, it involves any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results. Software is not unlike other physical processes where inputs are received and outputs are produced. Where software differs is in the manner in which it fails. Most physical systems fail in a fixed (and reasonably small) set of ways. By contrast, software can fail in many bizarre ways. Detecting all of the different failure modes for software is generally infeasible.
Testing Techniques is nothing but required Testing approach to be followed during testing. for exp: if we want to check the functionality of a module , then we go for black box testing....
Unit Testing Integration Testing System Testing Acceptance Testing Regression testing Unit Testing
A unit is smallest testable piece of software can be compiled, linked, loaded e.gfunctions/procedures, classes, interfaces normally done by programmer Test cases written after coding Integration testing Test for correct interaction between system units systems built by merging existing libraries modules coded by different people Mainly tests the interfaces among units Bottom up integration testing Use of drivers Top down integration testing Use of stubs System Testing Test of overall interaction of components Find disparities between implementation and specification Usually where most resources go to Involves load, performance, reliability and security testing Acceptance Testing Demonstrates satisfaction of user Users are essential part of process Usually merged with System Testing Done by test team and customer Done in simulated environment/real environment Regression Testing On going process throughout testing lifecycle New bugfix breaks previously tested units? Perform regression test whenever program changes
What is an algorithm? A simple definition: A set of instructions for solving a problem. The algorithm is either implemented by a program or simulated by a program. Algorithms often have steps that iterate (repeat ) or require decisions such as logic or comparison. An very simple example of an algorithm is multiplying two numbers: on first computers with limited
processors, this was accomplished by a routine that in a number of loop based on the first number adds the second number. The algorithm translates a method into computer commands. Introduction to flowcharts A flowchart is a graphical representation of an algorithm. These flowcharts play a vital role in the programming of a problem and are quite helpful in understanding the logic of complicated and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any high level language. Often we see how flowcharts are helpful in explaining the program to others. Hence, it is correct to say that a flowchart is a must for the better documentation of a complex program.
Software testing helps to make sure that it meets all the requirement it was supposed to meet. It will bring out all the errors, if any, while using the software. Software testing helps to understand that the software that is being tested is a complete success
Software testing helps to give a quality certification that the software can be used by the client immediately. It ensures quality of the product.
Now, dont you feel that your view was right? Good So let us go ahead. Besides, all these please keep in my mind that it is impossible to identify all errors, simply because it is not possible. As you know no human is error free. The same with softwares too. Testing can done in two ways: 1. Positive software testing 2. Negative software testing Positive software testing is the testing by giving the expected data to know whether it works well with expected data, where as negative software testing is testing by giving what is unexpected to know how the software reacts to such a data. Negative software testing is also known as illegal testing since the testing is using a abnormal data. Positive software testing is the usual testing done to check the functionality of the software. Both these testing helps us in finding errors. Negative software testing is always giving us a positive view about software testing itself. It helps us to know the software behaves as it is required to behave. The aim of a software tester should be to make the software fail. He should never think like a software maker.
more effective on larger units of code than glass box testing tester needs no knowledge of implementation, including specific programming languages tester and programmer are independent of each other
tests are done from a users point of view will help to expose any ambiguities or inconsistencies in the specifications test cases can be designed as soon as the specifications are complete
only a small number of possible inputs can actually be tested, to test every possible input stream would take nearly forever without clear and concise specifications, test cases are hard to design there may be unnecessary repetition of test inputs if the tester is not informed of test cases the programmer has already tried may leave many program paths untested cannot be directed toward specific segments of code which may be very complex (and therefore more error prone) most testing related research has been directed toward glass box testing
Testing Strategies/Techniques
black box testing should make use of randomly generated inputs (only a test range should be specified by the tester), to eliminate any guess work by the tester as to the methods of the function data outside of the specified input range should be tested to check the robustness of the program boundary cases should be tested (top and bottom of specified range) to make sure the highest and lowest allowable inputs produce proper output the number zero should be tested when numerical data is to be input stress testing should be performed (try to overload the program with inputs to see where it reaches its maximum capacity), especially with real time systems crash testing should be performed to see what it takes to bring the system down test monitoring tools should be used whenever possible to track which tests have already been performed and the outputs of these tests to avoid repetition and to aid in the software maintenance other functional testing techniques include: transaction testing, syntax testing, domain testing, logic testing, and state testing. finite state machine models can be used as a guide to design functional tests According to Beizer 2 the following is a general order by which tests should be designed: 1. Clean tests against requirements. 2. Additional structural tests for branch coverage, as needed. 3. Additional tests for data-flow coverage as needed. 4. Domain tests not covered by the above. 5. Special techniques as appropriatesyntax, loop, state, etc. 6. Any dirty tests not covered by the above.
White box testing strategy deals with the internal logic and structure of the code. White box testing is also called as glass, structural, open box or clear box testing. The tests written based on the white box testing strategy incorporate coverage of the code written, branches, paths, statements and internal logic of the code etc. In order to implement white box testing, the tester has to deal with the code and hence is needed to possess knowledge of coding and logic i.e. internal working of the code. White box test also needs the tester to look into the code and find out which unit/statement/chunk of the code is malfunctioning
As the knowledge of internal coding structure is prerequisite, it becomes very easy to find out which type of input/data can help in testing the application effectively. The other advantage of white box testing is that it helps in optimizing the code It helps in removing the extra lines of code, which can bring in hidden defects.
As knowledge of code and internal structure is a prerequisite, a skilled tester is needed to carry out this type of testing, which increases the cost. It is nearly impossible to look into every bit of code to find out hidden errors, which may create problems, resulting in failure of the application.
Different techniques are used for software techniques. The commonly used software testing techniques are the following:
White box software testing is the testing of the working of the software and its internal structures. It can detect errors of the implemented parts, but the unimplemented parts goes undeteted. Black box testing is the testing of the functionality of the software as opposed to its internal structure. It can be done at all levels of software testing. Now automatically you will be eager to know what is grey box software testing, right? Well, the answer is too simple because it is the combination of white box as well as black box testing.