Angular pitfall: Multiple HTTP requests with RxJS and observable$ | async

by Hallstein Brøtan

I recently discovered that our Angular app was making multiple HTTP requests unintentionally to the same REST API endpoint. The app was using the HttpClient introduced in Angular 4.3, which enables direct access to the JSON response when subscribing to the Observable from the HTTP request. The HTML markup…

End-to-end with Selenium: Writing your first UI-test

by Hallstein Brøtan

This is a basic example of how to write your first automated UI-test using C#, Visual Studio 2017 and the NUnit Framework (xUnit can also be used). The purpose of this blog post is to give you a clean and easy example to get started with UI testing. For implementation…

End-to-end with Selenium: Why you should UI-test

by Hallstein Brøtan

You want to be productive when building web applications. That means iterating fast and delivering continuously. As your application grows in complexity, how can you assure its quality - on each build? Say goodbye to manual regression testing and full mocked unit tests - get started with end-to-end automated UI-testing!…

NDC 2017 - What did I miss?

by Hallstein Brøtan

The purpose of this blog post is to give you a shortlist of talks that you might have missed during NDC (Norwegian Developer Conference) 12.-16. June 2017. Introduction NDC has just ended its 10th consecutive event in Oslo. As always, the speaker list contained big names like Troy Hunt…

Novanet Christmas calendar 2016 (Open sourced)

by Hallstein Brøtan

Christmas is closing in, and during this last month of the year we've been running a company Christmas calendar quiz. The calendar has been a success internally, but also attracted attention from customers and colleagues from other consultant firms (who wants to join in, but are not allowed..) The purpose…

Make Selenium wait for ajax calls using AngularJS (and TypeScript)

by Hallstein Brøtan

Acceptance tests for GUI are commonly regarded as painful, mainly caused by two factors: They have a long feedback loop Their stability is poor A common stability issue is dealing with asynchronous requests. Because ajax calls takes an unknown amount of time to complete, the test might do some assertion…

How many work days are there per month for a given year?

by Hallstein Brøtan

True story: I got a request from our economy guy, he asked me if I knew some online service to give him the number of work days for a given month. Turned out that he was manually counting the number on his calendar (probably several times to be sure), and…

Code on the beach 2015 - Review

by Hallstein Brøtan

This summer, Hans Arne and Hallstein attended the Code on the beach conference in Atlantic Beach, Florida. This is our thoughts about the Code on the beach experience, the conference that promises to "learn code with your toes in the sand." 1. The conference Code on the beach…

One to one (or zero) relationship using NHibernate

by Hallstein Brøtan

One-to-one (or zero) is a common relationship. It's when you want to store some optional information about something, but don't want all the columns in the same table. Still, I often find it unnecessary complicated when using an ORM like NHibernate or Entity Framework. I also see people avoiding this…

AngularJS with JSONP and how I get to work on time

by Hallstein Brøtan

My every morning challenge is reaching the bus to get to work on time. And the bus schedule is not something to rely on. Fortunately, the bus company in Oslo (called "Ruter" from now on) has its own REST API with real time data [1]. This is how…