Close

Community Spotlight - December 2016

Time for another episode of Vaadin Community Spotlight. This time I had the opportunity to talk with Ángel Martínez.

Ángel Martínez has a BSc and MSc in Telecommunications Engineering and a Masters degree in Business Development & Digital Marketing. He has more than 10 years experience working in R&D projects related to health care, wellbeing, social inclusion, and independent living. He is the father of Leo and is passionate about climbing, running, and of course, new technologies.

Hi Ángel, it’s great to have you with us for this interview. You have been doing a lot of web development with Vaadin. How did you come upon Vaadin and why did you decide to use it?

First of all, a huge thanks for having me. I’m more than glad to be interviewed by Vaadin. My love story with Vaadin started in 2012, when I had to code the frontend for an R&D project which aim was to release a technological platform that provides daily guidance and support for the informal caregiver community, for the long-term care of their loved ones (elderly people). The (sad) reality was that coding with pure web technologies like HTML, CSS and JavaScript was out of my scope, but I had good expertise developing with Java Programming Language (using both SE and EE flavours). Then, I carried out some research about well-accepted frameworks for Java developers and found The 2014 Decision Maker’s Guide to Java Web Frameworks (thanks a million to the Rebellabs team for writing such a good report). After writing two “Hello world” pieces of code, I was totally in love with Vaadin Framework.

Since then, and until today, I have been using it on a daily basis in both professional and personal projects. I have also been involved in the Community and even had the opportunity to take part in the IBM Vaadin Challenge in 2014, and guess what? I won one of the prizes!

So, how does Vaadin work? Could you briefly explain it for anyone with no previous experience?

The thing I like most about Vaadin is how easy and fast it is to develop a web application from scratch. Do you have some experience coding with pure Java? If so, I bet you a beer that you are able to code and (at least) locally run your own “Hello world” Vaadin application in less than 10 minutes. You will spend more time setting up the working environment, installing the required plugins and so on, than coding it (true story, I am not joking).

What other technologies or libraries are you often using in your Vaadin projects?

Although there are not specific libraries, currently I am very focused in the integration of Vaadin projects with cloud infrastructure, like Google App Engine, Amazon Web Services, and IBM Bluemix. It’s an exciting topic and there are a lot of interesting things to do there!

What are the top features you’d like to see in the upcoming versions of Vaadin Framework?

Although it is a very difficult question, I’d add to my “letter to the three wise men” the following topics: 1) the possibility to develop Vaadin applications on the client side in the same way they are coded on the server side, and 2) a better integration with cloud infrastructures (may I ask for an update in the source code of the GAEServlet class?) and the inclusion of the Viritin plugin to the trunk of Vaadin Framework.

Anything else you'd like to add?

