Where do I put my testing effort?

In the past I have blog on the subject of using advanced unit test mocking tools to ‘mock the unmockable’. It is an interesting question to revisit; how important today are units tests where this form of complex mocking is required?

Of late I have certainly seen a bit of a move towards using more functional style tests; still using unit test frameworks, but relying on APIs as access points with real backend systems such as DBs and WebServices being deployed as test environments.

This practice is made far easier than in the past due to cloud services such as Azure and tools to treat creation of complex environments  as code such as Azure Resource Manager and Azure DevTest Labs. Both myself and my colleague RIk Hepworth have posted widely on  the provisioning of such systems.

However, this type of functional testing is still fairly slow, the environments have to be provisioned from scratch, or spun up from saved images, it all takes time. Hence, there is still the space for fast unit tests, and sometimes, usually due to limitations of legacy codebases that were not designed for testing, there is a need to still ‘mock the un-mockable’.

This is where tools like Typemock Isolator and Microsoft Fakes are still needed. 

It has to be said, both are premium products, you need the top Enterprise SKU of Visual Studio to get Fakes or a Typemock Isolator license for Isolator, but when you have a need them their functionality they are the only option. Whether this be to mock out a product like SharePoint for faster development cycles, or to provide a great base to write unit tests on for a legacy code base prior to refactoring.

As I have said before, for me Typemock Isolator easily has the edge over Microsoft Fakes, the syntax is so much easier to use. Hence, it is great to see the Typemock Isolator being have further extended with updated versions for C++ and now Linux.

So in answer to my own question, testing is a layered process. Where you put your investment is going to be down to your systems needs. It is true, I think we are going to all invest a bit more in functional testing on ‘cheap to build and run’ cloud test labs. But you can’t beat the speed of tools like Typemock for those particularly nasty legacy code bases where it is hard to create a copy of the environment in a modern test lab.

Out with the Band in with the Garmin

I have been using the Microsoft Band (both version Band1 and Band2) since they came out, and been reasonably happy. However, a year or so on my issues with it have remained the same

  • Poor battery life, I can live with charging it each day, but even with GPS Power-saver mode on I can’t go for any exercise over about 4 hours (bit of an issue for longer bike rides)
  • It is not waterproof, so no swimming (and worried doing the washing up)

Also there seem to be some build issues with the robustness of the Band2. I had to get mine replaced due to it not accepting recharging and the forums seems to report people suffering problems with the wrist strap splitting. That said, the warrantee service seems excellent, no complaints there, mine was swapped without any issue in a couple of days

In the end however, I decided it was time to to check out alternatives and picked the Garmin Vivoactive HR; basically the Garmin equivalent to the Band in feature set and price (it is a little more expensive in the UK)

 

image

 

I have to say a couple of weeks in I am very pleased. It fixes those two major issues for me. Most importantly I seem to need charging it only about every 5 days or so, that is with with an hour or two of full activity tracking each day. The specs claim 10 hour+ for full activity tracking on a charge. Also it is waterproof and allows activity tracking for pool based swimming (swim mode is lap based and has no GPS enabled so less use for open water).

That all said there are still issues

  • The Bluetooth link to my Windows Phone 10 is a little temperamental for things like notifications and sync –  a restart usually fixes everything (but hey it fully supports Windows Phone 10 not just Android and iPhone!)
  • Shame they disable heart rate monitor for swimming (signal not reliable enough, unless you pair with a chest strap it seems)
  • Lack of open water swimming tracking (see above – but of you want full multisport tracking look at the Garmin 920XT, their top of the range watch it does it all)

But I think these are all minor issues for me, and the third party apps store for the device help such as adding triathlon support which attempts HR monitoring for swimming, without needing to upgrade to the 920XT.

So a good alternative to theBand2?

For me yes, it addresses my key issues. Band2 is a good fitness tracker with unique styling, but if swimming or longer activities are your thing I think the Garmin Vivoactive HR has it.

Life gets better in Visual Studio Code for PowerShell

I have been using Visual Studio Code for PowerShell development, but got a bit behind on reading release notes. Today I just realised I can make my Integrated Terminal a Code a PowerShell instance.

In File > Preferences > user Settings (settings.json) enter the following

 

// Place your settings in this file to overwrite the default settings
{
     // The path of the shell that the terminal uses on Windows.
    "terminal.integrated.shell.windows": "C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
}

Now my terminal is a PowerShell instance, and you can see it has loaded by profile so POSH Git is work as well

 

image

 

So I think we have reached the goodbye PowerShell ISE point

Building bridges – getting DevOps working through Devs and IT Pros talking and learning from each other

I was lucky enough to attended and be on a panel at yesterdays WinOps London conference, it was a different and very interesting view on DevOps for me. I spend most of my time consulting with test and development teams, with these teams it is very rare to come across a team not using source control and they commonly have some form of automated build too. This means any DevOps discussion usually come from the side of ‘how can I extend my build into deployment…’.

At the conference yesterday, where there seemed to be more IT Pro attendees than developers, this ‘post build’ view of was not the norm. Much of the conference content was focused around the provisioning and configuration of infrastructure, getting the environment ‘ready for deployment of a build’. What surprised me most was how repeatedly speakers stressed the importance of using source control to manage scripts and hence control the version of the environments being provisioning.

So what does this tell us?

The obvious fact to me is that the bifurcation of our industry between Devs and IT Pros  means there is a huge scope for swapping each group’s best practices. What seem ingrained best practice for one role is new and interesting for the other. We can all learn from each other – assuming we communicate.

This goes to the core of DevOps, that it is not a tool but a process based around collaboration.

If you want to find out more about how we see DevOps at Black Marble we are running events and are out and about at user groups. Keep an eye on the Black Marble events site or drop me an email.

First experience of a Band 2

I have been using a Band 2 for a couple of weeks now as opposed to my original Band. The major thing I have noticed is I don’t notice it on my wrist. It feels just like a watch.

The old one, though not too bad did feel a bit lumpy, banging on the wrist. So that is an improvement, also it looks less like I am a prisoner with a tracker on day release. The Band 2 looks like a designer was more involved as opposed to just engineers.

But how does it compare to my issues with the original Band?

  • Is it now waterproof? – No, still can’t swim with it.
  • How about battery life? – Seems a bit better, on a day to day use I am charging it roughly every couple of two days as opposed to each day. I have not tried a long cycle ride yet, so it remains to be seen if I get more than about 5 hours of full data capture. I would expect a bit better, but not a huge gain
  • Does the touch screen work when it is raining or my fingers wet? – Does seem better

So all positive thus far

Is the Microsoft Band any good for Triathlon? Training Yes, racing No

The title says it all, I have been using a Microsoft Band for a few months now and have found it a great tool for running and cycling as long as you are going out for less than about 5 hours. I tried to use for the first time Triathlon race at at the Leeds Triathlon over the weekend.

As it it not water proof it was not an option for the swim (unlike my old Polar HR monitor), so I put it on in T1 (swim to bike), don’t think it wasted too much time! This is where I hit the first issue (or second if you count that it is not waterproof) that my finger was too wet to operate the touch screen. I have seen this issue on runs on rainy days. So I did not manage to switch it to cycle mode, and did not bother to try again whilst cycling after I had dried out – a had other things on my mind like being a in good aero position and get moving faster.

I did however manage to switch to run mode as I ran out of T2 (bike to run) and it worked OK there.

So my wish list

  • Make it water proof, enough for open water swimming
  • Add a way to sequence different activities (swim, bike, run) and have a simple button what works with wet fingers to switch between them – maybe a de project for myself
  • And of course better battery life

So I still think it is a good product, just not 100% perfect for me as yet

Windows Media Center issues again

Today was my day for semi annual Media Center (MCE) problems. As usual they seemed to start with an unexpected power issue, a local power cut, maybe the answer is a UPS for the TV setup? Once the PC was rebooted it had forgotten it had any tuners. If I tried to view live TV or re-setup the TV signal it just hung with a spinning ‘toilet bowl of death’ cursor. Corrupt TV data DB I suspect, I have seen it before

I tried clearing the DB content in C:\programdata\windows\ehome, but no luck. In the end I did the dirty fix of

  • Going into Window features
  • Remove media center
  • Reboot
  • Re-add media center
  • Re-run MCE setup – this took over an hour, it is slow to find Freeview channels

