SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
<Insert Picture Here>




How the Oracle JDeveloper Team Test JDeveloper
Gerard Davison : Senior Principle Software Engineer
Geoff Waymark : Principal QA Engineer
Presentation Agenda


•   Introduction      <Insert Picture Here>

•   Automation
•   Tools
•   Abbot
•   Selenium
•   Conclusion
<Insert Picture Here>



Introduction
Introduction


• Admission
  – We are not testing saints
  – We do not have 100% code coverage
  – We probably never will

• But
  – We have tried and succeeded in testing the ‘hard bits’
  – We have learned some lessons
  – Turns out a little can go a long way
Introduction


• JDeveloper
  – We have everything from Swing to Excel
     • Our focus is on the Java parts today
  – We tend to be using technologies before you
     • We create some of the technology
     • This means we are ahead of test tools
  – JDeveloper 8mloc in 35k source files over 650 modules
     • 4 continents, at least 6 versions of English
  – Two builds
     • Sanity – verify no broken code
     • Nightly - full release build ready for a customer
<Insert Picture Here>

                                                 Building
                                     Sir Winston Churchill


                        “To build may have to be the slow and
                        laborious task of years. To destroy can
                        be the thoughtless act of a single day ”
Introduction -Terminology


• Unit testing
  – The testing the Java Classes directly
• Integration testing
  – Testing it all working together
• Automation
  – Making it all work whilst you are in bed / lunch / pub
• Poking tooling
  – Pretending to be you whilst you are in bed / lunch / pub
<Insert Picture Here>



Automation
Automation




             What to automate?
                 The big question
What to automate?


• What is it for?
  – Cost saving
     • Humans - expensive, quite squishy – not entirely reliable
     • Machines - comparatively cheap, don’t get bored
  – Build verification
     • Is today's build worse than yesterdays?
  – Ready to use
     • Most worn path works
     • What would have to work to demo to your boss works
  – Dull things
  – Performance
What to automate?


• Where to begin?
  – Fit to test / DFT
     • Earlier rather than later
     • Handover automation from Dev to QA
         – Unit testing
         – Smoke testing with poking tools
• When to begin?
  – Unit testing, straight away, if not sooner
  – Integration testing takes place later in the cycle
     • Less code churn
     • Fewer UI quakes
What to automate?


• What type of Automation?
  – Unit testing – can only take you so far
     • Verifies that what the developer thinks should happen
       happens
  – Integration testing – better, but you need more complicated
    tools
     • Verifies that what the rest of the tool thinks should happen
       happens
How do we automate?


• Calling Java APIs
  – Unit testing - in complicated situations it can be hard to set up
    an environment.
  – Often requires mock objects as things rarely work in isolation
• Using a Poking tool
  –   Control swing using a java.awt.Robot based tool
  –   Running a HTML based service from a web browser
  –   Likely native to the OS
  –   Better representation of what the user will actually see
What to automate?


• How much Automation?
  – Build verification is limited by the time it takes between builds

  – Use code coverage to meet a set value
     • Lines in the sand are easy to measure
        – Less value than you’d think early on.

  – Less is more
     • Don’t have more results than you can analyze
     • Can you fix the tests In good time if they break
<Insert Picture Here>



Tools
Build tooling


• Build tools
  – Needs to
     • run automatically
        – Generally as a result of SCM operation
     • notify you when something goes wrong
        – SMS alerts and the like*
     • provide nice reporting, rss feeds and the like
     • be beneficial for the developer


                                  * Important for “Testing whilst at the pub”
Build tooling


• Build tools
  – We have lots of custom code built up over years
  – Get an answer as quickly as possible
     • Sanity builds
     • Run tests in parallel


   Build 1S     Build 1N    Build 2S

                SRG 1S       SRG 1N      SRG 2S

                             LRG 1N
Build tooling


• Cruise Control
  – Ant wrapper
  – Email notification
