Tuesday, December 18, 2007

Bugs Guidelines

Bug: bus is a missing functionality in the application bugs can be classified into: 1.Critical. 2.Major. 3.Minor.based on this severity the priority is assigned by the developer for solving the bug in stipulated time assigned by priority.

Manifestation of an error on execution of software is called a bug. Some bugs are important and have high priority whereas; some bugs are dangerous and have high severity. Example: Runtime errors, Compilation errors.

Bug is an error found before the application goes into production. An error is an undesirable deviation from the requirements. Defect is an error found after the application goes into production. There is a lot of debate going on between a defect and a bug. In some companies a defect and a bug are treated as the same. In some companies these both terms are treated as different. According to me a bug occurs while performing white box testing .A defect occurs in black box testing. But i don’t know what is the term that should be used when any deviation between expected and actual occurs while performing grey box testing


bug is an error found during the testing phase of a program \ application. Bugs can be classified as

a. Logical Bugs :- Where the functionality asked for does not complete the task.

b. GUI Related Bugs : relates to the Design of the Interface. It is either related to the Application Form \ Reports of the application

c. Database Related :- Data does not get refreshed \ updated \ deleted \ edited

d. System Related: - The bug appears if the program is not compatible with the operating system

e. Software Service Pack :- Sometimes latest updates are available and the program may not be compatible with the same.

f. Browser Related :- Sometimes latest updates are available and the program may not be compatible with the same.

A fault in a program, which causes the program to perform in an unintended or unanticipated manner. See: anomaly, defect, error, exception, fault

Friday, November 30, 2007

Testing Questions and Answers

21
Explain Path Coverage.
This measure reports whether each of the possible paths in each function have been followed. A path is a unique sequence of branches from the function entry to the exit. Also known as predicate coverage. Predicate coverage views paths as possible combination of logical conditions.
22
Explain Race Coverage.
This measure reports whether multiple threads execute the same code at the same time. It helps detect failure to synchronize access to resources. It is useful for testing multi-threaded programs such as in an operating system.
23
Explain Relational Operator Coverage.
This measure reports whether boundary situations occur with relational operators (<, <=, >, >=). The hypothesis is that boundary test cases find off-by-one errors and mistaken uses of wrong relational operators such as < instead of <=. For example, consider the following C/C++ code fragment:if (a < b) statement; Relational operator coverage reports whether the situation a==b occurs. If a==b occurs and the program behaves correctly, you can assume the relational operator is not suppose to be <=.
24
Explain Statement Coverage.
This measure reports whether each executable statement is encountered. The chief advantage of this measure is that it can be applied directly to object code and does not require processing source code. Performance profilers commonly implement this measure. The chief disadvantage of statement coverage is that it is insensitive to some control structures. For example, consider the following C/C++ code fragment:Int* p = NULL;if (condition)p = &variable;*p = 123;Without a test case that causes condition to evaluate false, statement coverage rates this code fully covered. In fact, if condition ever evaluates false, this code fails. This is the most serious shortcoming of statement coverage. If-statements are very common.


