Integration tests, part 2 (notes on Cucumber and Selenium)

(This is part 2, some learnings a few weeks into the project described here: Integration tests = secucbootCucumber + Selenium + Spring Boot)

Selenium tricks:

Use the fluent wait instead of anything else, like here waiting for the expected messages to appear. Continue reading

Integration tests = Cucumber + Selenium + Spring Boot

Let’s say you had this web application with nice unit tests covering the backend calculations, where people keep calling wrong calculations from the frontend. Microservices or not, it happens, so you’ll need proper integration testing. Let’s say the integration testing is a well documented but tedious two days job of clicking around. Understandably, everybody does their best to avoid it…

My answer was: how about we rewrite the integration test scenarios in the Gherkin almost-human-readable language, so we can use Cucumber to run them automated, simulating with Selenium the user browser actions! The supporting stack will be Java and Spring, actually Spring Boot, because you know all I have is a hammer….

Continue reading

Automated AWS provisioning with Fabric

One of these days I decided to give a try to an opensource project which happens to run only on Linux. This sounds like nothing special unless your development machine happens to be Windows 7 and you don’t want to bother with downloading and maintaining virtual images. True, Vagrant would be a good option but getting it (and VirtualBox) to work with my enterprise-grade proxy access is a real PITA. Add to that the less-than-maintained vagrant-proxyconf plugin and the zillions of tools every one with own config files for proxies (gradle, git, maven, you-name-it)… Not at least, a local virtual machine is local and we’re heading to a cloud-based society right? So, AWS to go! Continue reading

Migrating emails from Notes to Outlook (or, programming for failure)

My huge archive of Lotus Notes emails started almost ten years back, and I stubbornly kept most of it around because of why not. Now that I use Outlook 2013 you can imagine I would have liked to have all of them also in my brand new email client. One sure could get some commercial software to do it, but why shouldn’t I try converting them myself? I mean, look, a simple drag and drop from Notes creates in Windows Explorer EML files and we all know EML is a very much standard format (RFC822 or so). Or at least that’s what I thought – Outlook 2013 thinks differently and will not import EML files. Only Outlook Express or Microsoft Live Mail can do that, but who cares about these anyway?? So what are my options?

Continue reading

How simple is simple? (from MongoDB to Elasticsearch)

IT must be easy, oh yeah. After years of courses and university and everything else, just because they were put together by the brightest educational minds you should be able in a second to program this new web application, integrate external web services, add a new GUI and adapt your friend’s broken Excel import, all while cleaning up grandma’s computer for the hundredth time. Even kids are to be taught programming, so it can’t be much in it right? How MANY times I heard this told in various ways “it can’t be so difficult”… Everybody has challenging jobs but as soon these involve computers everything should become a breeze, somehow. When did we get into this???

Trouble

But I digress. So, first a bit of context: I thought it would be big time I followed my own thinking from a month ago (see “Proof of concept, with a concept”) and actually migrate the proof of concept code from “Ractive.js and vert.x integration over the event bus” to use Elasticsearch. Continue reading

Proof of concept, with a concept

One problem I have when trying new technologies is actually seeing them in realistic situations – which translates to having a real use case for them. Think about this: when you build a “hello world” application you actually couldn’t be further away from the real world! I guess that’s why nobody calls it “hello real world” anyway… The whole experience you get from the proof of concept is just random installation trivia if you’re not using it to prove a point. That’s why it’s called “proof of concept” – it should have a concept, silly. Continue reading

Ractive.js and vert.x integration over the event bus

Recently I ran into Ractive.js which seemed like something doing exactly what I’d expect from a client side (browser that is) framework – fetch its own data and create nice web pages with that without getting me from the beginning too deep into JavaScript programming. Nota bene: I’m not a JS programmer and Angular or Ember just scare the s* out of me, plus I have strong moderate opinions against massive JavaScript framework programming so Ractive seemed like a convenient compromise. But would I be able to use it? In a vert.x project? Maybe I should try just that… Continue reading