Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

take out all references to X/Xvfb 'screen' as no longer used by phant…

…omjs
  • Loading branch information...
commit 3244039361973865b4a72e95658e0010e22dd81f 1 parent 85b1f2f
Mark Trostler authored
6 README.md
Source Rendered
@@ -52,7 +52,6 @@ Here are some important JUTE configuration variables and their defaults:
52 52 logfile: '/tmp/jute.log'
53 53 pidfile: '/tmp/jute.pid'
54 54 phantomjs: '/usr/local/bin/phantomjs'
55   - screen: 0
56 55
57 56 To set any of these do:
58 57
@@ -72,7 +71,6 @@ What the variables mean:
72 71 * logfile: Where JUTE dumps debug output
73 72 * pidfile: Where JUTE keeps its PID
74 73 * phantomjs: Path to 'phantomjs' executable
75   -* screen: Screen number of X Server for PhantomJS
76 74
77 75 You MUST restart JUTE after you change any variable:
78 76
@@ -181,7 +179,7 @@ PhantomJS
181 179 ---------
182 180 [PhantomJS](http://phantomjs.org) is standalone (potentially) headless WebKit. This backend behaves similarly to Selenium but without the need of a head! Further ANY client-side unit test should run just fine as Webkit has both a Javascript parser and DOM support built in.
183 181
184   -If you have PhantomJS installed point JUTE to the location of the 'phantomjs' executable and which screen your X Server is running on via the 'phantomjs' and 'screen' npm variables. JUTE will run fine regardless of if you're using a 'real' X Server or Xvfb. And yes there is snapshot support.
  182 +If you have PhantomJS installed point JUTE to the location of the 'phantomjs' executable the 'phantomjs'. JUTE will run fine regardless of if you're using a 'real' X Server or Xvfb. And yes there is snapshot support.
185 183
186 184 This mode can currently only be accessed via the command line tool 'jute_submit_test'. See below for documentation. Basically you submit tests from the command line too 'jute_submit_test' along with the '--phantomjs' command line option.
187 185
@@ -349,7 +347,7 @@ OR any other permutation of test specification as outlined above.
349 347
350 348 #### Running tests through PhantomJS
351 349
352   -Once you have set the 'phantomjs' and 'screen' npm variables you can use the PhantomJS backend.
  350 +Once you have set the 'phantomjs' npm variable you can use the PhantomJS backend.
353 351
354 352 Specify --phantomjs to run the submitted tests through PhantomJS:
355 353
5 backend/nodejute/jute/actions/runTest.js
@@ -157,9 +157,6 @@ module.exports = {
157 157 cache.tests_to_run.push(test_obj);
158 158 pushed = true;
159 159 } else if (obj.phantomjs) {
160   - if (!obj.screen) {
161   - obj.screen = hub.config.screen;
162   - }
163 160 if (obj.send_output) {
164 161 test_obj.sendOutput = 1;
165 162 }
@@ -273,7 +270,7 @@ module.exports = {
273 270 });
274 271
275 272 seleniumIDs.forEach(function(selID) {
276   - hub.emit('action:phantomjsStart', selID, obj.screen, req, res);
  273 + hub.emit('action:phantomjsStart', selID, req, res);
277 274 });
278 275 } else {
279 276 // UI wants to run multiple tests - redirect to it!
5 backend/nodejute/jute/actions/startPhantomjs.js
@@ -46,15 +46,14 @@ module.exports = {
46 46 // Events I care about
47 47 hub.addListener('action:phantomjsStart', startPhantomjs);
48 48
49   - function startPhantomjs(selID, screen, req, res) {
  49 + function startPhantomjs(selID, req, res) {
50 50 var cb, phantom, body = req.body,
51 51 phantomjs = hub.config.phantomjs,
52 52 url = 'http://' + (hub.config.host ? hub.config.host + ':' + hub.config.port : req.headers.host) + '/?selenium=' + selID
53 53 ;
54 54
55 55 try {
56   - hub.emit(hub.LOG, hub.INFO, "DISPLAY=:" + screen + ' ' + phantomjs + ' ' + path.join(__dirname, '..', "phantomJUTE.js") + ' ' + url);
57   - process.env.DISPLAY = ':' + screen;
  56 + hub.emit(hub.LOG, hub.INFO, "phantomjs + ' ' + path.join(__dirname, '..', "phantomJUTE.js") + ' ' + url);
58 57 phantom = child.spawn(phantomjs, [ path.join(__dirname, '..', "phantomJUTE.js"), url, hub.config.outputDir]);
59 58 phantom.stdout.on('data', function(data) {
60 59 if (data === 'snapshot') {
1  backend/nodejute/jute/configure.js
@@ -53,7 +53,6 @@ Create: function(hub) {
53 53 logFile: '/tmp/jute.log',
54 54 testRegex: '.html$',
55 55 inject: 1,
56   - screen: 0,
57 56 phantomjs: '/usr/local/bin/phantomjs',
58 57 host: ''
59 58 },
4 backend/nodejute/package.json
... ... @@ -1,8 +1,8 @@
1 1 {
2 2 "name": "jute",
3 3 "description": "Javascript Unit Test Environment",
4   - "keywords": ["selenium", "test", "testing", "unit", "tests"],
5   - "version": "0.0.65",
  4 + "keywords": ["selenium", "test", "testing", "unit", "tests", "jasmine", "phantomjs"],
  5 + "version": "0.0.66",
6 6 "author": "Mark Ethan Trostler <mark@zzo.com>",
7 7 "preferGlobal": true,
8 8 "bin" : {
6 backend/nodejute/submit_test.js
@@ -41,7 +41,7 @@ var config = (require('./getConfig'))(),
41 41 events = require("events"),
42 42 eventHubF = function() { events.EventEmitter.call(this); },
43 43 args = opt
44   - .usage('Usage: $0 --test [testfile] [ --test [another testfile] ] [ --host [JUTE host] ] [ --port [JUTE host port] ] [ --sel_host [Selenium host] ] [ --sel_browser [Selenium browser spec] ] [ --seleniums # ] [ --sel2 ] [ --load ] ] [ --send_output ] [ --wait ] [ --clear_results ] [ -v8 ] [ --jasmine] [ --coverage ] [ --status ] [ --snapshot ] [ --retry ] [ --phantomjs ] [ --screen # ]')
  44 + .usage('Usage: $0 --test [testfile] [ --test [another testfile] ] [ --host [JUTE host] ] [ --port [JUTE host port] ] [ --sel_host [Selenium host] ] [ --sel_browser [Selenium browser spec] ] [ --seleniums # ] [ --sel2 ] [ --load ] ] [ --send_output ] [ --wait ] [ --clear_results ] [ -v8 ] [ --jasmine] [ --coverage ] [ --status ] [ --snapshot ] [ --retry ] [ --phantomjs ]')
45 45 .alias('t', 'test')
46 46 .alias('h', 'host')
47 47 .alias('p', 'port')
@@ -55,7 +55,6 @@ var config = (require('./getConfig'))(),
55 55 .alias('w', 'wait')
56 56 .alias('r', 'retry')
57 57 .alias('ph', 'phantomjs')
58   - .alias('sc', 'screen')
59 58 .alias('s2', 'sel2')
60 59 .default('host', (config && config.host) || os.hostname())
61 60 .default('port', (config && config.port) || 8080)
@@ -72,7 +71,6 @@ var config = (require('./getConfig'))(),
72 71 .default('sel_browser', '*firefox')
73 72 .default('sel2', 0)
74 73 .default('retry', 0)
75   - .default('screen', 0)
76 74 .describe('test', 'Test file to run - relative to docRoot/testDir (npm set jute.testDir) - can specify multiple of these')
77 75 .describe('host', 'Hostname of JUTE server')
78 76 .describe('port', 'Port of JUTE server')
@@ -91,7 +89,6 @@ var config = (require('./getConfig'))(),
91 89 .describe('status', 'Just get status')
92 90 .describe('retry', 'Number of time to retry a failed test')
93 91 .describe('phantomjs', 'Path to phantomjs executable')
94   - .describe('screen', 'X screen number where an X server is listening')
95 92 .argv,
96 93 util = require('util'),
97 94 qs = require('querystring'),
@@ -203,7 +200,6 @@ eventHub.on('tests', function(tests) {
203 200 // Toss in Selenium stuff
204 201 if (args.phantomjs) {
205 202 juteArgs.phantomjs = 1;
206   - juteArgs.screen = args.screen;
207 203 }
208 204
209 205 // Toss in Selenium stuff

0 comments on commit 3244039

Please sign in to comment.
Something went wrong with that request. Please try again.