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 Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing Fundamentals
Chankey Pathak
 
Validation testing
Validation testingValidation testing
Validation testing
Slideshare
 
Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12
koolkampus
 

What's hot (20)

Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Evolutionary process models se.ppt
Evolutionary process models se.pptEvolutionary process models se.ppt
Evolutionary process models se.ppt
 
5 black box and grey box testing
5   black box and grey box testing5   black box and grey box testing
5 black box and grey box testing
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing Fundamentals
 
Software Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & SpecificationSoftware Engineering : Requirement Analysis & Specification
Software Engineering : Requirement Analysis & Specification
 
Chapter 15 software product metrics
Chapter 15 software product metricsChapter 15 software product metrics
Chapter 15 software product metrics
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Software requirement and specification
Software requirement and specificationSoftware requirement and specification
Software requirement and specification
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Validation testing
Validation testingValidation testing
Validation testing
 
Path testing, data flow testing
Path testing, data flow testingPath testing, data flow testing
Path testing, data flow testing
 
Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Software Crisis
Software CrisisSoftware Crisis
Software Crisis
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Software testing
Software testingSoftware testing
Software testing
 
White Box Testing
White Box Testing White Box Testing
White Box Testing
 
Software Testing Techniques: An Overview
Software Testing Techniques: An Overview Software Testing Techniques: An Overview
Software Testing Techniques: An Overview
 
Test Levels & Techniques
Test Levels & TechniquesTest Levels & Techniques
Test Levels & Techniques
 

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

+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 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
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Recently uploaded (20)

%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
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%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
 
%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
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
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 🔝✔️✔️
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
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
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
+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...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+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...
 
%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
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 

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.