Downside of this is that it has the issue it resets all the series settings, media locations etc. but it does tend to work.

My MCE seems to have been getting slower and generally needed more reboots for a while, strange is it has been on the same dedicated hardware for a few years.  Given Windows 10 is on the horizon and it has no MCE I guess it  is time to revisit an MCE replacement (or leave my MCE box on Windows 8). Last time I looked the issue was PVR support for Freeview and general ‘wife friendly operations’. It does seem that fewer and fewer people are prioritising terrestrial broadcast as media source, it all seems to be about streaming. Just don’t think I am there yet, I like my PVR. But there is no harm is a trawl of the other current offerings, I might be surprised

Updated 9pm  when the setup wizard actually finished – turns out my media library settings were not lost, just series recording settings

After a few days living with a Microsoft Band…

I have worn a Polar s610 heart rate monitor as my watch for years (probably 15+), as I write it needs another battery swap, which means sending it to Polar, something I have done a couple of times in the past for servicing The batteries in the watch last 5 years or so, in the associated heart rate monitor strap maybe a bit more depending on usage.

The point is I am used to having a device that ‘can’ give heart rate information, it seems normal, but I do need to remember to put on the heart rate strap, something I would only usually do for a race or specific training set. Now don’t get me wrong having the s610 does not mean I am a talented athlete, but I do have good idea of my heart rate for any given sporting activity

So this week I got hold of a Microsoft Band, nice timing as my s610 needs that new battery, but how has the Band done?

Microsoft Band in Watch Mode

Whilst in the USA last year I had tried on other people’s Bands and felt them cumbersome, but mine is a small (previously I had only tried on large or mediums). Actually I find it little worse on the wrist than the s610. So tip here – it seems sizing is critical, especially if have spindly little wrists like me. Like compression sport wear, if in doubt err to a smaller size.

Beyond being a watch, I have been using it to track my runs and cycling and the HR seems accurate, at least the numbers are within a few beats of what I would expect on the s610, and it is so much easier than remembering the monitor strap for my Polar. It is great that it gets so much information so easily, and that it  can push it onto other services as I want without me having to play with modem style audio based Polar SonicLink (I did say my s610 is old)

But of course I do have some issues:

  • The obvious one is battery life. I am seeing 6 to 48 hours depending on how much GPS I used. For the first two days it was great, when I used it as a watch, no charging needed. However, yesterday I did a a 5K Parkrun and a 40K bike ride, so after less than 3 hours of GPS, HR and screen on etc. it needed a charge. I can live with this I think, I do need to make sure the screen is off and see how that helps. I don’t want it dying on a half day or so cycle ride.
  • Turns out I glance at my watch a lot – as by default the screen is off I have to press button to see the time – it took me back to the LED watches of the 70s. Again this comes back to battery life. I know I can leave the screen on, but it just needs to much power.
  • When running the splits are in km, it would be nice to have my own trigger e.g laps.  For example on my local Parkrun we do 3 laps, and I know my target splits. On the Polar I have a big red button to press for each lap to get a lap time,  on the Band I have to do maths in my head. Now there might be a way to do this, but I have not found it yet.
  • Finally my major issue is it is not waterproof so can’t wear it to swim, so not useful in a Triathlon as it is as something else to have to put on in T1. Also I do use the time splits in the pool on my S610 when training, again counting laps not KM (I don’t swim that far!). Not sure how they would make it fully waterproof, but it would be a great feature.

So first thoughts, loads better than I expected, all my niggles are minors and are more to do with current battery technology than the device itself. For the price, £169 at Amazon UK for pre-order, an interesting alternative to Garmin or Polar. Certainly got some interest at the 10K race I did this morning.

Great book full of easily accessible tips to apply the concept of user stories to your team

As with many concepts it is not the the idea that is hard but it’s application. ‘Fifty Quick Ideas to Improve Your User Stories’ by  Gojko Adzic and David Evans provides some great tips to apply the concept of user stories to real world problems. Highlighting where they work and where they don’t, and what you can do about it.

I think this book is well worth a read for anyone, irrespective of their role in a team; it’s short chapters (usually a couple of pages per idea) means it easy to pickup and put down when you get a few minutes. Perfect for that commute