Can Of Code

BCS Software Testing Foundation book review

I had decided it was time to learn a bit more about Software Testing with the aim of improving my own software quality. The book I decided to read for an overview was Software Testing: An ISTQB-BCS Certified Tester Foundation guide. The book acts as a guide to a certification that the BCS offer so it would likely supply a good overview of the field.

 

BCS Software Testing book

This book makes no assumptions about its audience and therefore I don’t feel that you need any background in software or testing to get something out of it. If anything I was impressed at the pragmatic insights the book made, clearly showing that it had been written by people who have experience in testing within a wide range of different sized businesses. An example of this would be how the authors have awareness that the task of testing can often get passed to other members of the team when a dedicated tester isn’t present.

I was also impressed by how the book starts by setting the expectation that its impossible to catch all errors therefore its important to focus testing based on risk to do an effective job within the limited time and resources.

I felt that the book and most likely the field of software testing itself has a lot of overlap with other disciplines within software such as project management, systems analysis etc. So if you already have some background in software you are likely to be scanning through some parts of the book, although these do act as a good refresher.

A recommendation the book made which caught my eye was that it recommended external contractors for testing because of their independence from the project and team. This to me reinforced my thinking that a testing consultancy would be a great opportunity to start for the smaller digital agencies who don’t have the level of work load or resources to have a full-time or even part-time tester as part of the team.

Another important message the book conveyed was the importance of testing as early as possible suggesting that finding an error at the requirements stage is a lot more cost effective than at any later stage referred to as the “cost escalation model”.

I found it a little disappointing that the tooling support section did not give links to examples of tools that the reader could then go and investigate to get a better idea of how they work. I do understand that it might have been out of scope of the certification but I believe it would help.

Summary

Weighing in at around 250 pages this offers a good overview of testing which I would recommend to anyone in software, more so for those who don’t currently have a formal testing procedure. As a developer myself I felt it give me a better understanding of testing that I could either implement myself on smaller projects or help support in larger projects. From my own experience just knowing the difference between simply retesting something and performing regression testing has been a help regardless of the size of the project. It has also enabled me to focus on risk when decided what should be testing and how that should be tested.

I found that even with the BCS member discount, this was still way cheaper on Amazon or Wordery.

Posted in Books, General, Software | Tagged , , , | Leave a comment

Grunt and npm

Why Grunt?

Having spent a lot of time in Visual Studio working on ASP MVC sites I hadn’t had a chance to really get my head around the new tools around managing dependencies and running build tasks because Visual Studio does a lot of that for you, with bundling and NuGet etc.

However  work dictated that I had to spend some time working on a WordPress theme which meant leaving the comforts of Visual Studio behind.

I have come to prefer Brackets as my text editor because of its simplicity and extension support. I had plugins that would minify JavaScript when saving as well as a LESS compiler which helped automate some of the common tasks but was far from perfect.

What made me investigate Grunt properly was the laborious process I was performing to make changes to the WordPress theme. At the same time I was working my way through the new Smashing Magazine’s Book “Real life: Responsive Web Design” which included an article explaining Grunt for people like me.

I already had Node installed so I was ready to have a go at grunting.

Grunting 101

In the root folder of your project you will create a few files that will keep track of what dependencies you have added to your project as well as to tell Grunt what you want it to do.

So first off you need to get NPM up and running so we can install grunt. assuming you already have Node setup all you need to do is run in a Command Prompt from within your root folder:

npm init

This will guide you through creating a package.json which tells NPM your projects dependencies. You can just keep pressing enter to power through it.

npminit

Next up we need to add Grunt as a dependencies so we can start automating. This is once again a single command

npm install grunt --save

The “–save” flag is important because it adds the dependency (Grunt) to the package.json. This means that when someone else comes along to work on your project. they just have to type “npm install” and all the project’s dependencies will get installed.

