Coding and Testing: Software Engineering Class Notes

Updated: Aug 18

Mobiprep has created last-minute notes for all topics of Software Engineering to help you with the revision of concepts for your university examinations. So let’s get started with the lecture notes on Software Engineering.

  1. Coding and Testing

  2. Function-Oriented Software Design

  3. a)Requirements analysis and specification ( b) Software Design

  4. Software Development Life Cycle Models

  5. Software Engineering

  6. Software Project Management

  7. UML

Our team has curated a list of the most important questions asked in universities such as DU, DTU, VIT, SRM, IP, Pune University, Manipal University, and many more. The questions are created from the previous year's question papers of colleges and universities.

  1. Distinguish between various defects in the context of program testing.

  2. What is the difference between internal and external documentation?

  3. What do you understand by coding standard?

  4. What do you understand about the testability of a program?

  5. Distinguish between software verification and software validation.

  6. Distinguish among a test case, a test suite, a test scenario, and a test script.

  7. What are different types of software testing techniques?

  8. What is stress testing?

  9. What do you understand by big-bang integration testing?

Coding and Testing


Question 1) Distinguish between various defects in the context of program testing.

Answer) “A mistake in coding is called Error, error found by tester is called Defect, defect accepted by development team then it is called Bug, build does not meet the requirements then it Is Failure.”

Defect can be categorized into:

WRONG: When requirements are implemented in a wrong manner.


MISSING: When requirement of the customer that was not fulfilled.


EXTRA: An auxiliary requirement incorporated into the product, not given by the end customer.


ERROR: The Error is a human mistake. An Error appears due to the logical mistake in the code made by the developer and it also refers to the difference between actual output and expected output. Error normally arises in software, that is it leads to change in the functionality of the program.


BUG: An Error found in the development environment as a result of a coding error, before the product is delivered to the customer is called a bug. This error can be a programming error, software or a hardware issue that causes a program to malfunction. Bug is terminology of Tester.


FAILURE: Failure is the observable incorrect behavior of the system. It occurs when the software fails to perform in the real environment. In other words, after the deployment, if the system does not perform as expected, due to the occurrence of any defect; then it is termed as Failure.


FAULT: An incorrect step, process or data definition in a computer program causing the program to perform in an unintended or unanticipated manner. It is the result of the error. It is an anomaly in the software that may cause it to behave incorrectly


 

Question 2) What is the difference between internal and external documentation?

Answer)Internal documentation is written in a program as comments. It would be comments and remarks made by the programmer in the form of line comments. It is created within the programming department and shows the design and implementation of the project like flow charts, UML diagrams, design documents, etc.

External documentation is written in a place where people who need to use the software can read about how to use the software. It would be things like flow charts, UML diagrams, requirements documents, design documents etc. It is created by the user and Programmer or System Analyst.

 

Question 3) What do you understand by coding standard?

Answer) Coding standards are collections of coding rules, guidelines, and best practices. Using the right one will help you write cleaner code. A coding standard gives a uniform appearance to the codes written by different engineers. It improves readability, and maintainability of the code and it reduces complexity also. It helps in code reuse and helps to detect error easily. It promotes sound programming practices and increases efficiency of the programmers.

For example

  1. Limited and optimized use of global

  2. Standard headers for different modules

  3. Standard naming conventions for local variables, global variables, constants and functions should be used

  4. Indentation increase readability

  5. Error return values and exception handling conventions

  6. Avoid using a coding style that is too difficult to understand

  7. Avoid using an identifier for multiple purposes

  8. Code should be well documented

  9. Length of functions should not be very large

  10. Try not to use GOTO statement

 

Question 4) What do you understand about the testability of a program?

Answer) Testability is the capability of the software product to enable modified software to be validated. Testability touches upon two areas of concern:

  • How easy is it to test the implementation?

  • How test-friendly is the requirement

 

Question 5) Distinguish between software verification and software validation.

Answer)

Software Verification



Software Testing



Verification is a static practice of verifying documents, design, code and program

Validation is a dynamic mechanism of validating and testing the actual product.

It doesn’t involve executing the code.

It involves executing the code.

It includes checking documents, design, codes and programs.



It includes testing and validating the actual product.



​It is human based checking of documents and files.


It is a computer-based execution of a program.

Methods used in verification are reviews, walkthroughs, inspections and desk-checking.



Methods used in validation are Black Box Testing, White Box Testing and non-functional testing.



Target is requirements specification, application and software architecture, high level, complete design, and database design etc.



Target is an actual product-a unit, a module, a bent of integrated modules, and an effective final product.



It generally comes first-done before validation.

It generally follows after verification.



Quality assurance team does verification.



Validation is executed on software code with the help of the testing team.




 

Question 6) Distinguish among a test case, a test suite, a test scenario, and a test script.

Answer) Test case is a document that contains the steps that have to be executed, it has been planned earlier. It is the base form to test an application in sequence. Test case template includes Test Suit ID, Test Data, Test procedure, Actual results, Expected results etc.

The Test Suite is a container that has a set of tests which help the testers in executing and reporting the test execution status. It can take any of the three states i.e. Active, in progress and completed.

It is a way to define all the possible ways to test an application. It is a single statement to cover all possible ways to test an application. A Test Scenario is any functionality that can be tested. It is also called Test Condition or Test Possibility.

Test script is written in a programming language and it's a short program used to test part of functionality of the software system. In other words, a written set of steps that should be performed manually. Test script is used in an automation environment.

 

Question 7) What are different types of software testing techniques?

Answer) Types of Testing:-

  1. Unit Testing.

  2. Integration Testing.

  3. Regression Testing.

  4. Smoke Testing.

  5. Alpha Testing.

  6. Beta Testing.

  7. System Testing.

  8. Stress Testing.

  9. Performance Testing

 

Question 8) What is stress testing?

Answer) Stress testing a Non-Functional testing technique that is performed as part of performance testing. It is a type of software testing that verifies stability & reliability of software application. The goal of Stress testing is measuring software on its robustness and error handling capabilities under extremely heavy load conditions and ensuring that software doesn't crash under crunch situations. Such testing is customarily used by the financial industry to help gauge investment risk and the adequacy of assets, as well as to help evaluate internal processes and controls.

 

Question 9) What do you understand by big-bang integration testing?

Answer) Big Bang Integration Testing is an integration testing strategy wherein all units are linked at once, resulting in a complete system. In this type of integration testing all the components as well as the modules of the software are integrated simultaneously, after which everything is tested as a whole. This approach of software testing is very effective as it enables software testers to save time as well as their efforts during the integration testing process. Big Bang testing has the advantage that everything is finished before integration testing starts.






21 views0 comments