SlideShare a Scribd company logo
1 of 21
Continuous Testing for Grails




          Jeff Winkler
TDD FTW




          http://vinkamat.com/2011/tdd-unit-testing-and-benefits/
TDD




      http://vinkamat.com/2011/tdd-unit-testing-and-benefits/
TDD Focus: Unit Tests
• Types
  – Junit TestCase
  – Grails: UnitTestCase
  – Groovy: TestCase
  – Spock: Unit Spec
Continuous Testing
Experimental Results on 22
   Sophomores, 6.170
• A controlled experiment has shown that
  continuous testing has a statistically significant
  effect on developer success in completing a
  programming task, without affecting time
  worked. Developers using continuous testing
  were three times more likely to complete the
  task before the deadline than those without.
• Most participants found continuous testing to be
  useful and believed that it helped them write
  better code faster, and 90% would recommend
  the tool to others
Tool Comparisons
• Grails 1.37 vs Grails 2.01

• CT: Auto-test, InfiniTest
1.37: Rinse, Lather, Repeat
2.01: New Hotness
Continuous Testing Options
• InfiniTest
  – http://infinitest.github.com/
  – For IDEA or Eclipse
  – groups.google.com/group/infinitest-users
• Auto-test
  – http://grails.org/plugin/auto-test
• JUnitMax from Kent Beck
  – $100
  – Health? Not tried
Auto-test




The plugin will monitor the project directory and will attempt to
run only the subset of tests affected by what changed. This is
very rudimentary - for example, if you modify BookController
or BookControllerTests or BookControllerSpec, it will run test-
app BookController
Autotest 1.01
Infinitest
Tip: Ignoring Integration Tests
Criteria: Spock
Test Execution in coding
environment, interactive results.
Scores
                  Spock Tests in   Results in   Auto-run   Interactive Score
                        same env   same env     5 points   Results


Test-app
                                                                 1




IDE (Eclipse)
                                                                 4

Auto-test 1.0.1
                                                                6.5

InfiniTest
                                                                 8
TLDR



• InfiniTest for IDE users
   – same environment

• Auto-test for non-IDE

• Neither is perfect.
Results


• MIT Study: Devs 3X more likely to finish task
  on deadline; 90% would recommend
  continuous testing.

• Try It!
Thanks




• winkler1@gmail.com
• @winkler1

More Related Content

What's hot

Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
Duy Tan Geek
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
Seapine Software
 
Testing & continuous delivery
Testing & continuous deliveryTesting & continuous delivery
Testing & continuous delivery
Nelson Melina
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 

What's hot (20)

Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven development
 
Testing challenges in a continuous delivery world
Testing challenges in a continuous delivery worldTesting challenges in a continuous delivery world
Testing challenges in a continuous delivery world
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
 
Debugging
DebuggingDebugging
Debugging
 
Android tdd
Android tddAndroid tdd
Android tdd
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
 
TDD and Unit Testing in Golang
TDD and Unit Testing in GolangTDD and Unit Testing in Golang
TDD and Unit Testing in Golang
 
Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practices
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonest
 
First steps in testing analytics: Does test code quality matter?
First steps in testing analytics: Does test code quality matter?First steps in testing analytics: Does test code quality matter?
First steps in testing analytics: Does test code quality matter?
 
Continuous Delivery Presentation
Continuous Delivery PresentationContinuous Delivery Presentation
Continuous Delivery Presentation
 
How to Introduce Continuous Delivery
How to Introduce Continuous DeliveryHow to Introduce Continuous Delivery
How to Introduce Continuous Delivery
 
Move test planning before implementation
Move test planning before implementationMove test planning before implementation
Move test planning before implementation
 
Giving automated tests the love they deserve at Listings
Giving automated tests the love they deserve at ListingsGiving automated tests the love they deserve at Listings
Giving automated tests the love they deserve at Listings
 
TDD for Testers Workshop
TDD for Testers WorkshopTDD for Testers Workshop
TDD for Testers Workshop
 
Testing & continuous delivery
Testing & continuous deliveryTesting & continuous delivery
Testing & continuous delivery
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 

Similar to Continous testing for grails

Automated testing vs manual testing
Automated testing vs manual testingAutomated testing vs manual testing
Automated testing vs manual testing
Neha Polke
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Jacinto Limjap
 

Similar to Continous testing for grails (20)

Client Side Unit Testing
Client Side Unit TestingClient Side Unit Testing
Client Side Unit Testing
 
