Refactoring Legacy Web Forms for Test Automation
The Challenge:
a Bahá'í, software engineer, and nature lover in Austin, Texas, USA
The Challenge:
Birds were not my friends as a child. For some reason birdsong in my backyard was an annoyance. I knew how to distinguish a handful of birds from one another, but they simply held no fascination. Reptiles were much more interesting. In hindsight, I think it was the call of the Northern Cardinal — possibly awakening me in the early hours — that caused my mild disdain. So how did I arrive at this point where birding brings me such joy?
Back in October I started playing around with a few technologies, resulting in my first code posted to GitHub: safnetDirectory. I must say that it is not the most impressive bit of coding that I’ve ever done. However, the urge to learn sometimes needs an unencumbered, no-strings-attached, digital canvas on which to exercise. That urge is requited through the experimentation and the lessons learned, rather than the completion of an opus.
Nature-lovers often speak about transcendent moments, occasions where some experience moved them to a profound awareness of life, the universe, and everything in it. For some, these are timeless minutes, forever memorable, forever inspiring. All of the senses align in memory, and perhaps a bit of wisdom descends in epiphany.
Beware, o ye who walks in the woods with me. For I cannot help myself: I must share. Look at this little fern over here. This is a nice soapberry tree. So many ant lion nests here! Did you hear the tsip sound? Do you think it’s a Dark-eyed Junco or a Yellow-rumped Warbler?
Some folks grow up in households of privilege where trips to the family cabin / ranch / lake-house are common. We had the next best thing: a family friend generous enough to invite us along to The Ranch. Now, The Ranch has a more formal name, but its legend and personal history are best distinguished by turning the general, specific.
My earliest experiences of nature were of playing in the yard — and out back — as a child in a Houston suburb. As I recall it, our backyard had a pecan and some young oaks, along with multiple gardens. There was a red oak — or perhaps a maple? — planted out front, and a sweet gum tree whose seed casings would bring forth caution in even the most carefree of barefoot children. And of course there was the St. Augustine grass. This was all conducive to much play outside. But the best part was behind the fence: The Ditch.
Desiring to learn about both Node.js (particularly as an API server) and ASP.Net Web API, I decided to throw one more technology in the mix and see which one is faster at relaying messages to a service bus, namely, RabbitMQ.
Time to turn that Node.js test green. In Part 2, I succeeded in publishing a message to RabbitMQ using Node.js. However, my automated test failed: the .Net test runner could not handle the generated message. Three key elements were missing, which are required for the MassTransit .Net library to interpret the message correctly:
Desiring to learn about both Node.js (particularly as an API server) and ASP.Net Web API, I decided to throw one more technology in the mix and see which one is faster at relaying messages to a service bus, namely, RabbitMQ.
And now, I finally get back to blogging about the ASP.Net Web API code that I wrote for this head-to-head comparison of REST service and message bus integration. The official tutorials were my guide for Web API, and as with the test runner in part 1, I used MassTransit as a convenient library for publishing from .Net code to RabbitMQ. Owin was my solution for self-hosting the web application.