SlideShare une entreprise Scribd logo
1  sur  32
Developers Border Line:
     Unit Testing

  Muhammad Usman Shafqat
       SQA Engineer
      Confiz Solutions
What do you guys think about Unit Testing?
What Is Unit Testing?

 Testing
        done by developers during and after
 code construction.

 Could   be of type:

  1- White Box
  2- Black Box
More Explanation:
   Unit testing is a development procedure where
    programmers create tests as they develop software.

   The tests are simple short tests that test functionality of a
    particular unit or module of their code, such as a
    “class” or “function”.

   Using open source libraries like cunit, cppunit and nunit
    (for C, C++ and C#) these tests can be automatically run
    and any problems found quickly.

   As the tests are developed in parallel with the source
    code, when the particular unit is completed, a successful
    unit test demonstrates it's correctness.
Why Unit Test?
 Reveals   bugs that may escape “black box”
 testing

 Simplifies   Integration

 Facilitates   Change

 Documentation


 Encourages good design, such as separation
 of interface from implementation
Take a Better Approach
Value of Unit Testing
The Why, The What, The How

                It has to do with Quality!

    Your software has to meet customer
    requirements
       functional and non-functional requirements

   How do you ensure that your software does
    what it should?
The Why, The What, The How

              It has to do with Safety!

    You often have to change your existing code
     because of new
    requirements, improvements, and bug fixes

    How do you ensure, that your changed
    software still does what it did before?
The Why, The What, The How

          It has to do with Sustainability!

   You still have to fix bugs

 How do you ensure, that a fixed bug never
shows up again?
The Why, The What, The How

You have to show that

   The product works as expected
   But also its individual parts, like
        services
       components
       classes
       methods
The Why, The What, The How

   You can do this manually
       Writing test specifications and protocols


   Or (much better) automated
       Let the system do it for you (at least part of it)
Best Practices:
Have a Process and Stick to It!
 Have   a process
    Any process is better than none
    Make sure it is not “shelfware”
 ALL   processes say you should unit test
    (they’re just not that specific about how)
 Developers should feel the process is
  helping, not hindering them
 Managers should support the team and the
  process
Best Practices:
Test Early and Test Often
 Consider  writing the tests first (Test-Driven
  Development)
 Start testing as soon as you start writing the
  code (if not before)
 Make sure the tests are run frequently
 The earlier you know about a problem the
  earlier you can fix it
Best Practices:
Refactor, Refactor, Refactor
 Avoid   complexity
    Break large classes into smaller ones
    Break large methods into smaller ones


 Simplifying
            the code makes it easier to
 understand.
Best Practices:
Use “Extreme Feedback”

 Try   to fix bugs as soon as they are identified

 If   not possible, make a plan for when to fix

 “Don’t    live with Broken Windows”

 If   you can’t measure you can’t manage it

 If   you can’t manage it, you can’t improve it
Web UI issue - screen 1




Issue: Menu’s are Not displayed in single line and Text is displayed out of
Banner.
Mockup Screen is at Next Slide…
Mockup - screen 1
Web UI issue - screen 2




Issue: Text missing from highlighted area.
Mockup Screen is at Next Slide…
Mockup - screen 2
Web UI issue – screen 3




Issue: Twitter icon and Footer links are Not displayed.
Mockup Screen is at Next Slide…
Mockup - screen 3
Cross Browser Issue:
TinyMCE Editor is Not displayed correctly in IE, working fine in others.
Mobile App UI issue 1



Issue:

First Alphabet is Not
capital in “Cancel”
button text.
Mobile App UI issue 2



Issue:

Text alignment is Not
correct with screen.
Mobile App UI issue 3



Issue:

Buttons are Not
Centrally aligned with
Screen.
Enhancement Unit Testing Issue




Enhancement:        Display company introduction video at Job Board.
Issue:     Video is displayed but other sections that were visible before this change are Not visible now.

See the Job Board screen before this change on Next Slide…
Job Board Screen before Change
Unit Testing Checklists
   (Mobile App & Website)
Unit Testing Checklist - Mobile Application
         (I-Phone/I-Pod Devices, Android Device, Windows Phone, Blackberry, Symbian OS)




Generic Testing:                                                                               Yes   No   N/A
Does the page layout consistent from page to page according to the mockups/PSDs?
Functional Testing:
Does App Installation & Un-installation working correctly?
GUI & Usability Testing:
Navigation to Screens working fine?
Page Scrolling working fine?
Compliance/Compatibility Testing:
Verify the Behavior of Mobile App in Low resources (Memory/Space)?
Web Services/Backend Testing:
Connection with DB is made successfully through web service?
Data successfully Posted through web services?



See the full checklist available at below Engineering Wiki link:

https://sites.google.com/a/confiz.com/software-engineering/guides/unit-test-check-list?pli=1
Unit Testing Checklist - Website


Generic Testing:                                                                               Yes   No   N/A
Does the page layout consistent from page to page according to the mockups/PSDs?
Functional Testing:
Check that all the links under Main Menu’s are working properly?
Check that all the Header or Footer links are working properly?
GUI & Usability Testing:
Does all text properly aligned?
Does all graphics properly aligned?
Compliance/Compatibility Testing:
Does all supported browsers been tested?
Does the HTML version being used compatible with appropriate browser versions?
Web Services/Backend Testing:
Connection with DB is made successfully through web service?


See the full checklist available at below Engineering Wiki link:

https://sites.google.com/a/confiz.com/software-engineering/guides/unit-test-check-list?pli=1
References:

   http://rollerjm.free.fr/pro/junit/3.htm

   http://en.wikipedia.org/wiki/Unit_testing

   http://www.developertesting.com/

   http://cplus.about.com/od/glossar1/g/unittesting.htm

   http://www.scribd.com/doc/84614135/05-unittesting

   http://ebookbrowse.com/unit-testing-nz-jug-presentation-pdf-d274895477

Contenu connexe

Tendances

UI Automation Quirks
UI Automation QuirksUI Automation Quirks
UI Automation QuirksLucas Pang
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalQA or the Highway
 
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.comReaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.comKlaus Salchner
 
Bug best practice
Bug best practiceBug best practice
Bug best practicegaoliang641
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Applitools
 
Test for Success: 5 Steps to Usability Testing Success
Test for Success: 5 Steps to Usability Testing SuccessTest for Success: 5 Steps to Usability Testing Success
Test for Success: 5 Steps to Usability Testing SuccessSalesforce Developers
 
Testing Frameworks And Methodologies
Testing Frameworks And MethodologiesTesting Frameworks And Methodologies
Testing Frameworks And MethodologiesSteven Cahill
 
Accessibility Support Baseline: Balancing User Needs Against Test Effort
Accessibility Support Baseline: Balancing User Needs Against Test EffortAccessibility Support Baseline: Balancing User Needs Against Test Effort
Accessibility Support Baseline: Balancing User Needs Against Test EffortAidan Tierney
 
Inrotduction of Testing
Inrotduction of TestingInrotduction of Testing
Inrotduction of TestingPalash Ghosh
 
The 7 minute accessibility assessment and app rating system
The 7 minute accessibility assessment and app rating systemThe 7 minute accessibility assessment and app rating system
The 7 minute accessibility assessment and app rating systemAidan Tierney
 
Bridging the communication gap
Bridging the communication gapBridging the communication gap
Bridging the communication gapGuillagui San
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planningSivaprasanthRentala1975
 
Bringing Quality Design Systems to Life with Storybook & Applitools
Bringing Quality Design Systems to Life with Storybook & ApplitoolsBringing Quality Design Systems to Life with Storybook & Applitools
Bringing Quality Design Systems to Life with Storybook & ApplitoolsApplitools
 
测试向前一步
测试向前一步测试向前一步
测试向前一步drewz lin
 
Software Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework designSoftware Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework designBonnie Yau
 
Test Automation - Principles and Practices
Test Automation - Principles and PracticesTest Automation - Principles and Practices
Test Automation - Principles and PracticesAnand Bagmar
 
Become Software Tester or Developer
Become Software Tester or DeveloperBecome Software Tester or Developer
Become Software Tester or DeveloperKMS Technology
 
Software Characterization & Performance Testing - Beat Your Software with a S...
Software Characterization & Performance Testing - Beat Your Software with a S...Software Characterization & Performance Testing - Beat Your Software with a S...
Software Characterization & Performance Testing - Beat Your Software with a S...Tze Chin Tang
 

Tendances (20)

UI Automation Quirks
UI Automation QuirksUI Automation Quirks
UI Automation Quirks
 
Test Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh DahalTest Automation Architecture That Works by Bhupesh Dahal
Test Automation Architecture That Works by Bhupesh Dahal
 
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.comReaching for Your Quality Stretch Goals: Testing at Realtor.com
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
 
Bug best practice
Bug best practiceBug best practice
Bug best practice
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
 
Test for Success: 5 Steps to Usability Testing Success
Test for Success: 5 Steps to Usability Testing SuccessTest for Success: 5 Steps to Usability Testing Success
Test for Success: 5 Steps to Usability Testing Success
 
Testing Frameworks And Methodologies
Testing Frameworks And MethodologiesTesting Frameworks And Methodologies
Testing Frameworks And Methodologies
 
Accessibility Support Baseline: Balancing User Needs Against Test Effort
Accessibility Support Baseline: Balancing User Needs Against Test EffortAccessibility Support Baseline: Balancing User Needs Against Test Effort
Accessibility Support Baseline: Balancing User Needs Against Test Effort
 
Inrotduction of Testing
Inrotduction of TestingInrotduction of Testing
Inrotduction of Testing
 
The 7 minute accessibility assessment and app rating system
The 7 minute accessibility assessment and app rating systemThe 7 minute accessibility assessment and app rating system
The 7 minute accessibility assessment and app rating system
 
Bridging the communication gap
Bridging the communication gapBridging the communication gap
Bridging the communication gap
 
Automation testing strategy, approach & planning
Automation testing  strategy, approach & planningAutomation testing  strategy, approach & planning
Automation testing strategy, approach & planning
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
Bringing Quality Design Systems to Life with Storybook & Applitools
Bringing Quality Design Systems to Life with Storybook & ApplitoolsBringing Quality Design Systems to Life with Storybook & Applitools
Bringing Quality Design Systems to Life with Storybook & Applitools
 
测试向前一步
测试向前一步测试向前一步
测试向前一步
 
Usability for all budgets
Usability for all budgetsUsability for all budgets
Usability for all budgets
 
Software Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework designSoftware Mobile Website Quality assurance framework design
Software Mobile Website Quality assurance framework design
 
Test Automation - Principles and Practices
Test Automation - Principles and PracticesTest Automation - Principles and Practices
Test Automation - Principles and Practices
 
Become Software Tester or Developer
Become Software Tester or DeveloperBecome Software Tester or Developer
Become Software Tester or Developer
 
Software Characterization & Performance Testing - Beat Your Software with a S...
Software Characterization & Performance Testing - Beat Your Software with a S...Software Characterization & Performance Testing - Beat Your Software with a S...
Software Characterization & Performance Testing - Beat Your Software with a S...
 

En vedette

Testing Javascript with Jasmine
Testing Javascript with JasmineTesting Javascript with Jasmine
Testing Javascript with JasmineTim Tyrrell
 
Client side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karmaClient side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karmaAdam Klein
 
TDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshopTDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshopSikandar Ahmed
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introMaurice De Beijer [MVP]
 
Unit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSUnit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSKnoldus Inc.
 
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma Christopher Bartling
 
Intro to testing Javascript with jasmine
Intro to testing Javascript with jasmineIntro to testing Javascript with jasmine
Intro to testing Javascript with jasmineTimothy Oxley
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaAndrey Kolodnitsky
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaChristopher Bartling
 
Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpAll Things Open
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introductionNir Kaufman
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Knoldus Inc.
 

En vedette (16)

Testing Javascript with Jasmine
Testing Javascript with JasmineTesting Javascript with Jasmine
Testing Javascript with Jasmine
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Client side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karmaClient side unit tests - using jasmine & karma
Client side unit tests - using jasmine & karma
 
TDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshopTDD, unit testing and java script testing frameworks workshop
TDD, unit testing and java script testing frameworks workshop
 
Angular testing
Angular testingAngular testing
Angular testing
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
 
Unit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSUnit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJS
 
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma JavaScript Test-Driven Development with Jasmine 2.0 and Karma
JavaScript Test-Driven Development with Jasmine 2.0 and Karma
 
Intro to testing Javascript with jasmine
Intro to testing Javascript with jasmineIntro to testing Javascript with jasmine
Intro to testing Javascript with jasmine
 
Unit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and KarmaUnit testing in JavaScript with Jasmine and Karma
Unit testing in JavaScript with Jasmine and Karma
 
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and KarmaJavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
 
Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and Gulp
 
Angularjs - Unit testing introduction
Angularjs - Unit testing introductionAngularjs - Unit testing introduction
Angularjs - Unit testing introduction
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
Istanbul presentation
Istanbul presentationIstanbul presentation
Istanbul presentation
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 

Similaire à Developers Border Line: Unit Testing

Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Manual testing visonia
Manual testing   visoniaManual testing   visonia
Manual testing visoniaVisoniaTechlab
 
Testing Presentation
Testing PresentationTesting Presentation
Testing Presentationsureshpkumar
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSrikanth Krishnamoorthy
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
Different Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingDifferent Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingRachel Davis
 
Agile Engineering
Agile EngineeringAgile Engineering
Agile EngineeringJohn Lewis
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandDavid O'Dowd
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationBoris Dominic
 
Istqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparationIstqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparationKevalkumar Shah
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingAnna Russo
 
Manual testing interview questions
Manual testing interview questionsManual testing interview questions
Manual testing interview questionsBABAR MANZAR
 
DevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talkDevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talkD Z
 
Designing Self-maintaining UI Tests for Web Applications
Designing Self-maintaining UI Tests for Web ApplicationsDesigning Self-maintaining UI Tests for Web Applications
Designing Self-maintaining UI Tests for Web ApplicationsTechWell
 

Similaire à Developers Border Line: Unit Testing (20)

Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Manual testing visonia
Manual testing   visoniaManual testing   visonia
Manual testing visonia
 
Testing Presentation
Testing PresentationTesting Presentation
Testing Presentation
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By Srikanth
 
Automated tests
Automated testsAutomated tests
Automated tests
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Different Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application TestingDifferent Methodologies For Testing Web Application Testing
Different Methodologies For Testing Web Application Testing
 
Agile Engineering
Agile EngineeringAgile Engineering
Agile Engineering
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Istqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparationIstqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparation
 
Software test life cycle
Software test life cycleSoftware test life cycle
Software test life cycle
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
 
Manual testing interview questions
Manual testing interview questionsManual testing interview questions
Manual testing interview questions
 
DevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talkDevOps - Continuous Integration, Continuous Delivery - let's talk
DevOps - Continuous Integration, Continuous Delivery - let's talk
 
Designing Self-maintaining UI Tests for Web Applications
Designing Self-maintaining UI Tests for Web ApplicationsDesigning Self-maintaining UI Tests for Web Applications
Designing Self-maintaining UI Tests for Web Applications
 
Future of QA
Future of QAFuture of QA
Future of QA
 
Futureofqa
FutureofqaFutureofqa
Futureofqa
 

Dernier

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Developers Border Line: Unit Testing

  • 1. Developers Border Line: Unit Testing Muhammad Usman Shafqat SQA Engineer Confiz Solutions
  • 2. What do you guys think about Unit Testing?
  • 3. What Is Unit Testing?  Testing done by developers during and after code construction.  Could be of type: 1- White Box 2- Black Box
  • 4. More Explanation:  Unit testing is a development procedure where programmers create tests as they develop software.  The tests are simple short tests that test functionality of a particular unit or module of their code, such as a “class” or “function”.  Using open source libraries like cunit, cppunit and nunit (for C, C++ and C#) these tests can be automatically run and any problems found quickly.  As the tests are developed in parallel with the source code, when the particular unit is completed, a successful unit test demonstrates it's correctness.
  • 5. Why Unit Test?  Reveals bugs that may escape “black box” testing  Simplifies Integration  Facilitates Change  Documentation  Encourages good design, such as separation of interface from implementation
  • 6. Take a Better Approach
  • 7. Value of Unit Testing
  • 8. The Why, The What, The How It has to do with Quality!  Your software has to meet customer requirements  functional and non-functional requirements  How do you ensure that your software does what it should?
  • 9. The Why, The What, The How It has to do with Safety!  You often have to change your existing code because of new requirements, improvements, and bug fixes  How do you ensure, that your changed software still does what it did before?
  • 10. The Why, The What, The How It has to do with Sustainability!  You still have to fix bugs  How do you ensure, that a fixed bug never shows up again?
  • 11. The Why, The What, The How You have to show that  The product works as expected  But also its individual parts, like  services  components  classes  methods
  • 12. The Why, The What, The How  You can do this manually  Writing test specifications and protocols  Or (much better) automated  Let the system do it for you (at least part of it)
  • 13. Best Practices: Have a Process and Stick to It!  Have a process  Any process is better than none  Make sure it is not “shelfware”  ALL processes say you should unit test  (they’re just not that specific about how)  Developers should feel the process is helping, not hindering them  Managers should support the team and the process
  • 14. Best Practices: Test Early and Test Often  Consider writing the tests first (Test-Driven Development)  Start testing as soon as you start writing the code (if not before)  Make sure the tests are run frequently  The earlier you know about a problem the earlier you can fix it
  • 15. Best Practices: Refactor, Refactor, Refactor  Avoid complexity  Break large classes into smaller ones  Break large methods into smaller ones  Simplifying the code makes it easier to understand.
  • 16. Best Practices: Use “Extreme Feedback”  Try to fix bugs as soon as they are identified  If not possible, make a plan for when to fix  “Don’t live with Broken Windows”  If you can’t measure you can’t manage it  If you can’t manage it, you can’t improve it
  • 17. Web UI issue - screen 1 Issue: Menu’s are Not displayed in single line and Text is displayed out of Banner. Mockup Screen is at Next Slide…
  • 19. Web UI issue - screen 2 Issue: Text missing from highlighted area. Mockup Screen is at Next Slide…
  • 21. Web UI issue – screen 3 Issue: Twitter icon and Footer links are Not displayed. Mockup Screen is at Next Slide…
  • 23. Cross Browser Issue: TinyMCE Editor is Not displayed correctly in IE, working fine in others.
  • 24. Mobile App UI issue 1 Issue: First Alphabet is Not capital in “Cancel” button text.
  • 25. Mobile App UI issue 2 Issue: Text alignment is Not correct with screen.
  • 26. Mobile App UI issue 3 Issue: Buttons are Not Centrally aligned with Screen.
  • 27. Enhancement Unit Testing Issue Enhancement: Display company introduction video at Job Board. Issue: Video is displayed but other sections that were visible before this change are Not visible now. See the Job Board screen before this change on Next Slide…
  • 28. Job Board Screen before Change
  • 29. Unit Testing Checklists (Mobile App & Website)
  • 30. Unit Testing Checklist - Mobile Application (I-Phone/I-Pod Devices, Android Device, Windows Phone, Blackberry, Symbian OS) Generic Testing: Yes No N/A Does the page layout consistent from page to page according to the mockups/PSDs? Functional Testing: Does App Installation & Un-installation working correctly? GUI & Usability Testing: Navigation to Screens working fine? Page Scrolling working fine? Compliance/Compatibility Testing: Verify the Behavior of Mobile App in Low resources (Memory/Space)? Web Services/Backend Testing: Connection with DB is made successfully through web service? Data successfully Posted through web services? See the full checklist available at below Engineering Wiki link: https://sites.google.com/a/confiz.com/software-engineering/guides/unit-test-check-list?pli=1
  • 31. Unit Testing Checklist - Website Generic Testing: Yes No N/A Does the page layout consistent from page to page according to the mockups/PSDs? Functional Testing: Check that all the links under Main Menu’s are working properly? Check that all the Header or Footer links are working properly? GUI & Usability Testing: Does all text properly aligned? Does all graphics properly aligned? Compliance/Compatibility Testing: Does all supported browsers been tested? Does the HTML version being used compatible with appropriate browser versions? Web Services/Backend Testing: Connection with DB is made successfully through web service? See the full checklist available at below Engineering Wiki link: https://sites.google.com/a/confiz.com/software-engineering/guides/unit-test-check-list?pli=1
  • 32. References:  http://rollerjm.free.fr/pro/junit/3.htm  http://en.wikipedia.org/wiki/Unit_testing  http://www.developertesting.com/  http://cplus.about.com/od/glossar1/g/unittesting.htm  http://www.scribd.com/doc/84614135/05-unittesting  http://ebookbrowse.com/unit-testing-nz-jug-presentation-pdf-d274895477