Fast Feedback Using Ruby

From interactive code experiments to automatically running code

The workshop shows how to automatically run code when files are saved. In other words: How to get feedback about code real quick

Do you spend too much time manually performing tasks like running automated tests and reformatting files? Would you like to know a way to make these tasks happen, every time you save a file to disk?

In this workshop, you’ll learn ways to get the fastest possible feedback on changes you make in your project. The workshop shows you how to resolve these pain points using the simple example of reformatting a text file. The same technique can be used to achieve much more complex tasks!

We take the following steps in the workshop:

• First of all, we explore how to express a simple task in Ruby by using an interactive Ruby shell. We are running Ruby code on the command line and immediately see the result of your code.

• Second of all, we’ll write a Ruby script that we can can call from the command line. This allows us to run the same task with various input files.

• In step three we'll set up a tool to watch our files for changes and run the Ruby script whenever the file is changed, i.e. when we save it to disk.

 

The workshop assumes some programming knowledge: if you already know Ruby a little bit, you’re fine. If you can program in a language like Python, Java, or JavaScript you will be able to play along, too.

Here are some examples to illustrate how I am using this kind of automation:

• In one project, I run all unit tests whenever production or test code changes. In this case a system notification displays the test result.

• In my e-book projects, I automated checking cross links in the book, i.e. references to chapter titles defined elsewhere in the book.

• A third project used text based tables to express workflows. The tables are transformed into a kind of flow diagram. This visual representation was helpful in finding test scenarios I needed to cover.

 

The workshop is packed with exercises and attendees will get an e-book covering everything from the session and helping you to set things up after the workshop.


Related Sessions


  • Tutorial
  • Keynote
  • Talk
  • Workshop
  • Combo
  • Bonus
  • Active
  • Social

Full-Day Tutorial (6-hour Workshop)

9:00 a.m. – 5:00 p.m. F-,E- & D-Rooms Equipment required

25-minute Talk

online session
2:45 p.m. – 3:30 p.m. Room F1 - Track 1: Talks

105-minute Workshop

10:45 a.m. – 12:30 p.m. Room D5+D6 - Track 7: Workshops Equipment required

25-minute Talk

online session
11:45 a.m. – 12:30 p.m. Room F3 - Track 3: Talks

If you like the Agile Testing Days Conference you might also like: