SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Agile Java Testing With 
    Open Source Frameworks

      Presented by Mr. Viraf Karai
              **********



                    on Wed. Feb. 25, 2009




                                            1
Summary of this talk
    Why test                  Why test frameworks 
                         



    Why automate tests        Unit test frameworks
                         



    Kinds of tests            Integ test frameworks
                         



    When do you test          Load/perf  test 
                         


                              frameworks
    Unit testing



                              Other tools (CI)
                          
    Integration testing



                              Resources
                          
    Acceptance testing





                                                      2
Why test ?
    To ensure that the product satisfies all use­



    cases/user­stories
    To gain confidence in your product's abilities




    To learn about the behavior of your product




    To deliver a quality product to your customer




    To fulfil a binding contract with the govt/military





                                                          3
A quote on testing
    Perhaps one day, writing code without tests will be 



    considered as professionally irresponsible as 
    constructing a bridge without performing a 
    structural analysis.                                               
    Brian Goetz  (JVM and concurrency guru)                 
         author of  Java Concurrency In Practice. 




                                                                     4
Why automate tests ?
    Humans are error­prone by nature




    Automated tests 



        Save time
    ●



        Consume minimal resources on beefy hardware
    ●


        Remove the drudgery from repetitive tasks
    ●


        Can be run frequently
    ●


        Are highly effective with continuous integration
    ●




                                                           5
Kinds of tests
    Typically the following tests are done



        Unit testing – development
    ●


        Integration testing – development 
    ●


        Functional testing (includes load/perf testing) – QA
    ●


        Acceptance testing – customers / product manager
    ●




                                                               6
When do you test ?
    Agile shops are increasingly embracing TDD




    Testing is a 1st class activity and should never be 



    done as an afterthought
    Unit testing  ­ while developing code




    Integration testing – while and after developing code




    Functional testing – by QA after code complete




    Load/perf testing – by QA after code compelete




    Acceptance testing – by customers after QA is done




                                                           7
Unit testing
    Always done by developers




    In a TDD environment, tests are written before 



    writing code
    TDD forces you to make your code testable and can 



    result in very clean design if done right
    Code shouldn't be checked in without passing tests.




    Run by developers before code check­in and by CI 



    system periodically (Daily / after code check­ins)

                                                          8
Integration testing
    Ideally done by both dvlp and QA (separately)




    Involves more big­picture tests




    Focus is on collaboration of a number of objects




    Fixtures to set up are more complex than unit tests




    Typically touches aspects such as network (http, ftp, 



    smtp) and database interactions




                                                          9
Acceptance testing
    Tests used to help define when a user story is done




    Done every iteration and derived from user stories




    A story isn't complete until all acceptance tests pass




    Big bang acceptance testing occurs after code­



    complete and test­complete
    Onus is on customer/product manager to verify 



    correctness of acceptance tests
    Automation of acceptance tests is strongly desired





                                                             10
Why use test frameworks ?
    Absolutely mainstream in agile environments




    Used by developers, QA and customers




    Used to test all tiers of an enterprise app




    Usually involves a learning curve – nothing is free




    ROI can be substantial once mastered




    Excellent way to achieve automation




    Tests almost always experience a faster turnaround





                                                          11
Unit test frameworks
    Junit 4.x* – unit test Java classes and interfaces




    TestNG* – unit test Java classes and interfaces




    EasyMock ­ provides mock objects for interfaces in 



    JUnit/TestNG tests by generating objects on the fly
    Both* heavily leverage Java5 annotations




    Both* are supported by Java IDEs: IntelliJ, Eclipse




    Both* are supported by build tools: Maven, Ant




    Both* generate reports about failed tests & coverage





                                                          12
Integration test frameworks
    DbUnit – used to test your persistence tier




    XmlUnit – used to compare 2 XML documents




    HttpUnit – used to interact with your webapp and 



    test forms, tables, links, etc.
    Junit/TestNG with MockHttpServletRequest and 



    MockHttpServletResponse (Spring Framework) to 
    test your servlets



                                                        13
