• Like
  • Save
Continous testing for grails
Upcoming SlideShare
Loading in...5
×
 

Continous testing for grails

on

  • 2,112 views

Slides presented by Jeff Winkler to the Boston Grails Meetup, 3/28/2012

Slides presented by Jeff Winkler to the Boston Grails Meetup, 3/28/2012

Statistics

Views

Total Views
2,112
Views on SlideShare
2,106
Embed Views
6

Actions

Likes
2
Downloads
12
Comments
0

1 Embed 6

https://twitter.com 6

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • TDD alternates between Green, Red.
  • Really Running the Tests, alternating Red/GreenNot batching
  • Unit tests are FastGood tooling supportWork without spinningup Grails.
  • 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
  • Concept: Ignorance time: How long something broken, that you did not know about.Fix Time is correlated with Ignorance time. Same as continuous integration!
  • Issues: Run tests in different environment than coding environment. Alt-Tab to run tests, get results.
  • GoodColor Less Verbose Same JVMPeek @ResultsBad:- Still separate environment
  • InfiniTest was briefly commercialAuto-test is Grails only, no IDE integrations.JUnitMax – status?
  • Good:Fairly dumb heuristicsBad: Separate environment.
  • 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.

Continous testing for grails Continous testing for grails Presentation Transcript

  • 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-testThe plugin will monitor the project directory and will attempt torun only the subset of tests affected by what changed. This isvery rudimentary - for example, if you modify BookControlleror BookControllerTests or BookControllerSpec, it will run test-app BookController
  • Autotest 1.01
  • Infinitest
  • Tip: Ignoring Integration Tests
  • Criteria: Spock
  • Test Execution in codingenvironment, interactive results.
  • Scores Spock Tests in Results in Auto-run Interactive Score same env same env 5 points ResultsTest-app      1IDE (Eclipse)      4Auto-test 1.0.1      6.5InfiniTest      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