25
What is stress testing?
Test conducted to evaluate a system or component at or beyond the limits of its specified requirements to determine the load under which it fails and how. Stress testing is testing that investigates the behavior of software (and hardware) under extraordinary operating conditions.
For example, when a web server is stress tested, testing aims to find out how many users can be on-line, at the same time, without crashing the server. Stress testing tests the stability of a given system or entity.
26
What is Security Testing?Security Testing: Testing which confirms that the program can restrict access to authorized personnel and that the authorized personnel can access the functions available to their security level. Security/penetration testing is testing how well the system is protected against unauthorized internal or external access, or willful damage. For example: Firewall Test, Port Scan, Internet Security, database security
27
What is regression testing?Testing repeatedly the same thing is called Regression. This happens when there exist a bug, reported to the Dev.team, fixed and given back to the Tester. Now the tester will test not only the bug fixed but also the other stuff which was right earlier. The reason to do this is, because of the fixing of the bug reported, there is a danger that this might have resulted somewhere else as a bug.So to make sure that when ever the new build is given to the Testing Team, the full cycle of testing will be carried out. That is testing the same which already tested. In other words 'Regression testing'.
28
What is Soak Testing?
Soak testing is running a system at high levels of load for prolonged periods of time. A soak test would normally execute several times more transactions in an entire day (or night) than would be expected in a busy day, to identify and performance problems that appear after a large number of transactions have been executed. Also, due to memory leaks and other defects, it is possible that a system may ‘stop’ working after a certain number of transactions have been processed. It is important to identify such situations in a test environment.
29
What is the difference between Product Testing and Application Testing?A product is developed software which is generic to all; the changes in the software will be made when the new requests/change requests raised by the client. Testing this type of product is known as product testing. A project is particularly or specifically related to one and only one client. Testing this application is known as project testing.
30
What is Database Testing?Testing the tables, data in tables, relationship between the tables, does the data is saved in a proper way in tables is known as database testing.
31
What is Configuration Testing?Testing whether the applications specified configuration is working properly or not, i.e the configurable details of the application.
32
Difference between UAT and Alpha testing and Beta testing.User Acceptance Testing (UAT): A formal product evaluation performed by a customer as a condition of purchase. The testing can be based upon the User Requirements Specification to which the system should conform. Use Acceptance testing is black box testing. User Acceptance Testing is the last stage of the Software Development Lifecycle. User acceptance testing we validating all the user requirements specified in SRS is met after code freeze. The acceptance test is the responsibility of the client/customer or project manager; however, it is conducted with the full support of the project team. Before the software goes live determining if software is satisfactory to an end-user or customer. Alpha testing is done during software development to test changes and new features of the software. The purpose of alpha testing is to check the operation of the code in order to find and fix problems before the code is sent for verification and release. Because this is the first test of code that is still under development, problems are to be expected.Beta testing occurs after development and alpha testing are complete. The purpose of beta testing is to verify the operation of the software in a working environment (on live), after development and alpha testing are complete, but before the software is officially released. Software in beta test status is believed to be fully functional with no known malfunctions (bugs). Beta testing is done concurrently with the verification process.
33
What is BVT?BVT is a Build Verification Test and is normally performed, after the integration of all modules/components with the corresponding backend has been completed taken from the repository using some perl scripts (usually). Also it can be considered to be given for alpha/beta testing.
34
What is TQM?Total Quality Management (TQM) Total = Quality involves everyone and all activities in the company. Quality = Conformance to Requirements (Meeting Customer Requirements). Management = Quality can and must be managed. TQM = A process for managing quality; it must be a continuous way of life; a philosophy of perpetual improvement in everything we do.
35
Explain Walkthrough.
During a project's development, it will frequently be necessary to confirm that the individual elements of the design or work packages have been satisfied. This is design verification. This is also known as design walkthrough. A walkthrough is where the designer walks through the design or code explaining to his peers how the design works. Design verification normally takes place at intermediate stages between formal reviews and will often be a precursor to signing off a work package or a design document. Design verification may include but is not limited to: • Low Level Design • Source Code • Unit Test Plans • Unit Test Scripts • Functional Test Plans Although design verification is a less formal process than design review, actions arising during design verification shall nevertheless be recorded
36
Explain Review
Like other development activities, test strategy, planning and test design are themselves subject to errors and omissions. Therefore the test strategy, planning, specifications, etc. must have a review prior to testing. The formality of such a review will clearly vary with the level of testing applicable. What is important is that someone other than the author of a test document examines it for adequacy, feasibility and trace ability. It is widely accepted that static testing, in the form of inspections (peer review), is a very efficient method of identifying defects in code, with the additional benefit of improving team learning and speeding up knowledge transfer. Formal reviews, rather than inspections, tend to identify more defects but are more costly in terms of time and effort. Therefore any team will need to find the right balance for the product being inspected depending on the associated risk. At the end of each testing phase, a review of actual against expected test results must be undertaken to ensure that testing has been successful.
37
Explain Boundary Value Analysis
This complements equivalence partitioning by looking at the boundaries of the input equivalence classes. Test cases are devised that exercise the module with data chosen at these boundaries and also with data chosen to exercise the module on the boundaries of output data as well. For example, if an input is specified from zero to 255, the equivalence partitioning leads to values of less than 0, between 0 and 255 and greater than 255 as test input. Boundary-value analysis would suggest adding the following values:
-1 0 1
254 255 256
38
Explain Cause Effect Analysis
This requires that one must write sufficient test cases to explore the entire set of output conditions caused by a combination of input conditions, or equivalence classes of input conditions. This approach is necessary where required behavior depends upon a number of related factors or a sequence of events.
39
Explain Equivalence Partitioning
This technique relies on looking at the set of valid inputs specified for a module and dividing it up into classes of data that should, according to the specification, be treated identically. One set of test data is then devised to represent each equivalence class. The premise is that any representative will be as good as any other in finding faults in the handling of that class.
40
Explain the use of test tools.
Software testing tools can provide assistance with a number of testing activities. Examples of the types of assistance which can be provided are:
· Automation of test scripts There is a basic need for all tests to be repeatable. The repetition of tests can be made much easier by the user of test automation tools, which are able to capture and execute system-testing activities. Such activities may take the form of keyboard entry and mouse activity as well as execution of system procedures. These tools can be particularly useful for regression testing, or for stress testing where they can perhaps be used to simulate multiple user activity.
· Fault logging and tracking Faults discovered during testing must be recorded and processed methodically. Software tools can assist with the capture of fault details, assignment of a priority to each, allocation of responsibility for fixing faults, tracking of progress on fixing faults, etc
· Static code analysis A number of tools exist which will analyse program code and report on a number of characteristics, e.g. program structure, conformance with standards, use of comments, etc. These can be used as a pro-active measure to ensure the quality of maintainability of code.

