Karumi Dojo: Kata Maxibon

17
Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs Karumi Dojo: Kata Maxibon Pedro Vicente Gómez Sánchez Senior Mobile Engineer at Karumi [email protected] @pedro_g_s github.com/pedrovgs

Transcript of Karumi Dojo: Kata Maxibon

Page 1: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Karumi Dojo: Kata MaxibonPedro Vicente Gómez SánchezSenior Mobile Engineer at Karumi

[email protected]@pedro_g_sgithub.com/pedrovgs

Page 2: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Page 3: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Sergio GutierrezSenior Mobile Engineer

Alberto GrageraTechnical Director

Jorge BarrosoAndroid guy!

Davide MendoliaSenior Full Stack Engineer

Page 4: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Page 5: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Karumi Dojo● We are here to practice and learn.

● This exercise meant to be collaborative, not competitive.

● Try to open your mind to new concepts.

Page 6: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Karumi Dojo● We are here to introduce Property Based Testing tools.

● JUnit- QuickCheck & SwiftCheck are our main tools.

● Keep always in mind the properties!

● We are going to practice pair programming.

Page 7: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Rules:● Do not start coding without read the repository README.

md.

● Do not write another test without keep the previous one passing.

● Think carefully what properties are you going to check.

● Add logs to review the generated input for your tests.

Page 8: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Property Based Testing:● An exploratory testing tool used by functional developers

for years.

● Randomly generated inputs will be used to stress your subject under tests.

● We need to check that the state of the software holds its properties at th end of the test execution.

Page 9: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Maxibon Kata:

Page 10: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Java: Properties

Page 11: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Java: Generators

Page 12: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Swift: Properties

Page 13: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Swift: Generators

Page 14: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Tips● Baby steps.

● Log the input of your tests.

● Review the testing framework API before to start.

● Don’t lose the green.

Page 15: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Are you ready?

Page 17: Karumi Dojo: Kata Maxibon

Pedro V. Gómez Sánchez - [email protected] - @pedro_g_s - github.com/pedrovgs

Tasks● Create the main entities.

● Write the first test and check that the number of

maxibons is always greater than 2.

● Add the capability to grab maxibons in group