Stay sane. Test for real.

689 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
689
On SlideShare
0
From Embeds
0
Number of Embeds
282
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Stay sane. Test for real.

  1. 1. Bartosz MajsakCambridge Technology PartnersJEEConf, Київ 2013Stay sane. Test for real
  2. 2. [bmajsak@jeeconf2013 ~]$ whoamitwitter: @majsongithub: bartoszmajsakgmail: bartosz.majsak@gmail.com
  3. 3. *
  4. 4. *
  5. 5. *Integration
  6. 6. *Containers
  7. 7. *Deployment
  8. 8. Alt+Shift+X, TAlt+Shift+X, N
  9. 9. public class FluidOunceConverterTestCase {@Deploymentpublic static JavaArchive createDeployment() {return ShrinkWrap.create(JavaArchive.class, "test.jar").addClasses(FluidOunceConverter.class,FluidOunceConverterBean.class);}FluidOunceConverter converter;@Testpublic void shouldConvertFluidOuncesToMillilitres() {// givendouble ouncesToConvert = 8d;double expectedMillilitres = 236.588237d;// whendouble ouncesInMl = converter.convertToMillilitres(ouncesToConvert);// thenassertThat(ouncesInMl).isEqualTo(expectedMillilitres);}}
  10. 10. @RunWith(Arquillian.class)public class FluidOunceConverterTestCase {@Deploymentpublic static JavaArchive createDeployment() {return ShrinkWrap.create(JavaArchive.class, "test.jar").addClasses(FluidOunceConverter.class,FluidOunceConverterBean.class);}@InjectFluidOunceConverter converter;@Testpublic void shouldConvertFluidOuncesToMillilitres() {// givendouble ouncesToConvert = 8d;double expectedMillilitres = 236.588237d;// whendouble ouncesInMl = converter.convertToMillilitres(ouncesToConvert);// thenassertThat(ouncesInMl).isEqualTo(expectedMillilitres);}}
  11. 11. *
  12. 12. *
  13. 13. Scenario “Finding all Ukrainian beers”Given “Im on the main page”When “I enter from Ukraine as search criteria”Then “I should see [pull requests are welcome!]”
  14. 14. *
  15. 15. The Known UniverseArquillianPersistenceWarpDroneSpock
  16. 16. The Unknown UniverseArquillianJBehaveCucumberGrapheneAndroidTransactionBytemanJacocoPerformanceRecordingForge
  17. 17. http://arquillian.orghttp://github.com/arquillian+Arquillianirc://freenode.net/#jbosstesting

×