Take-aways from European Testing Conference 2018 — Do try this at home!

This article was first published on Medium.

This week I was lucky enough to attend European Testing Conference in Amsterdam. To get an impression of the conference, you can visit their website, read up on the #EuroTestConf hashtag on Twitter, or check any of the links at the end of this post.

In this blogpost, I’d like to share some of the take-aways from this conference. Do try this at home!

  1. “Painless Visual Testing” — Gojko Adzic

During the first keynote, Gojko Adzic likened visual testing to traveling with children: “always more painful and expensive than expected”.

Tools can help you collect data, but cannot determine whether the result looks “good”. We will often have to visually inspect the UI. Existing tests break when we makes changes to the UI.

To deal with this, Gojko introduced the idea of visual approval testing and gave a demo of a tool built for that purpose: https://github.com/AppraiseQA/appraise

It would be fun to play with this tool, or at least this idea, to see how this could help make visual testing easier.

An earlier version of this talk can be found here.

2. â€œHow Would You Test a Text Field?” â€” Maaret Pyhäjärvi

Maaret used the interview question “ How Would You Test a Text Field?” to generate ideas on how to test a text field, and illustrate how the types of answers people give indicate their level of test experience and mindset.

Some resources mentioned in the talk:

3. Writing Better BDD Scenarios â€” Seb Rose and GĂĄspĂĄr Nagy

During the workshop, Seb mentioned Example Mapping as described by Matt Wyne

4. â€œGenerating Test Scenarios” — Llewellyn Falco

Llewellyn showed us how to quickly increase test coverage by generating test cases. This is also something I’d love to play with!

Of course, he had to first show us his infamous sparrow deck:

Also, the BugMagnet tool was mentioned:

Having just recently heard of BugMagnet, I definitely plan to use this at work!

For more on approval testing: http://approvaltests.com/

5. â€œAutomating repetitive communication tasks with a Bot” — Pooja Shah

Pooja Shaj showed us chatbot Alice. You can find the repository on GitHub: https://github.com/moengage/alice

6. Interactive sessions

The conference made a point of being interactive; a lot of the insights came from great keynotes and workshops, as well as fellow attendees.

The interactive parts of the conference included a speed meet (talk to different people for 5 minutes each), lean coffee (facilitated discussion) and open space (free format to present, discuss or ask for help).

More on Lean Coffee: http://leancoffee.org/

One of the questions raised in our group was “How to motivate developers to test?”. Apart from the obvious “managing programmers is like herding cats”, one of the ideas mentioned was to have a bug bash.

Wrap up

The conference ended with a retrospective.

As you can see, we had a lot of fun, learned a lot and went home with new ideas to try out!

Read more:

If you want to read more about the conference, check out the following (especially the sketch notes by @marianneduijst and @KatjaBudnikov):

Conferences as a change toolMaaret Pyhäjärvi

European Testing Conference 2018 – Coming HomeLisi Hocke

ETC 2018, it was simply awesomeAmit Wertheimer

ETC 2018, did I say it was awesome?Amit Wertheimer

European Testing Conference 2018Markus Tacker

What I learned on first day of European Testing Conference 2018 – Karlo Smid

Arena lifeSeb Rose

Jackpot!Seb Rose

European Testing Conference 2018 #EuroTestConfKatja Budnikov

Collection of Sketchnotes of #EuroTestConfMarianne Duijst

Getting started with Java Programming

This article was first published on Medium.

This is a blog post I’ve been meaning to write for years about how I got started learning Java. It describes the resources that worked for me; and what I recommend to people who ask me how to get started. From now on, I can just point them to this blog. 🙂

Resources

Fortunately, there are many great resources available nowadays to learn Java. (Or any programming language or Computer Science skills, really.)

Here are some that helped me get started over four years ago:

1. The New Boston (video tutorials)

Bucky Roberts created a series of video tutorials that will help you get started with Java programming, from installing the JDK to basic syntax and moving on to different language features. He explains everything using example code. What I did (and recommend) was to follow along with the tutorial, making sure that my code ran. In the beginning, it would take me double the length of the video (or more!) to get it to work, due to many small typing or syntax errors. By the end of the tutorial, I would often anticipate where he would go and type the code before he did.

