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

What's hot (20)

Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesion
 
Software quality
Software qualitySoftware quality
Software quality
 
Software design
Software designSoftware design
Software design
 
Software reverse engineering
Software reverse engineeringSoftware reverse engineering
Software reverse engineering
 
software engineering
software engineeringsoftware engineering
software engineering
 
Software myths | Software Engineering Notes
Software myths | Software Engineering NotesSoftware myths | Software Engineering Notes
Software myths | Software Engineering Notes
 
Ch 4 linker loader
Ch 4 linker loaderCh 4 linker loader
Ch 4 linker loader
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)
 
Spiral model explanation
Spiral model  explanationSpiral model  explanation
Spiral model explanation
 
Rad model
Rad modelRad model
Rad model
 
Spiral model presentation
Spiral model presentationSpiral model presentation
Spiral model presentation
 
User and Operating System Interface
User and Operating System InterfaceUser and Operating System Interface
User and Operating System Interface
 
Evolving role of Software
Evolving role of SoftwareEvolving role of Software
Evolving role of Software
 
User Interface Analysis and Design
User Interface Analysis and DesignUser Interface Analysis and Design
User Interface Analysis and Design
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Staffing level estimation
Staffing level estimation Staffing level estimation
Staffing level estimation
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Unified process model
Unified process modelUnified process model
Unified process model
 
Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factors
 

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
 
Software testing and software development process
Software testing and software development processSoftware testing and software development process
Software testing and software development process
Gen Aloys Ochola Badde
 

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
 
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
 
Software testing and software development process
Software testing and software development processSoftware testing and software development process
Software testing and software development process
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+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)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%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
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
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
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+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...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%+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...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 

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.