Fear of #fail

Fail OftenI often thought it would be good to have a Behat_In_The_Future build on CI.  Always red, maybe blipping green occasionally, and a constant reminder of work to be done. BDD quickly dissolves into the (just as useful) BDT, or behaviour Driven testing. The enthusiasm for the maintenance of feature files and scenarios, in the drive to do more by consensus quickly dries up. Why Many reasons, but here are a few … Read more →

Parallel testing with Behat & Grunt

grunt

To start (assuming you already have behat installed), install grunt-parallel-behat using npm:

npm install grunt-parallel-behat

Once the plugin has been installed, it may be enabled inside your Gruntfile.js (created in root of your behat directory) with this line of JavaScript:

grunt.loadNpmTasks('grunt-parallel-behat');

By default the tool will assume the behat.yml is in the same folder as the grunt file and it will run any feature files under the current directory.

To run, execute following within your behat root folder:

grunt

Note: This would run as if all tests are to be run in parallel, i.e. 1 per thread – to be specific about batches, and adding behat parameters, below is an annotated example of a working Gruntfile.js:

grunt.initConfig({
behat: {
src: '/path/to/features/**/*.feature',
config: './behat/behat.yml',
maxProcesses: 5,
bin: './bin/behat',
flags: '--tags @wip'
}
});

If only business was Agile …

You can write BDD features how you want, but always observe Gherkin-language approach.  Most BDD tools support this language, but this by means means constricts you.  You take the base, and build on it.  And specifying requirements this way enables taking a common approach easier to maintain.  What your product owners and stakeholders need to know is why they are doing them in this way.  With Agile, people were used to defining nice easy 3 lines user stories – little interest in the collections of tasks that the team work out in planning, in order to acheive what they believe is the intention.Breaking a user story into features, and broken down into scenarios provide even more direction for development, and just as importantly, highlights risks and potential blockers.
Read more →

Nothing good was ever fashionable

nathanbarley

When the fashion becomes bigger than the substance in tech world, I naturally resist its pull. The substance gets diluted, re-branded, and owned after lengthy patent suits. The same goes for electronic music, for me. After 1994, when the Criminal Justice Bill pushed parties back into commercial clubs, business worked out ways to clone and market it. Much of dance music in underground scene, provided the drum sounds for the drum machines still used today. Music and tech – standing on shoulders of giants, always.

Take the wonderful world of the web. The first online ad appeared in 1994.
1994 first online banner adThe first tv advertisement appeared for the internet in 1994 …
YouTube Preview Image
Read more →

Validate markup using nodejs/javascript

Quick way to check and report of markup validation errors, using java script, nodejs and the w3 validator. https://github.com/thomasdavis/w3cjs

Install using:-

npm install w3cjs

create example.js file to run the tests in following format:-

var w3cjs = require('w3cjs');

var results = w3cjs.validate({
	file: 'http://jaffamonkey.com', 
        // file can either be a local file or a remote file
	output: 'json', 
        // Defaults to 'json', other option includes html
	callback: function (res) {
		console.log(res);
		// depending on the output type, res will either be a json object or a html string
	}
});

To run test (and produce output), erun:-

$ nodejs example.js

To run test (and produce output), change “output” value to “html”, and run:-

$ nodejs example.js > results. html

Simple! And easy to integrate into Continuous Integration process.

Use angular.js with WordPress

AngularJS And WordPress

1. Download zip file.

Wordpress-angularJS
Wordpress-angularJS
wordpress-angularjs.zip
4.1 MiB
58 Downloads
Details

2. Install and activate the plugin.
3. Set wp-angularjs-include to true in Custom Fields on post edit page.

Sample test code:

<div ng-app>
  <label>Name:</label>
  <input type="text" ng-model="yourName" ng-init="yourName='jaffamonkey'">
  <hr>
  <b>Hello <span style="color: #ff6600;">{{yourName}}</span>!</b>
<div/>

Sample test code output (type anything into the input field to see “Hello …” string update:



Hello {{yourName}}!