• Hudson
  – Lots of web 2.x UI
  – Using Webstart you can add machine to build environment
     • Useful if you have many time zones
• cron or Windows scheduler
  – Not really a build tool but can assist
<Insert Picture Here>

                                               Consistency
                                                 A. Huxley


                         “Consistency is contrary to nature,
                        contrary to life. The only completely
                          consistent people are the dead..”
Automation Environment


• Work on a Dev machine the same as on the
  Automated test machine
• Make sure your test environment runs on all platforms
  – We have to hand test on a Mac still
• Just like Java - write once, debug everywhere
  – Platform specifics like file separators, install locations
• Select which browsers you want to run in
  – Firefox, IE, Chrome? What version?
• Size is important - what display size should you run
  your tests in?
  – Do you have a minimum display size for your app
Automation Environment


• Quick set ups
   – Don’t want to test the setup 100 times
      • We use zips to store project context
      • Start tool and run inside rather than once for
         each test
• Collect forensics
   – Make a copy of the logs - ideally for each test
   – If doing UI testing, take a picture when it fails
• Keep developers happy
   – It you don’t make it easy tests won’t get run
   – Assign someone smart to set this up.
Testing Tools Environment


• Integration testing gets asynchronous real quick,
   – Harder than nice linear JUnit testing
   – “Wait don’t delay”
   – Make sure your testing tool understands this
     otherwise find a new one
Testing Tools Environment
Other tools worth mentioning


• Free
   – FEST
   – JFCUnit
   – HtmlUnit
   – WebTest
• Expensive
   – WinRunner
   – SilkTest
   – QTP
<Insert Picture Here>



Abbot
Abbot


• Automation of Swing using java.awt.Robot
  – Also SWT version, not used it though
• Provides a Java API
• We use the ability to record and playback xml scripts
  – Reduces the skill level required to create a test
• Is extensible so can handle custom components
• Gerard is a committer so we can fix and extended
  where necessary
Costello


• Watches that you are doing
• Record actions steps
• Creates references to components
  – Not brittle, will survive UI code changing
• UI a little bit special
• Does the job, can be a lot quicker than writing code
• You have to do some tidying up later though
Integration into JDeveloper


• Invoke tests / Costello inside of JDeveloper
  – For faster turnaround
• Can invoke tests from command line
• Some small tweaks to make Costello work better
  – Integration with our source control system
  – Better default scripts
<Insert Picture Here>



Abbot Demo
Abbot tips


• Use the “Name” property to distinguish similar
  components
• Wait don’t delay
  – Ignore progress bars, test for something more reliable
• Run tests in “read-only” displays
  – VNC useful for this on Unix
  – Fast user switching for the same effect on Macs
  – Windows users just have to go for a cup of tea
• Disable all popup notification
  – Nothing more annoying than an IM ruining your test run
  – Screensavers are great but won’t help the tests
• Don’t record mouse movements, wont run again
Abbot tips


• Call
  – Invoke static Java methods
• Script
  – Run BeanShell script
Abbot in JDeveloper facts and figures


• An example
  – DB team (Our best team – test coverage speaking)
     • Connections = 70% code coverage (block)
     • Modeller = 68% code coverage (block)
     • 86 Abbot tests
     • 889 JUnit tests
     • 40% coverage is JUnit on it’s own
     • Abbot on its own would also be 40% showing the
       intersection of the tests
<Insert Picture Here>



Selenium
Selenium


• Suite of tools

  – Remote Control
     • Integrates tests with your build

  – IDE
     • Exclusive to Firefox

  – Grid
     • Not used by Oracle
        – We have an internal tool that predates Grid
Selenium Remote Control


• Comes in two parts

  – Server
     • Starts and stops the target browser
     • Acts as an http proxy for requests
     • Also includes the selenium core

  – Client libraries
     • Client libraries for your favourite language
     • Flexible

  – Integrates nicely with existing reports JUnit,etc…
