Edit in JSFiddle

var myRouter = new Backbone.Router();

Backbone.history.start();

myRouter.route('test/:param', 'test', function (param) {
    console.log(param);
});

//use navigate() passing it the url to run, this will log 'foo'
myRouter.navigate('test/foo', {
    trigger: true
});