The next step is a little annoying, because unlike NPM, Grunt doesn’t have a “init” command so you have to create a new file in the root folder called “Gruntfile.js”. Your best step next is to copy the example grunt file from the grunt website or below:

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    uglify: {
      options: {
        banner: '/*! < %= pkg.name %> < %= grunt.template.today("yyyy-mm-dd") %> */n'
      },
      build: {
        src: 'src/< %= pkg.name %>.js',
        dest: 'build/< %= pkg.name %>.min.js'
      }
    }
  });

  // Load the plugin that provides the "uglify" task.
  grunt.loadNpmTasks('grunt-contrib-uglify');

  // Default task(s).
  grunt.registerTask('default', ['uglify']);

};

Adding useful stuff

The example above uses a Grunt task called “Uglify” which can minify your JavaScript. Before this configuration will work you will need to install the Uglify NPM Package.

npm install grunt-contrib-uglify --save

That should do it. Now you can run:

grunt

Grunt will process it’s config and proceed to run “uglify”. Its likely that the task failed because your need to edit the config to fit your project setup.

This is the basic workflow of adding Grunt tasks.

  1. Install grunt package using NPM not forgetting the –save flag
  2. Add task to initConfig. An example of the config is almost always included in the readme of the package
  3. Tell Grunt to load the NPM package with
    grunt.loadNpmTasks("package-name");
  4. Add the task to the default registered task by adding it’s name (“uglify”) into the array [‘task1’, ‘task2’]
    grunt.registerTask('default', ['uglify','package-name']);

Get Grunting

Once you get the hang on of it, these tools can be extremely powerful. After a few hours of messing around I was able to:

  • Copy the files I wanted to deploy into a build folder
  • Combine and minify the JavaScript
  • Optimize images in the project
  • Deploy the output using SSH to the test server
  • Automate the whole process when a file in the source directory changes!

I will follow this blog post with a walk through of the Grunt file that handles all of this.  I hope this has inspired you to go and try out Grunt and NPM and in no time at all your be able to tell me all the cool things I have naively omitted.

 

Posted in Web | Tagged , , , | Leave a comment

My Oculus Rift Experience

In a moment of madness I decided to purchase a Oculus Rift DK2. The ordering process said to expect delivery to take 1 – 2 weeks however in my case it was just a few days.

oclusdk2

The general setup was pretty simple, with just one runtime to install.  There are a lot of cables and you will need at least two USB ports spare and a Full size HDMI port.

I was running Windows 8.1 which led me to the first problem.  The runtime I was using (0.4.4) had a display driver that stopped the device from getting detected in the control panel. I found after searching that this could be “Fixed” by uninstalling just the “Oculus Display Driver” within Control Panel.

No Device Attached :(

No Device Attached 🙁

From my basic understanding there are two modes the Oculus Rift can be run in. First is the Direct Mode which I was never able to get working on both Windows 7  and Windows 8.1. The extend mode is where Windows treats the Oculus as a secondary monitor which did work for me. However I found even the Extend mode to be very fragile with some apps working and some not.

After a lot of fiddling I managed to get the Demo Scene to work therefore giving me my first taste of VR!

The demo scene consists of a desk in front of you in a empty blue room of which you are stationary. Considering this is just a very simple demo its still enough to impress, I wouldn’t like to admit the time spent staring at a VR potted plant.

 

How about Steam Then

Steam has a VR mode which consists of the Big Picture Mode running in a semi circle in front of you. You can use the head tracking to look around the interface and use a keyboard to interact.

When trying to get Team Fortress 2 to run I ran out of luck. I either got the game running in a window on the wrong screen or the game just wouldn’t launch.

What’s next

I’m going to investigate into what enviroment (OS + Hardware) that others have had the best luck with. Failing that i may just wait until a new verison of the runtime comes along.

Should I get a Oculus Rift DK2?

Devs only!

Devs only!

I think there is very very good reason that the store asks you to agree that this is not a consumer product.  Its just not ready yet! I think its more the case that the software (Drivers etc) are just not ready for the masses.

If you really can’t wait until the end of the year when the Steam VR is due out, then go ahead and get a Oculus Rift DK2 BUT be prepared for it to not work, be prepared to spend a lot of your time trying different apps, different settings,  different operating systems to get something that works.

 

 

 

 

Posted in Hardware | Tagged , , , | Leave a comment