Browser automation in Java using Cucumber and Selenium

JAVING
2 min readJun 15, 2020
Cucumber + Selenium combine those two at your own risk.

Today I will do a simple demonstration in which a BDD acceptance test written in Cucumber will be combined with Selenium to perform browser automation test. If you are an automation tester you will probably enjoy this video. And if you are a manager you will learn hopefully that this kind of testing should not be used indiscriminately.

Oh, yeah before I forget. If you are a programmer, specially a new one just out of uni, please don’t read this story. Go read something else, honestly. We shouldn’t be doing browser automation. When I did this, it was just preparing a tutorial to give to some testers that wanted to learn about automation.

Companies that use this kinds of test, do it only(or should do it only) for the purpose of having a regression test harness of only of the functionality that is more important critical for them. The reason why, is because exercising the system with a test from end to end can be really costly.

GUI tests belong in the top of the testing pyramid.

If you are a manager, please take a few seconds, or few minutes if you need to look at that image of the pyramid of testing. Think of it and question yourself why the GUI tests are at the top. Remember that pyramid before you hire an army of automation testers and start automating your whole system end to end from your GUI. If after thinking about it for a while you still are not convinced go to this article of M.Fowler and hopefully you will understand what I am talking about(I just don’t have time now to elaborate, just trust me).

If you are a tester stay and watch, you will like it.
If you are a dev, stay if you want but please avoid GUI automation
If you are a manager go read Martin Fowler before you watch this

Ok so now that I went through the safety check and I have warned the audience, here is the demo. I hope you enjoy

Did you enjoy this story? Please follow our medium profile give some 👏
Originally posted at: http://javing.blogspot.com/2017/04/browser-automation-in-java-using.html

--

--

JAVING

The present continuous form of “to program in Java”.