SlideShare a Scribd company logo
1 of 10
Software Engineering
Coding
The objective of the coding phase is to transform the design of a system into code in a
high-level language and then to unit test this code.
Good software development organizations normally require their programmers to adhere to some well-defined
and standard style of coding called coding standards.
Coding Standards-
• A coding standard gives a uniform appearance to the codes written by different engineers.
• It enhances code understanding.
• It encourages good programming practices.
Coding Standards And
Guideline
 Limiting the use of global data type
 Contents of the headers preceding codes for different modules
 Naming conventions for global variables, local variables, and constant identifiers
 Error return conventions and exception handling mechanisms
Representative Coding Standards
Coding Standards And
Guideline
 Do not use a coding style that is too clever or too difficult to understand
 Avoid obscure side effects
 Do not use an identifier for multiple purposes
 The code should be well-documented
 The length of any function should not exceed 10 source lines
 Do not use goto statements
Representative Coding Guideline
Code Review
Code review for a model is carried out after the module is successfully compiled and the
all the syntax errors have been eliminated
Normally, two types of reviews are carried out on the code of a module
 Code Walk Through:
To discover the algorithm and logical errors in the code.
 Code Inspection:
The aim of code inspection is to discover some common types of errors caused due to
oversight and improper programming.
Software Documentation
Good documents are very useful and server the following purposes:
 Good documents enhance understandability and maintainability of a software product.
 Helps the users in effectively using the system.
 Helps in effectively handling the manpower turnover problem
 Helps the manager in effectively tracking the progress of the project
Software Documentation classified into the following:
 Internal documentation: These are provided in the source code itself
 External documentation: These are the supporting documents that usually accompany a
software product
Program Testing
Testing a program consists of providing the program with a set of test inputs (or test cases) and
observing if the program behaves as expected.
Aim of testing
The aim of the testing process is to identify all defects existing in a software product.
Some commonly used terms associated with testing are:
 Failure: This is a manifestation of an error (or defect or bug).
 Test case: This is the triplet [I,S,O], where I is the data input to the system, S is the state of the
system at which the data is input, and O is the expected output of the system.
 Test suite: This is the set of all test cases with which a given software product is to be tested.
Functional testing vs. Structural testing
In the black-box testing approach, test cases are designed using only the functional
specification of the software, i.e. without any knowledge of the internal structure of the
software. For this reason, black-box testing is known as functional testing.
On the other hand, in the white-box testing approach, designing test cases requires
thorough knowledge about the internal structure of software, and therefore the white-
box testing is called structural testing..
BLACK-BOX TESTING
In the black-box testing, test cases are designed from an examination of the input/output values
only and no knowledge of design, or code is required.
The following are the two main approaches to designing black box test cases
 Equivalence class portioning: In this approach, the domain of input values to a program is
partitioned into a set of equivalence classes
 Boundary value analysis: Type of programming error frequently occurs at the boundaries of
different equivalence classes of inputs.
WHITE-BOX TESTING
A white box testing strategy can either be coverage-based of fault based.
Fault Based Testing: Target to detect certain types of faults. An example of a fault-based strategy
is mutation testing.
Coverage-based testing: this attemts to execute certain elements of a program. This typically
targets to execute certain program elements for discovering failers.

More Related Content

What's hot

Software project management
Software project managementSoftware project management
Software project management
R A Akerkar
 
Software estimation
Software estimationSoftware estimation
Software estimation
Md Shakir
 

What's hot (20)

Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Software project management
Software project managementSoftware project management
Software project management
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
Software estimation
Software estimationSoftware estimation
Software estimation
 
Decomposition technique In Software Engineering
Decomposition technique In Software Engineering Decomposition technique In Software Engineering
Decomposition technique In Software Engineering
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation Techniques
 
V model presentation
V model presentationV model presentation
V model presentation
 
Introduction to Software Project Management
Introduction to Software Project ManagementIntroduction to Software Project Management
Introduction to Software Project Management
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Software Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationSoftware Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & Specification
 
Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering
 
loaders and linkers
 loaders and linkers loaders and linkers
loaders and linkers
 
Software Quality Metrics
Software Quality MetricsSoftware Quality Metrics
Software Quality Metrics
 
Organization and team structures
Organization and team structuresOrganization and team structures
Organization and team structures
 
Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factors
 
Agile development, software engineering
Agile development, software engineeringAgile development, software engineering
Agile development, software engineering
 
Estimating Software Maintenance Costs
Estimating Software Maintenance CostsEstimating Software Maintenance Costs
Estimating Software Maintenance Costs
 
Black box and white box testing
Black box and white box testingBlack box and white box testing
Black box and white box testing
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 

Viewers also liked (8)

Coding standards and guidelines
Coding standards and guidelinesCoding standards and guidelines
Coding standards and guidelines
 
Java best practices
Java best practicesJava best practices
Java best practices
 
Coding Best Practices
Coding Best PracticesCoding Best Practices
Coding Best Practices
 
Coding standards for java
Coding standards for javaCoding standards for java
Coding standards for java
 
Coding by Example - Tutorial Agiles 2012
Coding by Example - Tutorial Agiles 2012Coding by Example - Tutorial Agiles 2012
Coding by Example - Tutorial Agiles 2012
 
