CS608 – Software Verification and Validation: Midterm Important Subjective (30 Solved Q&As)
Computer Science • Read every solved subjective question with its model answer directly on this page. Free, no login required.
All 664 Midterm Packs · CS608 Course Page · CS608 MCQ Pack (74 MCQs)
-
Explain the professional view of quality.
Topic: Introduction to Software Quality Assurance
In the professional view, quality means conformance to requirements and fitness for use. Conformance to requirements means that the requirements are clearly stated and the product must conform to them; any deviation from the requirements is regarded as a defect, and a good quality product contains fewer defects. Fitness for use means the product is fit to user expectations: it meets the user's needs, and a good quality product provides better user satisfaction.
-
State the ISO 8402 definition of quality and list the quality characteristics of the ISO 9126 model.
Topic: Introduction to Software Quality Assurance
ISO 8402 defines quality as: "The totality of features and characteristics of a product or a service that bear on its ability to satisfy stated or implied needs." The six quality characteristics of the ISO 9126 model are: (1) Functionality, (2) Reliability, (3) Usability, (4) Efficiency, (5) Maintainability, and (6) Portability.
-
Define Software Quality Assurance (SQA) and state its objectives in software development.
Topic: Introduction to Software Quality Assurance
Software Quality Assurance is a systematic, planned set of actions necessary to provide adequate confidence that the software development process or the maintenance process of a software system product conforms to established functional technical requirements, as well as with the managerial requirements of keeping the schedule and operating within the budgetary confines. Its objectives in software development are: (1) assuring an acceptable level of confidence that the software will conform to functional technical requirements; (2) assuring an acceptable level of confidence that the software will conform to managerial scheduling and budgetary requirements; and (3) initiation and management of activities for the improvement and greater efficiency of software development and SQA activities.
-
Describe any two unique characteristics that distinguish a software product from an industrial product.
Topic: Introduction to Software Quality Assurance
(1) High complexity: The potential ways in which a software product can be used, with different data and data paths reflecting different incoming data, are almost infinite, whereas the manner in which industrial products can be used is usually well-defined. Every loop with different values of data reflects a different opportunity to see the software fail. (2) Invisibility of the product: In an industrial product, missing parts are obvious and easily identified. In software products, missing parts may not be noticeable for years, if at all, so there are far fewer opportunities to detect defects during development, production planning and manufacturing.
-
List the reasons for poor software quality.
Topic: Introduction to Software Quality Assurance
The main reasons for poor software quality are: (1) Faulty requirements definition; (2) Client-developer communication failures; (3) Deliberate deviations from software requirements; (4) Logical design errors; (5) Coding errors; (6) Non-compliance with documentation and coding instructions; (7) Shortcomings of the testing process; (8) User interface and procedure errors; and (9) Documentation errors.
-
Differentiate between Quality Assurance and Quality Control.
Topic: SQA in SDLC, Verification and Validation
Quality Assurance (QA) is process oriented and focuses on defect prevention: it is a set of activities for ensuring quality in the processes by which products are developed. It is a proactive process whose goal is to improve development and test processes so that defects do not arise when the product is being developed. Quality Control (QC) is product oriented and focuses on defect identification: it is a set of activities for ensuring quality in products, identifying defects in the actual products produced. It is a reactive process whose goal is to identify defects after a product is developed and before it is released. Examples of QA activities are a QA audit, process documentation, establishing standards and developing checklists; examples of QC activities are a QC review and performing testing.
-
What is verification? What is validation? State the questions associated with each.
Topic: SQA in SDLC, Verification and Validation
Verification means checking that the software conforms to its specification; it answers the question "Are we building the product right?" Validation means checking that the software does what the user really requires; it answers the question "Are we building the right product?" The goal of V&V is to establish confidence that the software is fit for its purpose; this does not mean the software is completely free of defects, rather it must be good enough for its intended use.
-
Differentiate between static and dynamic verification and validation.
Topic: SQA in SDLC, Verification and Validation
Static V&V is concerned with the analysis of the static system representation to discover problems, without executing the system; code and document inspections are its main technique, possibly supplemented by tool-based document and code analysis. Dynamic V&V is concerned with exercising and observing product behaviour; in software testing, the system is executed with test data and its operational behaviour is observed.
-
Describe the SQA activities performed during the requirements phase of the SDLC.
Topic: SQA in SDLC, Verification and Validation
In the requirements phase, the senior QA/manager ensures that the user/client requirements are captured correctly; finds out the risks in the requirements and decides how the system will be tested; ensures the requirements are properly expressed as functional, performance and interface requirements; reviews the requirement document and other deliverables against the standards; and prepares the formal test plan, including the test tools being used in the project.
-
Define error, defect and failure, and explain the relationship between them.
Topic: Quality Management, Principles, Practices and Standards
An error is a human mistake. A defect is an improper program condition, which is generally the result of an error. A failure is the difference between the actual behaviour of the system and its intended behaviour. Thus, a human error introduces a defect into the program, and when the defective part is executed, it may cause the system to fail.
-
What is an inspection? How does it differ from testing?
Topic: Quality Management, Principles, Practices and Standards
An inspection is a rigorous team review of a work product by peers of the producer of the work product; the size of the team varies with the characteristics of the work product being inspected, such as its size and type. It performs direct fault detection and removal without executing the software. Testing, on the other hand, involves the execution of software and the observation of its behaviour or outcome: if a failure is observed, the execution record is analysed to locate and fix the faults that caused the failure; otherwise, we gain confidence that the software is more likely to fulfil its designated functions.
-
What is quality planning? Describe the structure of a quality plan.
Topic: Quality Management, Principles, Practices and Standards
Quality planning is the process of developing a quality plan for a project. A quality plan sets out the desired product qualities and how these are assessed, and defines the most significant quality attributes; it should define the quality assessment process, and set out which organisational standards should be applied and, if necessary, define new standards. The structure of a quality plan consists of: product introduction, product plans, process descriptions, quality goals, and risks and risk management.
-
Differentiate between product standards and process standards, and state the importance of standards.
Topic: Quality Management, Principles, Practices and Standards
Standards are the key to effective quality management; they may be international, national, organizational or project standards. Product standards define characteristics that all components should exhibit, e.g. a common programming style. Process standards define how the software process should be enacted. Standards are important because they encapsulate best practice and avoid repetition of past mistakes; they provide a framework for the quality assurance process, which involves checking standard compliance; and they provide continuity, so new staff can understand the organisation by understanding the standards applied.
-
Define software testing according to Myers. Why is a test that discovers an error called a successful test?
Topic: Software Testing
According to Myers (1979), "Testing is the process of executing a program or system with the intent of finding errors." A test is said to be successful if it discovers an error, because the goal of testing is to expose latent defects in a software system before it is put to use: a software tester tries to break the system, and the objective is to show the presence of a defect, not the absence of it. The success of a test depends upon the ability to discover a bug, not on the ability to prove that the software does not have one.
-
Why is exhaustive testing not possible? Explain the limitations of testing.
Topic: Software Testing
Testing cannot show the absence of a defect; it only increases our confidence in the software, because exhaustive testing of software is not possible: it is simply too expansive and needs virtually infinite resources. A tester cannot generate all possible combinations of test cases, as the number of scenarios may become exhaustive. For example, a string-comparison function may pass all its designated tests yet still fail for two different strings of the same length ending with the same character (such as "cat" and "rat"), showing that a defect which is not very frequent may remain undiscovered.
-
Differentiate between the Software Development Life Cycle (SDLC) and the Software Test Life Cycle (STLC).
Topic: Software Testing
Development is a creative activity, whereas testing is a destructive activity. The objective of development is to show that the program works, while the objective of testing is to show that the program does not work. The functional specification document is the starting point and base document for both: the development team is involved in analysis, design and coding activities, while the testing team is busy in analysis of requirements, test planning, and test case and test data generation. The system comes into testing after development is completed; test cases are executed with test data and actual results are compared with the expected results.
-
What is black box testing? State its characteristics.
Topic: Black Box Testing
Black box testing is testing that ignores the internal mechanism of a system or component and focuses solely on the outputs generated in response to selected inputs and execution conditions; it evaluates the compliance of a system or component with specified functional requirements. Its characteristics are: the program is treated as a black box; implementation details do not matter; it requires an end-user perspective; its criteria are not precise; and test planning can begin early. It is concerned with WHAT a system does rather than HOW it does it, and is typically used at the system test phase, although it can be useful throughout the test lifecycle.
-
State the merits and de-merits of black box testing.
Topic: Black Box Testing
Merits: Black box tests are reproducible, and the environment the program is running in is also tested. The tester needs no knowledge of the implementation, including specific programming languages, so the tester can be non-technical. Tests are done from a user's point of view, which helps to expose ambiguities or inconsistencies in the specifications. It is more effective on larger units of code and on larger systems, and test cases can be designed as soon as the functional specifications are complete. De-merits: Not all properties of a software product can be tested, and only a small number of possible inputs can actually be tested. The reason for a failure is not found. Without clear and concise specifications, test cases are hard to design. It may leave many program paths untested, and there may be unnecessary repetition of test inputs already tried by the programmer.
-
What is Equivalence Partitioning? Explain with the help of an example.
Topic: Black Box Testing
Equivalence Partitioning is a black box test design technique whose aim is to treat groups of inputs as equivalent and to select one representative input to test them all, so that exhaustive testing is avoided while achieving good input and output coverage. For example, for the condition "IF VALUE is between 1 and 100 (inclusive) THEN ...", the input domain is divided into partitions such as values less than 1, values from 1 to 100, and values greater than 100, and one representative value from each partition is tested. If the tester chooses the right partitions, testing will be accurate and efficient; if two partitions are mistakenly thought to be equivalent when they are not, a test situation will be missed, and if two objects are thought to be different when they are not, the tests will be redundant. Equivalence partitioning can be used at all levels of testing.
-
What is Boundary Value Analysis? How is it related to Equivalence Partitioning?
Topic: Black Box Testing
Boundary Value Analysis (BVA) uses the same analysis of partitions as Equivalence Partitioning and is usually used in conjunction with EP in test case design. It operates on the basis that experience shows errors are most likely to exist at the boundaries between partitions, and so incorporates a degree of negative testing into the test design. BVA test cases are designed to exercise the software on and at either side of boundary values; for example, for a valid range of 1 to 100, the values 0, 1, 100 and 101 are tested. Like EP, it can be used at all test levels.
-
What is state transition testing? When is it used?
Topic: Black Box Testing
State transition testing is a black box testing technique in which outputs are triggered by changes to the input conditions or changes to the state of the system; tests are designed to execute valid and invalid state transitions. It is used when there is a sequence of events that occurs and associated conditions that apply to those events, when the proper handling of a particular event depends on the events and conditions that have occurred in the past, and for real time systems with various states and transitions involved. Test cases are derived by understanding the various states and transitions, marking each valid and invalid state, defining sequences of events that lead to an allowed test ending state, and repeating until all states have been visited and all transitions traversed.
-
Describe the activities performed in software quality planning.
Topic: Software Quality Planning
Quality planning is carried out before the regular QA activities. It sets specific quality goals and forms an overall QA strategy. Setting quality goals involves: identifying quality views and attributes meaningful to target customers and users; selecting direct quality measures that can be used to measure the selected attributes; and quantifying these quality measures. Setting the QA strategy involves selecting appropriate QA activities to perform, and choosing appropriate quality measurements and models to provide feedback, quality assessment and improvement, keeping in view the influence of quality perspectives and attributes and the influence of different quality levels.
-
Define the following quality attributes: reliability, availability, scalability and testability.
Topic: Software Quality Planning
(1) Reliability: The ability of a system to remain operational over time. (2) Availability: The proportion of time that the system is functional and working. (3) Scalability: The ability of a system to handle increases in load without impact on the performance of the system. (4) Testability: A measure of how easy it is to create test criteria for the system and its components, and to execute these tests in order to determine if the criteria are met. (Other attributes include maintainability, reusability, interoperability, manageability, performance, security, supportability and usability.)
-
List the main sections of the SQA Plan according to IEEE 730-2002.
Topic: Software Quality Planning
The main sections of the SQA Plan according to IEEE 730-2002 are: (1) Purpose; (2) Reference Documents; (3) Management (organization, tasks, roles and responsibilities, quality assurance estimated resources); (4) Documentation; (5) Standards, practices, conventions, and metrics; (6) Software reviews; (7) Test; (8) Problem reporting and corrective action; (9) Tools, techniques, and methodologies; (10) Media control; (11) Supplier control; (12) Records collection, maintenance, and retention; (13) Training; (14) Risk management; (15) Glossary; and (16) SQAP change procedure and history.
-
What is gray box testing? State its merits and de-merits.
Topic: Gray Box and White Box Testing
Gray box testing is a combination of white box testing and black box testing, in which the tester has limited knowledge of the internal details of the program; a gray box is a device, program or system whose workings are partially understood. Merits: It offers the combined benefits of both black box and white box testing. It is non-intrusive, being based on the functional specification and architectural view rather than on the source code. It supports intelligent test authoring, in which the tester handles intelligent test scenarios such as data type handling, communication protocol and exception handling. It provides unbiased testing by maintaining a boundary between tester and developer. De-merits: It gives only partial code coverage, because the source code or binaries are missing due to limited access to the internal structure of the application, resulting in limited access for code path traversal; and in distributed applications it is difficult to associate defect identification.
-
What is white box testing? How does it differ from black box testing?
Topic: Gray Box and White Box Testing
White box testing is testing based on an analysis of the internal structure of the component or system; it is also known as structural testing, structure based testing or glass box testing. In white box testing we look inside the system and evaluate what it consists of and how it is implemented: the internal structures of the program, such as the design and the structure of the code, are analysed and test cases are devised to test these structures. In black box testing, by contrast, the internal implementation details are not visible to the tester, who gives inputs through the interface provided by the system and checks the outputs against the expected results. White box testing is typically undertaken at the component and component integration test phases by development teams.
-
Define statement coverage and decision coverage. Calculate the statement coverage when 5 out of 7 statements of a program are executed.
Topic: Gray Box and White Box Testing
Statement coverage is a white box testing technique which involves the execution of all the statements at least once in the source code. It is calculated as: Statement coverage = (Number of statements executed / Total number of statements in the source code) x 100. For example, if a test set executes 5 statements out of a total of 7 statements, the statement coverage is 5/7 x 100 = 71%. Its main drawback is that it cannot test the false condition of a decision. Decision coverage (branch coverage) aims to ensure that each one of the possible branches from each decision point is executed at least once, so that every decision is taken each way, true and false, ensuring that all reachable code is executed.
-
State the merits and de-merits of white box testing.
Topic: Gray Box and White Box Testing
Merits: White box testing forces the test developer to reason carefully about the implementation. It approximates the partitioning done by execution equivalence and reveals errors in hidden code. As knowledge of the internal coding structure is available, it becomes very easy to find out which type of input/data can help in testing the application effectively. It helps in optimizing the code and in removing extra lines of code, which can bring in hidden defects. De-merits: It is expensive, and it can miss cases omitted in the code. As knowledge of code and internal structure is a prerequisite, a skilled tester is needed, which increases the cost. It is nearly impossible to look into every bit of code to find hidden errors, and very few white box tests can be done without modifying the program.
-
What is process management? Why should each project tailor the organization's standard process?
Topic: Software Quality and Process Management
Process management is concerned with managing the organization's software process. The organization's software process assets include standard processes, SDLCs, methodologies and tools, standards, tailoring guidelines for projects' software processes and a library of best practices; these are created, updated, maintained and made available to projects. Proper process management means: define a standard process; ensure that each project uses an appropriate version of the standard process; and use results to improve the standard process. Each project must tailor the standard process because every project has its own requirements; the standard process therefore contains guidelines for tailoring it to meet the needs of different projects, and each project has its own approved life cycle model defining its procedures, standards, responsibilities, tools and measurements.
-
What is defect prevention? How are defect sources identified at the organizational level?
Topic: Software Quality and Process Management
Defect prevention is concerned with ensuring that the sources of defects that are inherent in the software process, or of defects that occur repeatedly, are identified and eliminated. Defect prevention activities should be identified and implemented at both organizational and project level. The objective at the organizational level is to identify and prioritize defects which have organization-wide impact and prevent them from occurring again; these are identified from project wind-up reports, organizational metrics analysis, audit and assessment reports, and other organizational level meetings, after which root cause analysis is performed and preventive actions are taken. At the project level, defect prevention activities are included in the project development plan and schedule; one successful method is to arrange a meeting during development to identify the defects and analyse their root cause.