Selenium IDE


• Creates tests
  – Extension to Firefox

  – Simple to use
     • Record and playback
     • Insertion for hand coding
     • Looks like a nicer Costello

  – Save tests in your preferred language
     • HTML – {Default}
     • Java – Good for us!
     • C# ,Ruby ,PHP ,Python ,Perl – Good for everybody
<Insert Picture Here>



Selenium Demo
Selenium tips


• Maximize your browser

• Has to be verification for any action performed
  – If you clicked a button, what did it do?

• Assertions should have meaningful messages

• Document the test
  – Clearer for everybody
  – Test spec
  – JavaDoc for Java
Selenium tips


• Limited to the DOM tree
  – Stylesheet or Style classes are not inherently testable

• Use clear ID’s
  – ‘table1:0:openPopup’ is better than ‘table1:0:link1’

• Improve your test to get more from it
  – Refactor IDE recorded tests
     • Reliability
     • Internationalization
     • Data driven tests
<Insert Picture Here>



Conclusion
Conclusion


• Automated tests

  – Have some – it helps

  – Not too much though – it takes time

  – Build and Test – have to be linked

  – Development and QA in partnership
For More Information




• Abbot
  – http://abbot.sourceforge.net/
• Selenium
  – http://selenium.seleniumhq.org/


• Your speakers
  – gerard.davison@oracle.com
     • http://kingsfleet.blogspot.com/
  – geoff.waymark@oracle.com

Contenu connexe

Tendances

Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Hendrik Ebbers
 
Das Frontend richtig Testen – mit Jest @Developer Week 2018
Das Frontend richtig Testen – mit Jest @Developer Week 2018Das Frontend richtig Testen – mit Jest @Developer Week 2018
Das Frontend richtig Testen – mit Jest @Developer Week 2018Holger Grosse-Plankermann
 
Drupalcamp Simpletest
Drupalcamp SimpletestDrupalcamp Simpletest
Drupalcamp Simpletestlyricnz
 
Designing Top-Class Test Suites for Web Applications
Designing Top-Class Test Suites for Web ApplicationsDesigning Top-Class Test Suites for Web Applications
Designing Top-Class Test Suites for Web ApplicationsLukáš Fryč
 
Continuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two ApproachesContinuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two ApproachesRoss Snyder
 
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWJest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWHolger Grosse-Plankermann
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End TestsSriram Angajala
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016Gavin Pickin
 
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Lorenzo Barbieri
 
Capybara testing
Capybara testingCapybara testing
Capybara testingFutureworkz
 
JavaScript Timers, Power Consumption, and Performance
JavaScript Timers, Power Consumption, and PerformanceJavaScript Timers, Power Consumption, and Performance
JavaScript Timers, Power Consumption, and PerformanceNicholas Zakas
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable productJulian Simpson
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Fwdays
 
Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012Neeme Praks
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureSimon Willison
 
The bugfix confirmation loop - PyConFI 2013
The bugfix confirmation loop - PyConFI 2013The bugfix confirmation loop - PyConFI 2013
The bugfix confirmation loop - PyConFI 2013Niklas Närhinen
 
Salt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannonSalt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannonWilliam Cannon
 

Tendances (20)

Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Das Frontend richtig Testen – mit Jest @Developer Week 2018
Das Frontend richtig Testen – mit Jest @Developer Week 2018Das Frontend richtig Testen – mit Jest @Developer Week 2018
Das Frontend richtig Testen – mit Jest @Developer Week 2018
 
Drupalcamp Simpletest
Drupalcamp SimpletestDrupalcamp Simpletest
Drupalcamp Simpletest
 
Designing Top-Class Test Suites for Web Applications
Designing Top-Class Test Suites for Web ApplicationsDesigning Top-Class Test Suites for Web Applications
Designing Top-Class Test Suites for Web Applications
 
Continuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two ApproachesContinuous Deployment at Etsy: A Tale of Two Approaches
Continuous Deployment at Etsy: A Tale of Two Approaches
 
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWJest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRW
 
Rebooting a Cloud
Rebooting a CloudRebooting a Cloud
Rebooting a Cloud
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End Tests
 
Automate Thyself
Automate ThyselfAutomate Thyself
Automate Thyself
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
 
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
 
Capybara testing
Capybara testingCapybara testing
Capybara testing
 
JavaScript Timers, Power Consumption, and Performance
JavaScript Timers, Power Consumption, and PerformanceJavaScript Timers, Power Consumption, and Performance
JavaScript Timers, Power Consumption, and Performance
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"
 
Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012Pragmatic Continuous Delivery - ReaktorDevDay 2012
Pragmatic Continuous Delivery - ReaktorDevDay 2012
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
The bugfix confirmation loop - PyConFI 2013
The bugfix confirmation loop - PyConFI 2013The bugfix confirmation loop - PyConFI 2013
The bugfix confirmation loop - PyConFI 2013
 
Salt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannonSalt conf15 presentation-william-cannon
Salt conf15 presentation-william-cannon
 

Similaire à How the JDeveloper team test JDeveloper at UKOUG'08

Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsGanesh Samarthyam
 
Scripting Recipes for Testers
Scripting Recipes for TestersScripting Recipes for Testers
Scripting Recipes for TestersAdam Goucher
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And MavenPerconaPerformance
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl UniMatthew Landauer
 
Static Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech FestStatic Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech FestDenim Group
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorialoscon2007
 
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityHigh-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityAtlassian
 
Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)Arto Santala
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static AnalysisConSanFrancisco123
 
PHX Session #1: Development Best Practices And How Microsoft Helps
PHX Session #1: Development  Best  Practices And  How  Microsoft  HelpsPHX Session #1: Development  Best  Practices And  How  Microsoft  Helps
PHX Session #1: Development Best Practices And How Microsoft HelpsSteve Lange
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Libraryjeresig
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Appsadunne
 
Test Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebTest Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebStefano Rodighiero
 
Agile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic QualityAgile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic QualityDemetrius Nunes
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Atlassian
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureDiUS
 
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and BeyondWebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyondmguillem
 

Similaire à How the JDeveloper team test JDeveloper at UKOUG'08 (20)

Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
 
Scripting Recipes for Testers
Scripting Recipes for TestersScripting Recipes for Testers
Scripting Recipes for Testers
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl Uni
 
Static Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech FestStatic Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech Fest
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code QualityHigh-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
High-Octane Dev Teams: Three Things You Can Do To Improve Code Quality
 
Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)
 
Continuous integration (eng)
Continuous integration (eng)Continuous integration (eng)
Continuous integration (eng)
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static Analysis
 
PHX Session #1: Development Best Practices And How Microsoft Helps
PHX Session #1: Development  Best  Practices And  How  Microsoft  HelpsPHX Session #1: Development  Best  Practices And  How  Microsoft  Helps
PHX Session #1: Development Best Practices And How Microsoft Helps
 
Test
TestTest
Test
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Apps
 
Test Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebTest Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni Web
 
Agile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic QualityAgile Software Development with Intrinsic Quality
Agile Software Development with Intrinsic Quality
 
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
Peer Code Review: In a Nutshell and The Tantric Team: Getting Your Automated ...
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failure
 
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and BeyondWebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
 

