Iced Tea in Crete 2012:Development and Testing Tools

From WikiEducator
Jump to: navigation, search



  • as tool for exploring new languages
  • custom JUnit runners (e.g. SpringJUnitTestRunner, for AJ)
  • common base class for default annotations


  • different groups, annotate tests, (fast tests)
  • more memory as it loads all classes upfront



  • assertThat(value, hasItems())
  • integrated in JUnit (oolder version)
  • some default matchers come with JUnit

Spock: ?


  • Mockito: (
  • adds more default Hamcrest Matchers, easy to use, fluent setup of behavior,
  • verify # of interaction, nice defaults
  • annotations for injecting mocks
  • PowerMock: mock final methods, static calls and java.lang classes ()
  • self made stubs


  • separate threading behavior from other behavior
  • use java debugger architecture to suspend/continue tests
  • in JUnit @Concurrent Annotations
  • better concurrency support in TestNG
  • write your own testing infrastructure with CountDownLatch (or Phaser in Java7)
  • watch out for shared state, also if you want to run your tests in parallel
  • hard to do in current frameworks



  • automatically rolls back by default so doesn't keep state
  • @Rollback(false)
  • @Before executed in TX, @BeforeTransaction is executed outside of TX
  • @Transacitonal on Test-case makes each method transactional

Cleanup DB?

  • VM(ware) with snapshot and no persisent disk for reset
  • HyperV
  • saved state in db


  • DBUnit ?
    • too big an effort to maintain (all the xml files) - own framework
  • In Memory DB?
    • different contexts
    • problems with schemas ? different SQL dialects? (better with ORM)
    • HSQL, ImpermanentGraphDatabase
  • LiquiBase?
  • HttpUnit?
  • Infrastructure that automatically starts up embedded or external servers
  • fast, slow, external tests (with external services - JMS, Kerberos, LDAP, ...)



  • write acceptance criteria in business domain language
  • readable/writable by business users
  • the tool reads those statements and extracts relevant information which are fed to the tests
  • Given When Then / As a .... , I want ...., so that ...


  • in lots of languages
  • step definitions use regular expressions to extract the data for input and verification


  • difficult to express specs


Fit / Fitnesse

  • Fit ( by Ward Cunningham - uses tabular specs in Word/HTML documents to define Acceptance tests
  • FitLibrary
  • Fitnesse (Uncle Bob) Wiki based implentation (
  • plug in spreadsheets (excel)


  • make sure the client and the system under test run on different systems
  • record: gc-logs
  • record stats: min, max, avg, mean, stddev look at the outliers
  • vmstat, iostat
  • Kirks Performance Test courses
  • you have to have performance requirements so that you know when you meet your performance needs