my own preferred testing tools - paris jug 2011
DESCRIPTION
TRANSCRIPT
![Page 1: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/1.jpg)
My own preferred testing techniques
Paris Java User Group
![Page 2: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/2.jpg)
www.parisjug.orgCopyright(c) 2010 Paris JUG, Licence CC-Creatives Commons 2.0 France - Paternité - Pas d’utilisation commerciale - Partage des Conditions à l’identique
![Page 3: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/3.jpg)
Frameworks
My own preferred testing techniques
JUnit 4+
More expressive testsMore robust
Faster
Plugins
![Page 4: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/4.jpg)
Personal taste only
![Page 5: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/5.jpg)
Plugins
![Page 6: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/6.jpg)
MoreUnit, a unit test friendly Eclipse
http://moreunit.sourceforge.net/
See what’s tested
![Page 7: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/7.jpg)
MoreUnit
http://moreunit.sourceforge.net/
Jump to Test
![Page 8: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/8.jpg)
MoreUnit
http://moreunit.sourceforge.net/
Run current test
Refactoring friendly(move, rename, delete)
http://moreunit.sourceforge.net/
Demo
![Page 9: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/9.jpg)
Continuous testing
Runs all impacted tests after each code change
Eclipse and Intellij
OpenSource, Free
http://infinitest.org
![Page 10: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/10.jpg)
Demo
![Page 11: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/11.jpg)
Continuous testing
JUnit Max
Runs all impacted tests after each code change
Try to run tests failing most often, first
Eclipse and Intellij
OpenSource, Free
Developed by Kent Beck
http://www.junitmax.com/
![Page 12: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/12.jpg)
Frameworks
![Page 13: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/13.jpg)
HamcrestMore readable assertions
![Page 14: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/14.jpg)
HamcrestMore samples
+ easy to write custom matchers
![Page 15: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/15.jpg)
So
![Page 16: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/16.jpg)
FEST-AssertMore readable assertions
Demo
![Page 17: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/17.jpg)
FEST-AssertMore readable assertions
OpenSource
http://fest.easytesting.org/
![Page 18: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/18.jpg)
JUnit 4.8.2
Worst logo ever!
![Page 19: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/19.jpg)
Do you known/use all the features?
@Test@Before, @After, @BeforeClass, @AfterClass
@RunWith@Theory, @DataPoint(s)
@Rule@SuiteClasses
@Category (beta)
JUnit 4.8.2
Demo
![Page 20: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/20.jpg)
@Categories and @SuiteClasses
JUnit 4.8.2
![Page 21: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/21.jpg)
@Categories and @SuiteClasses
JUnit 4.8.2
![Page 22: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/22.jpg)
@Categories and @SuiteClasses
JUnit 4.8.2
Cumbersome
Need not forget to add each test manually in all suites
Who doesn’t run all the tests every build? :-)
![Page 23: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/23.jpg)
@Rule
Take a look at the code of MethodRule, ExternalResource, TestWatchman, Verifier...
Write your own rules if they make the tests easier to read.
JUnit 4.8.2
![Page 24: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/24.jpg)
Thank youQ/A
![Page 25: My own preferred testing tools - Paris JUG 2011](https://reader033.vdocuments.us/reader033/viewer/2022051312/54628a2aaf79597c138b4a97/html5/thumbnails/25.jpg)
www.parisjug.orgCopyright(c) 2010 Paris JUG, Licence CC-Creatives Commons 2.0 France - Paternité - Pas d’utilisation commerciale - Partage des Conditions à l’identique