Dernier

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Dernier (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

How the JDeveloper team test JDeveloper at UKOUG'08

  • 1.
  • 2. <Insert Picture Here> How the Oracle JDeveloper Team Test JDeveloper Gerard Davison : Senior Principle Software Engineer Geoff Waymark : Principal QA Engineer
  • 3. Presentation Agenda • Introduction <Insert Picture Here> • Automation • Tools • Abbot • Selenium • Conclusion
  • 5. Introduction • Admission – We are not testing saints – We do not have 100% code coverage – We probably never will • But – We have tried and succeeded in testing the ‘hard bits’ – We have learned some lessons – Turns out a little can go a long way
  • 6. Introduction • JDeveloper – We have everything from Swing to Excel • Our focus is on the Java parts today – We tend to be using technologies before you • We create some of the technology • This means we are ahead of test tools – JDeveloper 8mloc in 35k source files over 650 modules • 4 continents, at least 6 versions of English – Two builds • Sanity – verify no broken code • Nightly - full release build ready for a customer
  • 7. <Insert Picture Here> Building Sir Winston Churchill “To build may have to be the slow and laborious task of years. To destroy can be the thoughtless act of a single day ”
  • 8. Introduction -Terminology • Unit testing – The testing the Java Classes directly • Integration testing – Testing it all working together • Automation – Making it all work whilst you are in bed / lunch / pub • Poking tooling – Pretending to be you whilst you are in bed / lunch / pub
  • 10. Automation What to automate? The big question
  • 11. What to automate? • What is it for? – Cost saving • Humans - expensive, quite squishy – not entirely reliable • Machines - comparatively cheap, don’t get bored – Build verification • Is today's build worse than yesterdays? – Ready to use • Most worn path works • What would have to work to demo to your boss works – Dull things – Performance
  • 12. What to automate? • Where to begin? – Fit to test / DFT • Earlier rather than later • Handover automation from Dev to QA – Unit testing – Smoke testing with poking tools • When to begin? – Unit testing, straight away, if not sooner – Integration testing takes place later in the cycle • Less code churn • Fewer UI quakes
  • 13. What to automate? • What type of Automation? – Unit testing – can only take you so far • Verifies that what the developer thinks should happen happens – Integration testing – better, but you need more complicated tools • Verifies that what the rest of the tool thinks should happen happens
  • 14. How do we automate? • Calling Java APIs – Unit testing - in complicated situations it can be hard to set up an environment. – Often requires mock objects as things rarely work in isolation • Using a Poking tool – Control swing using a java.awt.Robot based tool – Running a HTML based service from a web browser – Likely native to the OS – Better representation of what the user will actually see
  • 15. What to automate? • How much Automation? – Build verification is limited by the time it takes between builds – Use code coverage to meet a set value • Lines in the sand are easy to measure – Less value than you’d think early on. – Less is more • Don’t have more results than you can analyze • Can you fix the tests In good time if they break
  • 17. Build tooling • Build tools – Needs to • run automatically – Generally as a result of SCM operation • notify you when something goes wrong – SMS alerts and the like* • provide nice reporting, rss feeds and the like • be beneficial for the developer * Important for “Testing whilst at the pub”
  • 18. Build tooling • Build tools – We have lots of custom code built up over years – Get an answer as quickly as possible • Sanity builds • Run tests in parallel Build 1S Build 1N Build 2S SRG 1S SRG 1N SRG 2S LRG 1N
  • 19. Build tooling • Cruise Control – Ant wrapper – Email notification • Hudson – Lots of web 2.x UI – Using Webstart you can add machine to build environment • Useful if you have many time zones • cron or Windows scheduler – Not really a build tool but can assist
  • 20. <Insert Picture Here> Consistency A. Huxley “Consistency is contrary to nature, contrary to life. The only completely consistent people are the dead..”
  • 21. Automation Environment • Work on a Dev machine the same as on the Automated test machine • Make sure your test environment runs on all platforms – We have to hand test on a Mac still • Just like Java - write once, debug everywhere – Platform specifics like file separators, install locations • Select which browsers you want to run in – Firefox, IE, Chrome? What version? • Size is important - what display size should you run your tests in? – Do you have a minimum display size for your app
  • 22. Automation Environment • Quick set ups – Don’t want to test the setup 100 times • We use zips to store project context • Start tool and run inside rather than once for each test • Collect forensics – Make a copy of the logs - ideally for each test – If doing UI testing, take a picture when it fails • Keep developers happy – It you don’t make it easy tests won’t get run – Assign someone smart to set this up.
  • 23. Testing Tools Environment • Integration testing gets asynchronous real quick, – Harder than nice linear JUnit testing – “Wait don’t delay” – Make sure your testing tool understands this otherwise find a new one
  • 25. Other tools worth mentioning • Free – FEST – JFCUnit – HtmlUnit – WebTest • Expensive – WinRunner – SilkTest – QTP
  • 27. Abbot • Automation of Swing using java.awt.Robot – Also SWT version, not used it though • Provides a Java API • We use the ability to record and playback xml scripts – Reduces the skill level required to create a test • Is extensible so can handle custom components • Gerard is a committer so we can fix and extended where necessary
  • 28. Costello • Watches that you are doing • Record actions steps • Creates references to components – Not brittle, will survive UI code changing • UI a little bit special • Does the job, can be a lot quicker than writing code • You have to do some tidying up later though
  • 29. Integration into JDeveloper • Invoke tests / Costello inside of JDeveloper – For faster turnaround • Can invoke tests from command line • Some small tweaks to make Costello work better – Integration with our source control system – Better default scripts
  • 31. Abbot tips • Use the “Name” property to distinguish similar components • Wait don’t delay – Ignore progress bars, test for something more reliable • Run tests in “read-only” displays – VNC useful for this on Unix – Fast user switching for the same effect on Macs – Windows users just have to go for a cup of tea • Disable all popup notification – Nothing more annoying than an IM ruining your test run – Screensavers are great but won’t help the tests • Don’t record mouse movements, wont run again
  • 32. Abbot tips • Call – Invoke static Java methods • Script – Run BeanShell script
  • 33. Abbot in JDeveloper facts and figures • An example – DB team (Our best team – test coverage speaking) • Connections = 70% code coverage (block) • Modeller = 68% code coverage (block) • 86 Abbot tests • 889 JUnit tests • 40% coverage is JUnit on it’s own • Abbot on its own would also be 40% showing the intersection of the tests
  • 35. Selenium • Suite of tools – Remote Control • Integrates tests with your build – IDE • Exclusive to Firefox – Grid • Not used by Oracle – We have an internal tool that predates Grid
  • 36. Selenium Remote Control • Comes in two parts – Server • Starts and stops the target browser • Acts as an http proxy for requests • Also includes the selenium core – Client libraries • Client libraries for your favourite language • Flexible – Integrates nicely with existing reports JUnit,etc…
  • 37. Selenium IDE • Creates tests – Extension to Firefox – Simple to use • Record and playback • Insertion for hand coding • Looks like a nicer Costello – Save tests in your preferred language • HTML – {Default} • Java – Good for us! • C# ,Ruby ,PHP ,Python ,Perl – Good for everybody
  • 39. Selenium tips • Maximize your browser • Has to be verification for any action performed – If you clicked a button, what did it do? • Assertions should have meaningful messages • Document the test – Clearer for everybody – Test spec – JavaDoc for Java
  • 40. Selenium tips • Limited to the DOM tree – Stylesheet or Style classes are not inherently testable • Use clear ID’s – ‘table1:0:openPopup’ is better than ‘table1:0:link1’ • Improve your test to get more from it – Refactor IDE recorded tests • Reliability • Internationalization • Data driven tests
  • 42. Conclusion • Automated tests – Have some – it helps – Not too much though – it takes time – Build and Test – have to be linked – Development and QA in partnership
  • 43. For More Information • Abbot – http://abbot.sourceforge.net/ • Selenium – http://selenium.seleniumhq.org/ • Your speakers – gerard.davison@oracle.com • http://kingsfleet.blogspot.com/ – geoff.waymark@oracle.com