Adsnese

Ad

Thursday, December 6, 2007

Software Testing Interview Questions-1

What are 5 common solutions to software development problems?

· Solid requirements - clear, complete, detailed, cohesive, attainable, testable requirements that are agreed to by all players. Use prototypes to help nail down requirements.

· Realistic schedules - allow adequate time for planning, design, testing, bug fixing, re-testing, changes, and documentation; personnel should be able to complete the project without burning out.

· Adequate testing - start testing early on, re-test after fixes or changes, plan for adequate time for testing and bug fixing.

· Stick to initial requirements as much as possible - be prepared to defend against changes and additions once development has begun, and be prepared to explain consequences. If changes are necessary, they should be adequately reflected in related schedule changes. If possible, use rapid prototyping during the design phase so that customers can see what to expect. This will provide them a higher comfort level with their requirements decisions and minimize changes later on.

· Communication - require walkthroughs and inspections when appropriate; make extensive use of group communication tools - e-mail, groupware, networked bug-tracking tools and change management tools, intranet capabilities, etc.; insure that documentation is available and up-to-date - preferably electronic, not paper; promote teamwork and cooperation; use prototypes early on so that customers’ expectations are clarified.

What is software ‘quality’?
Quality software is reasonably bug-free, delivered on time and within budget, meets requirements and/or expectations, and is maintainable. However, quality is obviously a subjective term. It will depend on who the ‘customer’ is and their overall influence in the scheme of things. A wide-angle view of the ‘customers’ of a software development project might include end-users, customer acceptance testers, customer contract officers, customer management, the development organization’s management/accountants/testers/salespeople, future software maintenance engineers, stockholders, magazine columnists, etc. Each type of ‘customer’ will have their own slant on ‘quality’ - the accounting department might define quality in terms of profits while an end-user might define quality as user-friendly and bug-free

What is ‘good code’?
‘Good code’ is code that works, is bug free, and is readable and maintainable. Some organizations have coding ’standards’ that all developers are supposed to adhere to, but everyone has different ideas about what’s best, or what is too many or too few rules. There are also various theories and metrics, such as McCabe Complexity metrics. It should be kept in mind that excessive use of standards and rules can stifle productivity and creativity. ‘Peer reviews’, ‘buddy checks’ code analysis tools, etc. can be used to check for problems and enforce standards.
For C and C++ coding, here are some typical ideas to consider in setting rules/standards; these may or may not apply to a particular situation:

· minimize or eliminate use of global variables.

· use descriptive function and method names - use both upper and lower case, avoid abbreviations, use as many characters as necessary to be adequately descriptive (use of more than 20 characters is not out of line); be consistent in naming conventions.

· use descriptive variable names - use both upper and lower case, avoid abbreviations, use as many characters as necessary to be adequately descriptive (use of more than 20 characters is not out of line); be consistent in naming conventions.

· Function and method sizes should be minimized; less than 100 lines of code is good, less than 50 lines is preferable.

· Function descriptions should be clearly spelled out in comments preceding a function’s code.

· Organize code for readability.

· Use white space generously - vertically and horizontally

· Each line of code should contain 70 characters max.

· One code statement per line.

· Coding style should be consistent through out a program (e.g., use of brackets, indentations, naming conventions, etc.)

· In adding comments, err on the side of too many rather than too few comments; a common rule of thumb is that there should be at least as many lines of comments (including header blocks) as lines of code.

· No matter how small, an application should include documentation of the overall program function and flow (even a few paragraphs is better than nothing); or if possible a separate flow chart and detailed program documentation.

· Make extensive use of error handling procedures and status and error logging.

· For C++, to minimize complexity and increase maintainability, avoid too many levels of inheritance in class hierarchies (relative to the size and complexity of the application). Minimize use of multiple inheritance, and minimize use of operator overloading (note that the Java programming language eliminates multiple inheritance and operator overloading.)

· For C++, keep class methods small, less than 50 lines of code per method is preferable.

· For C++, make liberal use of exception handlers

What is ‘good design’?
‘Design’ could refer to many things, but often refers to ‘functional design’ or ‘internal design’. Good internal design is indicated by software code whose overall structure is clear, understandable, easily modifiable, and maintainable; is robust with sufficient error handling and status logging capability; and works correctly when implemented. Good functional design is indicated by an application whose functionality can be traced back to customer and end-user requirements. For programs that have a user interface, it’s often a good idea to assume that the end user will have little computer knowledge and may not read a user manual or even the on-line help; some common rules-of-thumb include:

· the program should act in a way that least surprises the user

· it should always be evident to the user what can be done next and how to exit

· the program shouldn’t let the users do something stupid without warning them.

No comments:

My Ad

.