Sei sulla pagina 1di 13

Basic Software Testing Principles: - A necessary part of a test case is a definition of the expected output or result.

-A programmer should avoid attempting to test his or her own program. - A programming organization should not test its own programs. - Thoroughly inspect the results of each test. - Test cases must be written for input conditions that are invalid and unexpected, as well as for those that are valid and expected. - Examining a program to see if it does not do what it is supposed to do is only half the battle; the other half is seeing whether the program does what it is not supposed to do. - Do not plan a testing effort under the tacit assumption that no errors will be found. - Software Testing is an extremely creative and intellectually challenging task.

Various Software Testing Levels: The projects test plan will normally define the types of testing that will be used on the project, when they will be used, and the strategies they will be used with. Test cases are then created for each testing type. Unit Testing: Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as expected. Each unit is tested separately before integrating them into modules to test the interfaces between modules. By means of effective Unit testing large percentage of defects are identified. Unit testing is performed by developers. Each module that is developed by designers need to be tested individually to verify proper operation so that any faulty module can be fixed immediately rather than let it exist and then cause some major issue in the integration phase. Once all of the units in a program have been found to be working efficiently and without any bugs, larger components of the program can be evaluated by means of integration testing. Though Unit testing may be time consuming, tedious and requires thoroughness on the part of the development team, but in the long run it can avoid major pitfalls in the software.

Benefits of unit testing: The modular approach during Unit testing eliminates the dependency on other modules during testing. We can test parts of a project with out waiting for the other parts to be available. Designers can identify and fix problem immediately, as the modules are best known to them. This helps in fixing multiple problems simultaneously. Cost of fixing a defect identified during the early stages is less compared to that during later stage. Debugging is simplified. Structural coverage of code is higher. Unit testing is more cost effective compared to the other stages of testing

Unit Testing Techniques: Structural & Functional. Structural Techniques: It is a White box testing technique that uses an internal perspective of the system to design test cases based on internal structure. It Requires programming skills to identify all paths through the software. The tester chooses test case inputs to exercise paths through the code and determines the appropriate outputs. Major Structural techniques are: Statement Testing: A test strategy in which each statement of a program is executed at least once. Branch Testing: Testing in which all branches in the program source code are tested at least once. Path Testing: Testing in which all paths in the program source code are tested at least once. Condition Testing: Condition testing allows the programmer to determine the path through a program by selectively executing code based on the comparison of a value Expression Testing: Testing in which the application is tested for different values of Regular Expression.

Functional testing techniques: These are Black box testing techniques which tests the functionality of the application. Some functionality testing techniques are: Input domain testing Boundary Value Syntax checking Equivalence Partitioning

Preparing the Unit Test Cases document :Preparing the Unit Test Cases document which is complete with every possible test case, is an important task in Unit Testing activity. It gives an assurance of defect-free Unit at the end of Unit Testing stage. Below are some useful tips: Input values: Write test cases for each of the identified inputs (positive & negative) accepted by the Unit. Expected Functionality: Cover each functionality that is expected to be in the Unit. Output values: Write test cases which will produce all types of output values that are expected from the module / unit. Path coverage: If the Unit have conditional processing that results in various paths, then write test cases to cover each of these paths. Abnormal terminations: Behavior of the Unit in case of abnormal termination should be tested. Error messages: Check error messages / warnings. These should be short, precise and self-explanatory. They should be properly phrased and free of grammatical mistakes. Screen Layout: Web page or screen layout must be tested against the requirements. Ensure that pages and screens are consistent and as per requirements. If you are testing database application, it is important to make sure that transactions are properly designed and no way inconsistent data gets saved in the database.

The format of the unit test case document can be similar to the format of normal functional test cases. The fields can be: Test Case Id Test Case Type Objective Pre-requisite Steps description Input Value / Test Data Expected Result Actual Result Remarks/Status

User Interface Testing 1. USER INTERFACE COLORS Are hyperlink colors standard? Are the field backgrounds the correct color? Does the site use (approximately) standard link colors? Are all the buttons are in standard format and size? Is the general screen background the correct color? Is the page background (color) distraction free?

CONTENT All fonts to be the same Does content remain if you need to go back to a previous page, or if you move forward to another new page? Is all text properly aligned? Is the text in all fields specified in the correct screen font? Is all the heading are left aligned Does the first letter of the second word appears in lowercase? IMAGES Are all graphics properly aligned? Are graphics being used the most efficient use of file size? Are graphics optimized for quick downloads? Assure that command buttons are all of similar size and shape, and same font & font size. Banner style & size & display exact same as existing windows Does text wrap properly around pictures/graphics?

INSTRUCTIONS Is all the error message text spelt correctly on this screen? Is all the micro-help text(i.e tool tip) spelt correctly on this screen? Progress messages on load of tabbed(active screens) screens

NAVIGATION
Are all disabled fields avoided in the TAB sequence? Are all read-only fields avoided in the TAB sequence? Can all screens accessible via buttons on this screen be accessed correctly? Does a scrollbar appear if required? Does the Tab Order specified on the screen go in sequence from Top Left to bottom right? This is the default unless otherwise specified. Is there a link to home on every single page? On open of tab focus will be on first editable field When an error message occurs does the focus return to the field in error when the user cancels it?

USABILITY Are all the field prompts spelt correctly? Are fonts too large or too small to read? Are names in command button & option box names are not abbreviations. Can the typical user run the system without frustration? Do pages print legibly without cutting off text? Does the site convey a clear sense of its intended audience? Does the site have a consistent, clearly recognizable "look-&feel"? Does User can Login with both Username/Email ID ? Does the site look good on 640 x 480, 600x800 etc.? Does the system provide or facilitate customer service? i.e. responsive, helpful, accurate? Is all terminology understandable for all of the sites intended users?

Write at least 10 test cases for the requirement given below. In the browser, after typing www.irctc.co.in and pressing Enter, the home page of IRCTC with Title Indian Railway Catering and Tourism Corporation Limited is displayed with following fields. Date Todays date Read only Feedback Link to Feedback screen Contact us Link to Contact us screen. User Name - Editable Field Accepts Alphanumeric characters, No special characters Minimum length 8 Password Editable Field Accepts Alphanumeric characters and special character Minimum length 8. Both User Name and Password are Mandatory if not entered Error Message Enter User Name, Enter Password is displayed. If User Names or Password is not valid Error Message Invalid Username or Password is displayed.

Design the screen for the Currency Converter with following requirements Base Currency is inputted in US Dollars. User can select any one the countries Brazil, Canada, Japan. When one the countries is selected, in the field Currency Rate, the respective currency rate will be displayed. (For Brazil 1.56, Canada 1.35, Japan 2.04 ) There will be buttons called Convert, Clear, Quit. Clicking on Convert, will show the converted value. Clicking on Clear, will clear all fields. Clicking on Quit, will quit the application Also, write the test cases for UI testing only.

Potrebbero piacerti anche