Integration test frameworks (cont'd)
    Cactus – tests server components e.g. Servlets, 



    EJBs, servlet filters, JSP taglibs, etc.
    SoapUI ­ inspect, invoke and test web services over 



    HTTP (supported cleanly in Eclipse and IntelliJ)




                                                       14
Functional test frameworks
    Abbot, JFCUnit, Marathon – Swing func test tools




    Selenium – advanced tool to test your web app – 



    record, playback and run tests on a large grid. 
    Supports Java, Ruby, Python, Perl, PHP
    JWebUnit – works with HtmlUnit and Selenium to 



    navigate your web app and verify correctness
    Canoo WebTest – similar to JWebUnit – write rules 



    (tests) as Ant tasks or Groovy unit tests


                                                       15
Load / perf test frameworks
    LoadRunner ($) ­ generates load for back­end 



    servers by emulating user requests
    The Grinder – load test HTTP web servers, SOAP 



    and REST web services. Uses Jython for test scripts.
    JUnitPerf – load and perf testing with Junit




    TestNG – has annotations to give you control over # 



    concurrent requests and # threads e.g. 
    @Test(invocationCount = 100, threadPoolSize = 10


                                                       16
Acceptance test frameworks
    Fit, FitNesse




    Concordion 




    Exactor





                                     17
Other tools (continuous integration)
    Consider using a separate build and continuous 



    integration (CI) server
    Will quickly generate failed test reports with each 



    run. Developers should respond quickly
    Hook up CI server with CM system (CVS / SVN) 



    and set up build times (daily / after each checkin)
    Popular CI tools are Hudson, Continuum, Luntbuild, 



    CruiseControl, TeamCity ($)


                                                           18
Resources (web)
    http://www.ambysoft.com 



    http://www.martinfowler.com 




    http://www.opensourcetesting.org/unit_java.php




    http://www.onjava.com



    http://www.ibm.com/developerworks




    http://www.javaworld.com 




    http://www.parleys.com (MM)



    http://developers.sun.com/learning/javaoneonline (MM)





                                                            19
Resources (books)
    JUnit Recipes by J B Rainsberger 




    Test Driven (Practical TDD.....) by Lasse Koskela




    Next Generation Java Testing by Cedric Beust




    xUnit Test Patterns by Gerard Meszaros




    The Art Of Agile Development by James Shore et al





                                                        20

Más contenido relacionado

La actualidad más candente

Next Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AINext Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AIAnand Bagmar
 
London SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error HandlingLondon SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error HandlingRichard Clark
 
Don't hate, automate. lessons learned from implementing continuous delivery
Don't hate, automate. lessons learned from implementing continuous deliveryDon't hate, automate. lessons learned from implementing continuous delivery
Don't hate, automate. lessons learned from implementing continuous deliverySolano Labs
 
Oracle Forms Performance Testing PushToTest TestMaker JAT
Oracle Forms Performance Testing PushToTest TestMaker JATOracle Forms Performance Testing PushToTest TestMaker JAT
Oracle Forms Performance Testing PushToTest TestMaker JATClever Moe
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Codescidept
 
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialSelenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialAlan Richardson
 
Visual AI Testing Using Applitools
Visual AI Testing Using ApplitoolsVisual AI Testing Using Applitools
Visual AI Testing Using ApplitoolsMikhail Laptev
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance TestingAnand Bagmar
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008rajivmordani
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Anand Bagmar
 
Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)Anand Bagmar
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Skills Matter
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 
[MOPCON2018] Effectively shrink ProGuard rules for reducing APK size
[MOPCON2018] Effectively shrink ProGuard rules for reducing APK size[MOPCON2018] Effectively shrink ProGuard rules for reducing APK size
[MOPCON2018] Effectively shrink ProGuard rules for reducing APK sizeAnsgar Lin
 
Developer Tests - Things to Know
Developer Tests - Things to KnowDeveloper Tests - Things to Know
Developer Tests - Things to KnowVaidas Pilkauskas
 
Measuring Coverage From E2E Tests
Measuring Coverage From E2E TestsMeasuring Coverage From E2E Tests
Measuring Coverage From E2E TestsAnand Bagmar
 
E xtreme programming for etl and data analytics final
E xtreme programming for etl and data analytics finalE xtreme programming for etl and data analytics final
E xtreme programming for etl and data analytics finalPrafulla Girgaonkar
 
SVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxSVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxPeter White
 
Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Steven Smith
 
Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Alan Richardson
 

La actualidad más candente (20)

Next Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AINext Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AI
 
London SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error HandlingLondon SF Developers: Custom Lightning Component Error Handling
London SF Developers: Custom Lightning Component Error Handling
 
Don't hate, automate. lessons learned from implementing continuous delivery
Don't hate, automate. lessons learned from implementing continuous deliveryDon't hate, automate. lessons learned from implementing continuous delivery
Don't hate, automate. lessons learned from implementing continuous delivery
 
Oracle Forms Performance Testing PushToTest TestMaker JAT
Oracle Forms Performance Testing PushToTest TestMaker JATOracle Forms Performance Testing PushToTest TestMaker JAT
Oracle Forms Performance Testing PushToTest TestMaker JAT
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialSelenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver Tutorial
 
Visual AI Testing Using Applitools
Visual AI Testing Using ApplitoolsVisual AI Testing Using Applitools
Visual AI Testing Using Applitools
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021
 
Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
[MOPCON2018] Effectively shrink ProGuard rules for reducing APK size
[MOPCON2018] Effectively shrink ProGuard rules for reducing APK size[MOPCON2018] Effectively shrink ProGuard rules for reducing APK size
[MOPCON2018] Effectively shrink ProGuard rules for reducing APK size
 
Developer Tests - Things to Know
Developer Tests - Things to KnowDeveloper Tests - Things to Know
Developer Tests - Things to Know
 
Measuring Coverage From E2E Tests
Measuring Coverage From E2E TestsMeasuring Coverage From E2E Tests
Measuring Coverage From E2E Tests
 
E xtreme programming for etl and data analytics final
E xtreme programming for etl and data analytics finalE xtreme programming for etl and data analytics final
E xtreme programming for etl and data analytics final
 
SVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ BoxSVCC 2011 - 0 - 60: QA Automation @ Box
SVCC 2011 - 0 - 60: QA Automation @ Box
 
Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016Improving the Quality of Existing Software - DevIntersection April 2016
Improving the Quality of Existing Software - DevIntersection April 2016
 
Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014
 

Destacado

Just Java2007 - Daniel Wildt - Tools For Java Test Automation
Just Java2007 - Daniel Wildt - Tools For Java Test AutomationJust Java2007 - Daniel Wildt - Tools For Java Test Automation
Just Java2007 - Daniel Wildt - Tools For Java Test AutomationDaniel Wildt
 
Java Course 6: Introduction to Agile
Java Course 6: Introduction to AgileJava Course 6: Introduction to Agile
Java Course 6: Introduction to AgileAnton Keks
 
Presentation on automation
Presentation on automationPresentation on automation
Presentation on automationRangachary1222
 
Pragmatic Java Test Automation
Pragmatic Java Test AutomationPragmatic Java Test Automation
Pragmatic Java Test AutomationDmitry Buzdin
 
Big data in transport an international transport forum overview oct 2013
Big data in transport    an international transport forum overview oct 2013Big data in transport    an international transport forum overview oct 2013
Big data in transport an international transport forum overview oct 2013OpenSkyData
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8Simon Ritter
 

Destacado (7)

Just Java2007 - Daniel Wildt - Tools For Java Test Automation
Just Java2007 - Daniel Wildt - Tools For Java Test AutomationJust Java2007 - Daniel Wildt - Tools For Java Test Automation
Just Java2007 - Daniel Wildt - Tools For Java Test Automation
 
Java Course 6: Introduction to Agile
Java Course 6: Introduction to AgileJava Course 6: Introduction to Agile
Java Course 6: Introduction to Agile
 
PPT on JAVA
PPT  on JAVA PPT  on JAVA
PPT on JAVA
 
Presentation on automation
Presentation on automationPresentation on automation
Presentation on automation
 
Pragmatic Java Test Automation
Pragmatic Java Test AutomationPragmatic Java Test Automation
Pragmatic Java Test Automation
 
Big data in transport an international transport forum overview oct 2013
Big data in transport    an international transport forum overview oct 2013Big data in transport    an international transport forum overview oct 2013
Big data in transport an international transport forum overview oct 2013
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
 

Similar a Agile Java Testing With Open Source Frameworks

Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsSOASTA
 
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?TechWell
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsSOASTA
 
DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?Michael Elder
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianReza Rahman
 
2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the Trenches2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the TrenchesNicolas Fränkel
 
Agile Testing 2020
Agile Testing 2020Agile Testing 2020
Agile Testing 2020arzu TR
 
Hands On with Selenium and WebDriver
Hands On with Selenium and WebDriverHands On with Selenium and WebDriver
Hands On with Selenium and WebDriverTechWell
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsAbhijeet Vaikar
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern MethodologyEthan Jewett
 
Automate your way to agility
Automate your way to agilityAutomate your way to agility
Automate your way to agilityYuval Yeret
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven DevelopmentViraf Karai
 
open sta testing Certification
open sta testing Certificationopen sta testing Certification
open sta testing CertificationVskills
 
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Dan Allen
 
Client-side Performance Testing
Client-side Performance TestingClient-side Performance Testing
Client-side Performance TestingThoughtworks
 
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
 
Wicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On TimeWicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On TimeWill Hoover
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail Keytorc Software Testing Services
 
verification_planning_systemverilog_uvm_2020
verification_planning_systemverilog_uvm_2020verification_planning_systemverilog_uvm_2020
verification_planning_systemverilog_uvm_2020Sameh El-Ashry
 

Similar a Agile Java Testing With Open Source Frameworks (20)

Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 
DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?DevOps in Practice: When does "Practice" Become "Doing"?
DevOps in Practice: When does "Practice" Become "Doing"?
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using Arquillian
 
2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the Trenches2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the Trenches
 
Agile Testing 2020
Agile Testing 2020Agile Testing 2020
Agile Testing 2020
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
Hands On with Selenium and WebDriver
Hands On with Selenium and WebDriverHands On with Selenium and WebDriver
Hands On with Selenium and WebDriver
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern Methodology
 
Automate your way to agility
Automate your way to agilityAutomate your way to agility
Automate your way to agility
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 
open sta testing Certification
open sta testing Certificationopen sta testing Certification
open sta testing Certification
 
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
 
Client-side Performance Testing
Client-side Performance TestingClient-side Performance Testing
Client-side Performance Testing
 
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 ...
 
Wicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On TimeWicket Deliver Your Webapp On Time
Wicket Deliver Your Webapp On Time
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
 
verification_planning_systemverilog_uvm_2020
verification_planning_systemverilog_uvm_2020verification_planning_systemverilog_uvm_2020
verification_planning_systemverilog_uvm_2020
 

Último

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Agile Java Testing With Open Source Frameworks

  • 1. Agile Java Testing With  Open Source Frameworks Presented by Mr. Viraf Karai **********                on Wed. Feb. 25, 2009   1
  • 2. Summary of this talk Why test  Why test frameworks    Why automate tests  Unit test frameworks   Kinds of tests Integ test frameworks   When do you test  Load/perf  test    frameworks Unit testing  Other tools (CI)  Integration testing  Resources  Acceptance testing    2
  • 3. Why test ? To ensure that the product satisfies all use­  cases/user­stories To gain confidence in your product's abilities  To learn about the behavior of your product  To deliver a quality product to your customer  To fulfil a binding contract with the govt/military    3
  • 4. A quote on testing Perhaps one day, writing code without tests will be   considered as professionally irresponsible as  constructing a bridge without performing a  structural analysis.                                                Brian Goetz  (JVM and concurrency guru)                       author of  Java Concurrency In Practice.    4
  • 5. Why automate tests ? Humans are error­prone by nature  Automated tests   Save time ● Consume minimal resources on beefy hardware ● Remove the drudgery from repetitive tasks ● Can be run frequently ● Are highly effective with continuous integration ●   5
  • 6. Kinds of tests Typically the following tests are done  Unit testing – development ● Integration testing – development  ● Functional testing (includes load/perf testing) – QA ● Acceptance testing – customers / product manager ●   6
  • 7. When do you test ? Agile shops are increasingly embracing TDD  Testing is a 1st class activity and should never be   done as an afterthought Unit testing  ­ while developing code  Integration testing – while and after developing code  Functional testing – by QA after code complete  Load/perf testing – by QA after code compelete  Acceptance testing – by customers after QA is done    7
  • 8. Unit testing Always done by developers  In a TDD environment, tests are written before   writing code TDD forces you to make your code testable and can   result in very clean design if done right Code shouldn't be checked in without passing tests.  Run by developers before code check­in and by CI   system periodically (Daily / after code check­ins)   8
  • 9. Integration testing Ideally done by both dvlp and QA (separately)  Involves more big­picture tests  Focus is on collaboration of a number of objects  Fixtures to set up are more complex than unit tests  Typically touches aspects such as network (http, ftp,   smtp) and database interactions   9
  • 10. Acceptance testing Tests used to help define when a user story is done  Done every iteration and derived from user stories  A story isn't complete until all acceptance tests pass  Big bang acceptance testing occurs after code­  complete and test­complete Onus is on customer/product manager to verify   correctness of acceptance tests Automation of acceptance tests is strongly desired    10
  • 11. Why use test frameworks ? Absolutely mainstream in agile environments  Used by developers, QA and customers  Used to test all tiers of an enterprise app  Usually involves a learning curve – nothing is free  ROI can be substantial once mastered  Excellent way to achieve automation  Tests almost always experience a faster turnaround    11
  • 12. Unit test frameworks Junit 4.x* – unit test Java classes and interfaces  TestNG* – unit test Java classes and interfaces  EasyMock ­ provides mock objects for interfaces in   JUnit/TestNG tests by generating objects on the fly Both* heavily leverage Java5 annotations  Both* are supported by Java IDEs: IntelliJ, Eclipse  Both* are supported by build tools: Maven, Ant  Both* generate reports about failed tests & coverage    12
  • 13. Integration test frameworks DbUnit – used to test your persistence tier  XmlUnit – used to compare 2 XML documents  HttpUnit – used to interact with your webapp and   test forms, tables, links, etc. Junit/TestNG with MockHttpServletRequest and   MockHttpServletResponse (Spring Framework) to  test your servlets   13
  • 14. Integration test frameworks (cont'd) Cactus – tests server components e.g. Servlets,   EJBs, servlet filters, JSP taglibs, etc. SoapUI ­ inspect, invoke and test web services over   HTTP (supported cleanly in Eclipse and IntelliJ)   14
  • 15. Functional test frameworks Abbot, JFCUnit, Marathon – Swing func test tools  Selenium – advanced tool to test your web app –   record, playback and run tests on a large grid.  Supports Java, Ruby, Python, Perl, PHP JWebUnit – works with HtmlUnit and Selenium to   navigate your web app and verify correctness Canoo WebTest – similar to JWebUnit – write rules   (tests) as Ant tasks or Groovy unit tests   15
  • 16. Load / perf test frameworks LoadRunner ($) ­ generates load for back­end   servers by emulating user requests The Grinder – load test HTTP web servers, SOAP   and REST web services. Uses Jython for test scripts. JUnitPerf – load and perf testing with Junit  TestNG – has annotations to give you control over #   concurrent requests and # threads e.g.  @Test(invocationCount = 100, threadPoolSize = 10   16
  • 17. Acceptance test frameworks Fit, FitNesse  Concordion   Exactor    17
  • 18. Other tools (continuous integration) Consider using a separate build and continuous   integration (CI) server Will quickly generate failed test reports with each   run. Developers should respond quickly Hook up CI server with CM system (CVS / SVN)   and set up build times (daily / after each checkin) Popular CI tools are Hudson, Continuum, Luntbuild,   CruiseControl, TeamCity ($)   18
  • 19. Resources (web) http://www.ambysoft.com   http://www.martinfowler.com   http://www.opensourcetesting.org/unit_java.php  http://www.onjava.com  http://www.ibm.com/developerworks  http://www.javaworld.com   http://www.parleys.com (MM)  http://developers.sun.com/learning/javaoneonline (MM)    19
  • 20. Resources (books) JUnit Recipes by J B Rainsberger   Test Driven (Practical TDD.....) by Lasse Koskela  Next Generation Java Testing by Cedric Beust  xUnit Test Patterns by Gerard Meszaros  The Art Of Agile Development by James Shore et al    20