The courses are available on YouTube (https://www.youtube.com/playlist?list=PLFE2CE09D83EE3E28). Once you finish the Beginner course, you can continue with the Intermediate course.

2. Head First Java (book)

This book was recommended by a coworker who was helping our team learn and improve our technical skills. It covers the basics of Java syntax and Object Oriented Programming. There are questions and exercises throughout the book.

More information on the publisher’s website: http://shop.oreilly.com/product/9780596009205.do

3. Kattis and HackerRank (practice)

My manager at the time recommended Kattis (https://open.kattis.com/) for practice. This is one of many sites that offers programming challenges. You can write your solution to any one of the challenges on the site; and when you submit your solution, it will run against a set of (secret) tests.

Solving challenges taught me several different things; I learned to write working Java code, but I also learned to search for how to do certain things. For example, when a challenge called for manipulation of Strings, I would either google how to do what I wanted and/or if I knew there was a Java class that might offer the behavior I needed, I would google the Java documentation for that class. In addition, it taught me to look for edge cases, when my solution failed with a wrong answer. Finally, it taught me to improve my code, to make it faster when it didn’t meet the time limit. The only downside of Kattis (for me, anyway), is that it requires knowledge of algorithms.

In addition to Kattis, I used HackerRank (https://www.hackerrank.com) for even more practice. They offer challenges, contests, and several tutorial tracks as well. The upside of the tutorials is that they focus more on real life problems you might actually need to solve in your job or side project.

4. Code reviews / Mentoring

Finally, I was lucky enough to have a friend who is a very experienced developer and kind enough to review my code. This was by far the best way to learn how to write good code! So don’t be afraid to ask someone you know and trust to look at your code and tell you how it could be improved.

Conclusion

This is how I got started with Java programming. These are the resources I recommend to people when they ask to get started.

I hope they work for you too!

If you have found other resources that really helped you, please let me know which ones are your favorites and why.

For more resources, check out this repo on Github: https://github.com/mlvandijk/programming-links/blob/master/README.md

My thanks to Thomas Sundberg for the review!

Kukumber — Getting started with Cucumber in Kotlin

This article was first published on Medium.

My team is creating an application in Kotlin. To make development of Cucumber tests easier, we decided to also use Cucumber-jvm with Kotlin instead of Java. Fortunately, it is possible to use cucumber-java8 in Kotlin (kotlin-java8)

Prerequisites

If you’d like to follow along, make sure you have the following installed:

Add dependencies

We use Maven, so we added the following dependencies to our pom.xml:

Maven dependencies for Cucumber-jvm

Note: The cucumber-junit dependency is added so we can add a JUnit Runner to run our tests, which we will do later.

If you don’t have Kotlin already configured in your project, you’ll need to add those dependencies also (or have IntelliJ IDEA do it for you).

Add a feature file

In our src/test/resources folder we create a new directory and add a .feature file. For this example, we’ll reuse the belly.feature from the cucumber-java-skeleton

Feature file `belly.feature`

Unfortunately the IntelliJ IDEA Cucumber plugin does not (yet) support a link between the steps in our feature file and our step definitions, like it does for Java. Also, we cannot generate snippets in Kotlin directly. Fortunately there is a work around: we can run the tests to generate snippets in Java 8 lambda style.

You can run the test from IntelliJ IDEA by right-clicking the feature file and selecting “Run ‘Feature:belly’” from the context menu.

When you run the tests, you should get something like the following result:

Generated snippets

Add Step Definitions

In the src/test/kotlin folder, we add a new Kotlin File/Class, called `StepDefs`.

We only have to write a little Kotlin code in the file:

Create StepDefs.kt

Note that our StepDefs implement the `cucumber.api.java8.En` interface, so we need to import it.

Now, when we copy-paste the generated snippets inside the `init{}` block, IntelliJ IDEA offers to convert it to Kotlin for us. Once we do, we will also need to import the `cucumber.api.PendingException` mentioned in the snippets.

Now we have the following StepDefs.kt file and we can start implementing the steps, as well as the code to make them pass!

Add snippets to StepDefs.kt

To run our features from a JUnit runner, we’ll need to add one. In the src/test/kotlin folder, we add a new Kotlin File/Class, called RunKukesTest.

RunKukesTest.kt

This code is available on GitHub: https://github.com/mlvandijk/kukumber-skeleton