Carlos Ble

Carlos Ble

I am a professional software developer, I solve problems.

I also teach and mentor developers to build better software.

Developing software since 2001.

Can I help you?

  • Do you need high quality tailor-made software?
  • Need training on TDD, clean code or refactoring?
  • Do you need a technical consultant?
  • May I pair with you to write better code?

Events

Upcoming training courses:

  1. TDD - [en Español] - 6 y 7 Octubre
    Gran Canaria
  2. TDD - [in English] - October 20, 21 & 22
    London, UK
  3. TDD - [en Español] - 29, 30 y 31 de Octubre.
    Madrid, Spain

Conferences:

  1. I'll be at the Agile Testing Days 2014
  2. I'll be at the London Test Gathering Workshops.

Archive for June, 2009



Robert C. Martin rocks

This is nothing new, Uncle Bob rocks we all know that. But... man, you've got to check out these podcasts, they're just impressive.

I am looking forward to buy some Robert's books.

Agile Spain avanza

Impresionante el movimiento que está habiendo en Agile Spain últimamente. Prueba de ello es la reciente celebración de Agile Madrid y los podcasts y videos que están ya disponibles para descarga. No tienen desperdicio. Hay que felicitar a JM Beas por toda la energía que está poniendo en la comunidad.
Enlaces:

Que siga así la cosa :-)

Conclusiones del curso de TDD

Ayer terminé de impartir mi primer curso de Test Driven Development de 10 horas. Anteriormente habia dado otro de unas 5 horas de duración que me dejó muy buen sabor y tenía ganas de intentarlo con otro más largo. Gracias a J.L. Roda, Pedro González y la Agencia Canaria de Investigación hemos podido montar un curso a modo de taller en la Universidad de La Laguna para un pequeño grupo de 15 intrépidos desarrolladores. El nivel de los asistentes ha sido muy bueno y su actitud también. La gente joven es menos reacia a nuevas metodologías y aunque en sólo 10 horas es muy complicado estudiar un proyecto de software relativamente grande, algunas de las ideas más importantes se asimilaron bien. Ha sido un placer. Espero que en el futuro podamos organizar un curso de mayor duración para abordar un desarrollo mayor y así demostrar que lo que hemos aplicado para un pequeño es exactamente igual para uno grande, aunque les cueste creerlo.
Gracias a todos los asistentes :-)

Ant support: Eclipse wins

Eclipe or Netbeans? Netbeans is great for the Swing designer, it is my favorite tool for desktop UI design.
However for the rest of the tasks I prefer Eclipse. Eclipse integration with Ant is very good as the editor reads all the dependencies within the buid.xml and provides all the autocompletion just by loading the project (create a new Java project from existing Ant file). Running the JUnit targets from the build.xml works fine which is something I couldn't make with Netbeans. Netbeans didn't find the tests.
Once the project is loaded go to Window menu -> Show view -> Ant. See the Ant view at your right hand side and click on the tiny "Add Buildfiles" button on the top of it. Select the build.xml and you're done.

My JUnit configuration (slightly modified from this post):

  1.  
  2. <path id="classpath.unit_test">
  3. <pathelement location="${lib}/comun/junit-3.8.2.jar" />
  4. <pathelement path="${build.datos}"/>
  5. <pathelement path="${build.cliente}"/>
  6. <pathelement location="./test/unitarios" />
  7. <fileset dir="${lib.comun}">
  8. <include name="**/*.jar"/>
  9. </fileset>
  10. <fileset dir="${lib}/cliente">
  11. <include name="**/*.jar"/>
  12. </fileset>
  13. <fileset dir="${lib}/control">
  14. <include name="**/*.jar"/>
  15. </fileset>
  16. </path>
  17.  
  18. <target name="unit_test.compile" depends="unit_test.clean">
  19. <javac srcdir="./test/unitarios"
  20. verbose="yes"
  21. includeAntRuntime="true"
  22. debug="on" debuglevel="lines,vars,source">
  23. <classpath refid="classpath.unit_test"/>
  24. </javac>
  25. </target>
  26. <target name="unit_test.clean">
  27. <delete verbose="yes">
  28. <fileset dir="./test/unitarios" includes="**/*.class" />
  29. </delete>
  30. </target>
  31.  
  32. <target name="unit_tests.run" depends="unit_test.compile"
  33. description="Run unit tests">
  34. <junit showoutput="yes"
  35. printsummary="yes"
  36. filtertrace="off" fork="yes"
  37. haltonfailure="no">
  38. <classpath refid="classpath.unit_test" />
  39. <formatter type="plain"/>
  40. <batchtest>
  41. <fileset dir="./test/unitarios/">
  42. <include name="**/*Tests.class"/>
  43. </fileset>
  44. </batchtest>
  45. </junit>
  46. </target>
  47.  

Exceptions' stack traces are sent to a file in the project main folder called Test-your_test_case_name.txt
For better output in the Eclipse Console while running the tests, click over the unit_test.run target with the right mouse button (in the Ant view) then "Run as" and then "Ant Build..." and set "-v" in the arguments in the "Main" tab. Note the "debug=on" in the javac target (thanks Nilesh).
The test execution summary is presented for each TestCase rather than altogether so scroll up to watch all
the results (I was wondering why just one TestCase was ran)