次のケーキファイルタスクを実行して、正常に実行され、テストの最後に到達しますが終了しないセレンテストを実行します。coffeeスクリプトcakefileタスクが終了していません
muffin = require 'muffin'
wrench = require 'wrench'
http = require 'http'
fs = require 'fs'
spawn = require('child_process').spawn
exec = require('child_process').exec
task 'selenium', 'run selenium tests', (options) ->
sel = require './test/selenium'
app = spawn 'node', ['app.js']
app.stdout.on 'data', (data) ->
if /listening on port/.test data
selenium = spawn 'selenium'
selenium.stdout.on 'data', (data) ->
console.log 'stdout: ' + data
if /Started.*jetty.Server/.test data
sel.run ->
app.stdin.end()
selenium.stdin.end()
console.log 'completed Selenium Tests'
仕上げを完了する方法はありますか?コンソールに「完了したSelenium Tests」が記録されます。
'Cakefile'ではなく' .coffee'で同じコードを( 'task 'selenium''ビットを除いて)実行しても、同じ動作をします。 –
私はこのコードをすべてvanilla javascriptと自動的に実行するケーキファイルの外に変換しました。同じ結果が得られます –