Software coding & testing, software engineering
Software coding & testing, software engineeringSoftware coding & testing, software engineering
Software coding & testing, software engineering
 
Coding standards
Coding standardsCoding standards
Coding standards
 
Testing Metrics
Testing MetricsTesting Metrics
Testing Metrics
 

Similar to Coding and testing in Software Engineering

Objectorientedtesting 160320132146
Objectorientedtesting 160320132146Objectorientedtesting 160320132146
Objectorientedtesting 160320132146
vidhyyav
 

Similar to Coding and testing in Software Engineering (20)

Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
Coding - SDLC Model
Coding - SDLC ModelCoding - SDLC Model
Coding - SDLC Model
 
Unit iv
Unit ivUnit iv
Unit iv
 
Software coding and testing
Software coding and testingSoftware coding and testing
Software coding and testing
 
Unit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxUnit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptx
 
White box & black box testing
White box & black box testingWhite box & black box testing
White box & black box testing
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Software testing (2)
Software testing (2)Software testing (2)
Software testing (2)
 
Testing chapter updated (1)
Testing chapter updated (1)Testing chapter updated (1)
Testing chapter updated (1)
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
 
Software testing basic
Software testing basicSoftware testing basic
Software testing basic
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Software testing
Software testingSoftware testing
Software testing
 
unittesting-190620114546 (1).pptx document
unittesting-190620114546 (1).pptx documentunittesting-190620114546 (1).pptx document
unittesting-190620114546 (1).pptx document
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
Objectorientedtesting 160320132146
Objectorientedtesting 160320132146Objectorientedtesting 160320132146
Objectorientedtesting 160320132146
 
Block 1 ms-034 unit-1
Block 1 ms-034 unit-1Block 1 ms-034 unit-1
Block 1 ms-034 unit-1
 
WHITE BOX & BLACK BOX TESTING IN DATABASE
WHITE BOX & BLACK BOXTESTING IN DATABASEWHITE BOX & BLACK BOXTESTING IN DATABASE
WHITE BOX & BLACK BOX TESTING IN DATABASE
 
Software testing
Software testingSoftware testing
Software testing
 

Recently uploaded

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 

Coding and testing in Software Engineering

  • 2. Coding The objective of the coding phase is to transform the design of a system into code in a high-level language and then to unit test this code. Good software development organizations normally require their programmers to adhere to some well-defined and standard style of coding called coding standards. Coding Standards- • A coding standard gives a uniform appearance to the codes written by different engineers. • It enhances code understanding. • It encourages good programming practices.
  • 3. Coding Standards And Guideline  Limiting the use of global data type  Contents of the headers preceding codes for different modules  Naming conventions for global variables, local variables, and constant identifiers  Error return conventions and exception handling mechanisms Representative Coding Standards
  • 4. Coding Standards And Guideline  Do not use a coding style that is too clever or too difficult to understand  Avoid obscure side effects  Do not use an identifier for multiple purposes  The code should be well-documented  The length of any function should not exceed 10 source lines  Do not use goto statements Representative Coding Guideline
  • 5. Code Review Code review for a model is carried out after the module is successfully compiled and the all the syntax errors have been eliminated Normally, two types of reviews are carried out on the code of a module  Code Walk Through: To discover the algorithm and logical errors in the code.  Code Inspection: The aim of code inspection is to discover some common types of errors caused due to oversight and improper programming.
  • 6. Software Documentation Good documents are very useful and server the following purposes:  Good documents enhance understandability and maintainability of a software product.  Helps the users in effectively using the system.  Helps in effectively handling the manpower turnover problem  Helps the manager in effectively tracking the progress of the project Software Documentation classified into the following:  Internal documentation: These are provided in the source code itself  External documentation: These are the supporting documents that usually accompany a software product
  • 7. Program Testing Testing a program consists of providing the program with a set of test inputs (or test cases) and observing if the program behaves as expected. Aim of testing The aim of the testing process is to identify all defects existing in a software product. Some commonly used terms associated with testing are:  Failure: This is a manifestation of an error (or defect or bug).  Test case: This is the triplet [I,S,O], where I is the data input to the system, S is the state of the system at which the data is input, and O is the expected output of the system.  Test suite: This is the set of all test cases with which a given software product is to be tested.
  • 8. Functional testing vs. Structural testing In the black-box testing approach, test cases are designed using only the functional specification of the software, i.e. without any knowledge of the internal structure of the software. For this reason, black-box testing is known as functional testing. On the other hand, in the white-box testing approach, designing test cases requires thorough knowledge about the internal structure of software, and therefore the white- box testing is called structural testing..
  • 9. BLACK-BOX TESTING In the black-box testing, test cases are designed from an examination of the input/output values only and no knowledge of design, or code is required. The following are the two main approaches to designing black box test cases  Equivalence class portioning: In this approach, the domain of input values to a program is partitioned into a set of equivalence classes  Boundary value analysis: Type of programming error frequently occurs at the boundaries of different equivalence classes of inputs.
  • 10. WHITE-BOX TESTING A white box testing strategy can either be coverage-based of fault based. Fault Based Testing: Target to detect certain types of faults. An example of a fault-based strategy is mutation testing. Coverage-based testing: this attemts to execute certain elements of a program. This typically targets to execute certain program elements for discovering failers.