Read More about Software Testing Tutorials

Software Testing Questions and Answers

Testing Question & Answers

1
What is testing?
Testing is an activity in which a system or component is executed under specified conditions, the results are observed or recorded, and an evaluation is made of some aspect of the system or component.

2
What is Software Quality Assurance?Software QA involves the entire software development PROCESS - monitoring and improving the process, making sure that any agreed-upon standards and procedures are followed, and ensuring that problems are found and dealt with. It is oriented to 'prevention'.

3
What are 5 common problems in the software development process?o poor requirements - if requirements are unclear, incomplete, too general, and not testable, there will be problems. o unrealistic schedule - if too much work is crammed in too little time, problems are inevitable. o inadequate testing - no one will know whether or not the program is any good until the customer complains or systems crash. o featurisms - requests to pile on new features after development is underway; extremely common. o miscommunication - if developers don't know what's needed or customer's have erroneous expectations, problems are guaranteed.

4
What is a test case?
A set of test inputs, execution conditions, and expected results developed for a particular objective.

5
What is a test plan?
A Test Plan depicts the plan for conducting tests. This usually includes: Test Strategy, Schedules and Resource allocation.

6
Give definitions for Defect, Defect Age and Defect Density.
Defect : Any deviation in the working of the application that is not mentioned in any documents in SDLC can be termed as a defect. Defect Age : The time duration between the defect state from New to Closed Defect Density : No of known defect per KLOC (Kilo lines of Code ) or FP (functional point)

7
What is a bug?
A fault in a program which causes the program to perform in an unintended or unanticipated manner

8
What is the difference between verification & validation?
Validation
Verification
Am I building the right product
Am I building the product right
Determining if the system complies with the requirements and performs functions for which it is intended and meets the organization’s goals and user needs. It is traditional and is performed at the end of the project.
The review of interim work steps and interim deliverables during a project to ensure they are acceptable. To determine if the system is consistent, adheres to standards, uses reliable techniques and prudent practices, and performs the selected functions in the correct manner.
Am I accessing the right data (in terms of the data required to satisfy the requirement)
Am I accessing the data right (in the right place; in the right way).
High level activity
Low-level activity.
Performed during development on key artifacts, like walkthroughs, reviews and inspections, mentor feedback, training, checklists and standards
Performed after a work product is produced against established criteria ensuring that the product integrates correctly into the environment
Determination of correctness of the final software product by a development project with respect to the user needs and requirements
Demonstration of consistency, completeness, and correctness of the software at each stage and between each stage of the development life cycle.

