Skip to content

Instantly share code, notes, and snippets.

@mischah

mischah/Gruntfile.js

Last active Aug 29, 2015
Embed
What would you like to do?
DalekJS Remote test execution
{
"browsers": [{
"ieWin": {
"type": "remote",
"actAs": "ie",
"host": "10.0.2.15",
"port": "9020"
}
}]
}

Can’t get it running.

I used dalek --remote on the remote machine (VirtualBox VM - Windows 7, IE9).

The functionality of DalekFile seems to be broken. See https://github.com/dalekjs/dalek/issues/121

So I decided to use the grunt task and the options object instead.


Firing the grunt task leads to the following behaviour:

Without using browser: ['ieWin'], in addition to the advanced settings

$ grunt
Running "dalek:test" (dalek) task
.
>> 1/1 assertions passed (2.49 sec)

Done, without errors.


Execution Time (2014-07-11 16:12:19 UTC)
dalek:test  3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 3s

But IE isn’t opened within the VM 😞


With using browser: ['ieWin'], in addition to the advanced settings

$ grunt
Running "dalek:test" (dalek) task
Fatal error: connect ETIMEDOUT
Error: connect ETIMEDOUT
    at errnoException (net.js:904:11)
    at Object.afterConnect [as oncomplete] (net.js:895:19)


Execution Time (2014-07-11 16:18:03 UTC)
dalek:test      1m 15.6s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 1m 15.6s

With using browser: ['ie'], in addition to the advanced settings

$ grunt
Running "dalek:test" (dalek) task
Fatal error: spawn EACCES
Error: spawn EACCES
    at errnoException (child_process.js:998:11)
    at Process.ChildProcess._handle.onexit (child_process.js:789:34)


Execution Time (2014-07-11 16:20:33 UTC)
dalek:test   274ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 99%
Total 276ms
// JSHint settings
/* jshint camelcase: false, es3: false */
'use strict';
module.exports = function(grunt) {
// Get devDependencies
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
// Displays the execution time of grunt tasks
require('time-grunt')(grunt);
// Config
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dalek: {
options: {
//browser: ['ieWin'],
reporter: ['console'],
// don't load config from an Dalekfile
dalekfile: false,
advanced: {
'browsers': [{
'ieWin': {
'type': 'remote',
'actAs': 'ie',
'host': '10.0.2.15',
'port': '9020'
}
}]
}
},
test: {
src: ['tests/firstTests.js']
}
// Target-specific file lists and/or options go here.
}
});
// Default task
grunt.registerTask('default', ['dalek:test']);
};
{
"name": "DalekJS-Hackathon",
"description": "Hacking around with DalekJS",
"version": "0.0.0",
"devDependencies": {
"dalek-browser-chrome": "0.0.10",
"dalek-browser-firefox": "0.0.6",
"dalek-browser-ie": "0.0.4",
"dalek-reporter-html": "0.0.3",
"dalekjs": "0.0.8",
"grunt": "^0.4.5",
"grunt-dalek": "^0.2.0",
"load-grunt-tasks": "^0.6.0",
"time-grunt": "^0.4.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.