Once and again, thanks a million for giving me the opportunity to answer your questions. Also, many thanks for coding such a good framework and releasing it as Open Source. You are doing an awesome job with this. And of course, please feel free to contact me if you have any questions or doubts. I am more than happy to talk with you on twitter (@angel_cavero) or through my 100% pure Vaadin website (http://deunosyceros.appspot.com).

Thanks Ángel for sharing your thoughts with us!

Try Vaadin today! Read or watch the tutorial

2016 Recap

That’s it folks. We are ready to move this year into the “Done” column. I guess we are all eager to jump ahead to 2017 already, but let’s take the traditional retrospective of 2016 before doing that.
 
 

As a company we have continued the steady growth. Our internal chat channel now lists 137 members. This means some 30% growth since last year. In addition there are now over 1k Certified Vaadin Developers around the world. 

A bigger Vaadin team means that we can do more for you. This year, we published 100 articles in the vaadin.com blog, attended over 20 events and had almost 40 speeches in conferences and user groups - including our own Vaadin Dev Days. I guess many of you have participated in some of our tech webinars, but the thing that we really have put more focus on this year are our tutorial videos.  Vaadin YouTube channel is becoming the most popular resource for learning new stuff, with over 1.3 million views this year.

 

With product releases we did extremely well. Vaadin Core Elements got 6 releases, the framework a full 21 releases and the next major version, Vaadin Framework 8, is already in beta. With renewed simple, Java 8 compatible data APIs, we are expecting a lot from it.

But that is not all that has happened. You in the community seriously overshadowed official release statistics with a total of 107 new add-ons released and close to 1k updates in 2016. Amazing work everyone!

Before closing the year, the last thing I wanted to highlight is the most exciting thing to me and other open source enthusiasts: We are now finally fully in GitHub with all of our projects. Now we can use forks, clones, and pull requests all the way. Truly believe, this makes development much easier and I also hope to see your name added in the contributors list.

See you in 2017!

TestBench 4.2 is out with new convenience methods

TestBench 4.2 brings you a very nice improvement for screenshot testing, a few convenience methods, easier configuration of parallel testing, and bug fixes.

Taking screenshots of individual elements

Using the screenshot testing feature of TestBench makes it easy to validate that your custom application theme is working, or that any large group of components are visually in a desired state. Just call testBench().compareScreen("yourImageName") and TestBench compares the test screenshot with the reference image you set up.

Taking screenshots of the whole application view is in many cases error prone, which means that you need to mask out the volatile parts of your views in the reference images. Masking means that you need to edit the reference image in an image editor and remove parts that you don’t want to have compared. Using the TestBench calculator demo project screenshot tests as an example, in picture 1, I have removed the calculator log part from the comparison by setting it as transparent.

Masking out parts of a screenshot reference
Picture 1. Masking out parts of a screenshot reference

TestBench 4.2 introduces screenshot comparison of individual elements. You can still compare screenshots of a full application, but now you can also query a single component or a layout and make the screenshot comparison only to that component.

Using the same calculator example, I can write

GridLayoutElement keypad = $(GridLayoutElement.class).first();
assertTrue(keypad.compareScreen("myReferenceImageName"));

And the resulting screenshot can be seen in Picture 2.

Taking and comparing a screenshot of a single layout
Picture 2. Taking and comparing a screenshot of a single layout

Convenience methods

Writing more readable code with less characters is always nice, even in test code. TestBench 4.2 brings out a few new convenience methods.

If you found yourself repeatedly writing myWebElement.getAttribute("class").contains("my-style") you can now just write myTestBenchElement.hasClassName("my-style"). The added benefit of this is that hasClassName actually matches only the tested class name, when getAttribute("class").contains("my-style") matches also "my-style-variant” and “my-styles” etc. If you need to match all the style names of an element, you don’t have to write getAttribute("class") and receive a single String, but you can get them in a Set with getClassNames().

Finally, the ElementQuery.last() method allows you to select the last of the matched elements. Query $(HorizontalLayoutElement.class).id("dialog-buttons").$(ButtonElement.class).last() selects the last button in a HorizontalLayout having an id “dialog-buttons”. That’s comfortably shorter than before:

ElementQuery<ButtonElement> query = 
    $(HorizontalLayoutElement.class).id("dialog-buttons").$(ButtonElement.class);
query.get(query.all().size() - 1).

Easier configuration of parallel testing with system properties

When doing parallel testing, you can now configure the test hub hostname with the system property -Dcom.vaadin.testbench.Parameters.hubHostname instead of using @RunOnHub annotation. Similarly, a different system property can be used to configure the test to be run locally on a given browser instead of in a hub. You can write -Dcom.vaadin.testbench.Parameters.runLocally=chrome instead of using the test class annotation @RunLocally(Browser.CHROME).

Having the parameters available makes it possible to configure test runs for different environments. You can, for example, use Maven profiles or set the system properties in CI server settings.

More reasons to update

There are some very useful additions to the TestBench Element classes (see release notes). Maybe the most anticipated one is the ability to get number of rows in Grid by calling GridElement.getRowCount().

TestBench 4.2 also adds a bunch of bug fixes. My favourite fix is adding some missing waitForVaadin calls, which forced me to do explicit waits in some cases of my test code. All-in-all 4.2 is a good minor release. I highly recommend updating.

Vaadin TestBench 4.2