July 4th I participated in 3 different workshops at the Testnet Summer Workshops event. I previously shared a blogpost about attending the event. In this post I will give you a brief overview of the 3 workshops and the tools they revolved around.

 

CI/CD Pipeline with Jenkins and automated testing in OpenShift

This workshop started with a brief introduction on the why and what of DevOps which was easy to follow. The deep-dive into OpenShift was a much harder topic. We lost a fair amount of time during the workshop due to some unforeseen things but in short I would summarize OpenShift as an excellent open source tool to manage your different docker instances. OpenShift has an excellent integration with f.e. Jenkins and in the backend it works on Kubernetes. Basically you can quickly set up a fully functional new environment including CI/CD pipeline with the click of a button, all from within OpenShift. (visit openshift.org for Origin version which is open source). You can customize any of the environments by selecting what front and backend you want it to have. It is excellent for testing a COTS (Commercial Of The Shelf) product with a core of standard functionality and for each region in the world you can combine it with a different frontend.

A very brief summary, but a very complex product which offers far more than what I describe here. What I take from the workshop is that I know OpenShift exists and it definitely serves a purpose. I personally think this is something that can be great to work with, but I would leave the decision to use it for a project/organisation, up to developers/architects.

 

After a great lunch break, a wonderful time to get to know other testers it was time for the next workshop:

 

Expanding testautomation opportunities with image recognition. A workshop on working with Sikuli

Next up was this workshop on image recognition with Sikuli. We started off with using the UI of SikuliX which is very basic. You take a command, for example: ‘click()’ and in the parentheses you add a printscreen of for example your browser button. You then run your script and Sikuli finds and clicks the image it finds on your screen that matches what you added in the script. Next up is integrating SikuliX in your test framework. In the workshop we used Java for this. This allows you to combine for example Selenium Webdriver, jUnit and SikuliX functionality. This allows you to check if a certain image exists when you browse to a page. This is a great addition to not just verify you are at the expected location, but to also make sure at least a certain graphical element shows up as you expect it to. It also allows you to easily perform actions outside your browser.

I should mention that using SikuliX does come with all risks and constraints of a record and playback tool, so really think carefully why you want to use it. I suggest you search for good testcases and common issues with record and playback tools in testing to learn more about this.

 

So the second workshop is done and there is only one left. Time for dinner with some old and new tester-friends and then on to the final workshop.

 

How to Cuke up your tests (with Cucumber)

The last workshop of the day and beforehand the one I looked forward to the most: Cucumber! I have knowledge and experience in working with Selenium Webdriver with Java, C# and Python but never got around to playing with Cucumber. I have worked a lot with the Gherkin syntax to (re-)write user stories but never took the step to add them to Cucumber.

The first 30 or so minutes of the workshop was spent on installing Java, IntelliJ and importing the Workshop project including Cucumber into IntelliJ. The approach of the workshop was much more hands-on than the previous two sessions. You learn most by doing (I fully agree!) so we got a cheatsheet with IntelliJ shortcuts and some Xpath and CSS-Selector tips as well as some exercises. The three hosts of the workshop were mostly occupied with helping people whenever they got stuck, and occasionally demo’d solutions of some exercises with a focus on the things people struggled with.

To summarize: After getting organized and the project set up, it is actually amazing how little extra effort it is to expand your test framework around Selenium Webdriver and jUnit/TestNG with Cucumber. If you are in a project where user stories are written in Gherkin syntax it is a matter of adding those user stories in your framework and writing the methods the same way you did before (With the user of webdriver and jUnit/TestNG to execute those Gherkin user stories and validate their results.).

I do not want to go into more how-to details in this post. I suggest you find some good resources on Cucumber, SikuliX and OpenShift and work with those. What I want you to take from this is let you know these tools exist and that, in the case of Cucumber and SikuliX, they are very easy to implement into your test frameworks. In the case of OpenShift, that is not so easy to grasp but it does make management of your environments a breeze. So if you ever come across OpenShift, do not fear, it is there to actually make your life a lot easier!

 

I had a great time today at Testnet and I look forward to the next workshop event ( fall of 2018). Now it is time to put some of my learnings into practice. Especially SikuliX and Cucumber are tools I am going to play around with.

Happy testing!