9
What is the difference between QA & QC?
Quality Assurance
Quality Control
A planned and systematic set of activities necessary to provide adequate confidence that requirements are properly established and products or services conform to specified requirements.
The process by which product quality is compared with applicable standards; and the action taken when non-conformance is detected.
An activity that establishes and evaluates the processes to produce the products.
An activity, which verifies if the product meets pre-defined standards.
Helps establish processes.
Implements the process.
Sets up measurements programs to evaluate processes.
Verifies if specific attribute(s) are in a specific product or service
Identifies weaknesses in processes and improves them.
Identifies defects for the primary purpose of correcting defects.
QA is the responsibility of the entire team.
QC is the responsibility of the tester.
Prevents the introduction of issues or defects
Detects, reports and corrects defects.
QA evaluates whether or not quality control is working for the primary purpose of determining whether or not there is a weakness in the process.
QC evaluates if the application is working for the primary purpose of determining if there is a flaw / defect in the functionalities.
QA improves the process that is applied to multiple products that will ever be produced by a process.
QC improves the development of a specific product or service.
QA personnel should not perform quality control unless doing it to validate quality control is working.
QC personnel may perform quality assurance tasks if and when required.

10
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.

11
What's an inspection? An inspection is more formalized than a 'walkthrough', typically with 3-8 people including a moderator, reader, and a recorder to take notes. The subject of the inspection is typically a document such as a requirements spec or a test plan, and the purpose is to find problems and see what's missing, not to fix anything. Attendees should prepare for this type of meeting by reading thru the document; most problems will be found during this preparation. The result of the inspection meeting should be a written report. Thorough preparation for inspections is difficult, painstaking work, but is one of the most cost effective methods of ensuring quality. Employees who are most skilled at inspections are like the 'eldest brother' in the parable in 'Why is it often hard for management to get serious about quality assurance?' Their skill may have low visibility but they are extremely valuable to any software development organization, since bug prevention is far more cost-effective than bug detection.

12
Explain Condition Coverage and Condition/Decision Coverage.
Condition coverage reports the true or false outcome of each Boolean sub-expression, separated by logical-and logical-or if they occur. Condition coverage measures the sub-expressions independently of each other. Condition/Decision Coverage is a hybrid measure composed by the union of condition coverage and decision coverage.

13
Explain Data Flow Coverage
This variation of path coverage considers only the sub-paths from variable assignments to subsequent references of the variables. The advantage of this measure is the paths reported have direct relevance to the way the program handles data. One disadvantage is that this measure does not include decision coverage. Another disadvantage is complexity. Researchers have proposed numerous variations, all of which increase the complexity of this measure. For example, variations distinguish between the use of a variable in a computation versus a use in a decision, and between local and global variables. As with data flow analysis for code optimization, pointers also present problems.

14
Explain Decision Coverage.
This measure reports whether Boolean expressions tested in control structures (such as the if-statement and while-statement) evaluated to both true and false.

15
Explain Function Coverage.
This measure reports whether you invoked each function or procedure. It is useful during preliminary testing to assure at least some coverage in all areas of the software. Broad, shallow testing finds gross deficiencies in a test suite quickly.

16
Explain Linear Code Sequence and Jump (LCSAJ) Coverage.
This variation of path coverage considers only sub-paths that can easily be represented in the program source code, without requiring a flow graph. An LCSAJ is a sequence of source code lines executed in sequence. This "linear" sequence can contain decisions as long as the control flow actually continues from one line to the next at run-time. Sub-paths are constructed by concatenating LCSAJs. Researchers refer to the coverage ratio of paths of length n LCSAJs as the test effectiveness ratio (TER) n+2. The advantage of this measure is that it is more thorough than decision coverage yet avoids the exponential difficulty of path coverage. The disadvantage is that it does not avoid infeasible paths

17
Explain Loop Coverage
This measure reports whether you executed each loop body zero times, exactly once, and more than once (consecutively). For do-while loops, loop coverage reports whether you executed the body exactly once, and more than once.

18
Explain Modified Condition/Decision Coverage.
Also known as MC/DC and MCDC. This measure requires enough test cases to verify every condition can affect the result of its encompassing decision.

19
Explain Multiple Condition Coverage.
Multiple condition coverage reports whether every possible combination of Boolean sub-expressions occurs.

20
Explain Object Code Coverage.
This measure reports whether each machine language conditional branch instruction both took the branch and fell through. This measure gives results that depend on the compiler rather than on the program structure since compiler code generation and optimization techniques can create object code that bears little similarity to the original source code structure. Since branches disrupt the instruction pipeline, compilers sometimes avoid generating a branch and instead generate an equivalent sequence of non-branching instructions. Compilers often expand the body of a function inline to save the cost of a function call. If such functions contain branches, the number of machine language branches increases dramatically relative to the original source code.

Read More about Software Testing Tutorials