Agile Testing - What is it?
Agile Testing - What is it?Agile Testing - What is it?
Agile Testing - What is it?
 
Agile Testing
Agile Testing  Agile Testing
Agile Testing
 
The Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the PipelineThe Key to DevOps? Testing Early in the Pipeline
The Key to DevOps? Testing Early in the Pipeline
 
Automated testing vs manual testing
Automated testing vs manual testingAutomated testing vs manual testing
Automated testing vs manual testing
 
test
testtest
test
 
test
testtest
test
 
Battle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java ProjectBattle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java Project
 
GatlingJAX2022.pdf
GatlingJAX2022.pdfGatlingJAX2022.pdf
GatlingJAX2022.pdf
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier2016 10-04: tdd++: tdd made easier
2016 10-04: tdd++: tdd made easier
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
 
Testing Plug-in Architectures
Testing Plug-in ArchitecturesTesting Plug-in Architectures
Testing Plug-in Architectures
 
Fast end-to-end-tests
Fast end-to-end-testsFast end-to-end-tests
Fast end-to-end-tests
 
Super fast end-to-end-tests
Super fast end-to-end-testsSuper fast end-to-end-tests
Super fast end-to-end-tests
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Continous testing for grails

  • 1. Continuous Testing for Grails Jeff Winkler
  • 2. TDD FTW http://vinkamat.com/2011/tdd-unit-testing-and-benefits/
  • 3. TDD http://vinkamat.com/2011/tdd-unit-testing-and-benefits/
  • 4. TDD Focus: Unit Tests • Types – Junit TestCase – Grails: UnitTestCase – Groovy: TestCase – Spock: Unit Spec
  • 6. Experimental Results on 22 Sophomores, 6.170
  • 7. • A controlled experiment has shown that continuous testing has a statistically significant effect on developer success in completing a programming task, without affecting time worked. Developers using continuous testing were three times more likely to complete the task before the deadline than those without. • Most participants found continuous testing to be useful and believed that it helped them write better code faster, and 90% would recommend the tool to others
  • 8. Tool Comparisons • Grails 1.37 vs Grails 2.01 • CT: Auto-test, InfiniTest
  • 11. Continuous Testing Options • InfiniTest – http://infinitest.github.com/ – For IDEA or Eclipse – groups.google.com/group/infinitest-users • Auto-test – http://grails.org/plugin/auto-test • JUnitMax from Kent Beck – $100 – Health? Not tried
  • 12. Auto-test The plugin will monitor the project directory and will attempt to run only the subset of tests affected by what changed. This is very rudimentary - for example, if you modify BookController or BookControllerTests or BookControllerSpec, it will run test- app BookController
  • 17. Test Execution in coding environment, interactive results.
  • 18. Scores Spock Tests in Results in Auto-run Interactive Score same env same env 5 points Results Test-app      1 IDE (Eclipse)      4 Auto-test 1.0.1      6.5 InfiniTest      8
  • 19. TLDR • InfiniTest for IDE users – same environment • Auto-test for non-IDE • Neither is perfect.
  • 20. Results • MIT Study: Devs 3X more likely to finish task on deadline; 90% would recommend continuous testing. • Try It!

Editor's Notes

  1. TDD alternates between Green, Red.
  2. Really Running the Tests, alternating Red/GreenNot batching
  3. Unit tests are FastGood tooling supportWork without spinningup Grails.
  4. Continuous Testing Idea Started @MIT, 2004in backgroundreduce time & effort to runReduce Change size if a problem is foundSame as Continuous Compilation for dev, or CI for an organisation.Work by watching .class files on disk. Save->Compile->Tests Run
  5. Concept: Ignorance time: How long something broken, that you did not know about.Fix Time is correlated with Ignorance time. Same as continuous integration!
  6. Issues: Run tests in different environment than coding environment. Alt-Tab to run tests, get results.
  7. GoodColor Less Verbose Same JVMPeek @ResultsBad:- Still separate environment
  8. InfiniTest was briefly commercialAuto-test is Grails only, no IDE integrations.JUnitMax – status?
  9. Good:Fairly dumb heuristicsBad: Separate environment.
  10. Demo-------Prefs/EnableRebuild project – tests run when classes change.Change AnotherClass.*Smart* about what to run… sometimes misses things.Open source – feel free to add fixes!Shows errs for all open projects.Won't run if compilation errs in any open projects.