나는 기본적인 기능 테스트를 수행하기 위해 노력하고있어 액세스 :는 원격 브라우저 환경
define([
'intern!object',
'intern/chai!assert',
'../Request',
'require'
], function (registerSuite, assert, Request, require) {
var request,
url = 'https://github.com/theintern/intern';
registerSuite({
name: 'demo',
'submit form': function() {
return this.remote
.get(require.toUrl('./fixture.html'))
.findById('operation')
.click()
.type('hello, world')
.end()
.findById('submit')
.click()
.end()
.setFindTimeout(Infinity)
.findById('result')
.setFindTimeout(0)
.text()
.then(function (resultText) {
assert.ok(resultText.indexOf(
'"hello, world" completed successfully') > -1,
'On form submission, operation should complete successfully');
});
}
});
});
합니다 (intern.js 문서에서 예) https://github.com/theintern/intern/wiki/Writing-Tests-with-Intern
내 intern.js 설정 파일은 다음과 같습니다 :
define({
proxyPort: 9000,
proxyUrl: 'http://localhost:9000/',
capabilities: {
'selenium-version': '2.41.0'
},
environments: [
{ browserName: 'chrome'}
],
maxConcurrency: 3,
tunnel: "BrowserStackTunnel",
webdriver: {
host: 'http://hub.browserstack.com/wd/hub',
username: 'XXXXX',
accessKey: 'XXXXX'
},
useSauceConnect: false,
loader: {
packages: [
{
name: "dojo",
location: 'vendor/dojo'
}
]
},
suites: [ "tests/test" ],
excludeInstrumentation: /^(?:tests|node_modules)\//
});
테스트를 실행하면 브라우저 스택으로 연결이 이루어진 것 같습니다. 계속해서 실패 함 :
-> ./node_modules/.bin/intern-runner config=tests/intern
Listening on 0.0.0.0:9000
Starting tunnel...
BrowserStackLocal v2.2
Ready
Initialised chrome 35.0.1916.114 on XP
Test main - index - test FAILED on chrome 35.0.1916.114 on XP:
TypeError: Cannot read property 'get' of null
at Test.registerSuite.test <tests/test.js:11:17>
at Test.run <__intern/lib/Test.js:154:19>
at <__intern/lib/Suite.js:212:13>
at signalListener <__intern/node_modules/dojo/Deferred.js:37:21>
at Promise.then.promise.then <__intern/node_modules/dojo/Deferred.js:258:5>
at <__intern/lib/Suite.js:211:46>
WebDriver가로드되지 않은 것으로 가정하고 기능 테스트에서 원격 브라우저 환경에 어떻게 액세스 할 수 있습니까?
답변 해 주셔서 감사합니다. 나는 대신에 tunnelOptions 속성과 functionalSuites를 사용했지만 문제는 해결하지 못했습니다. 나는 아직도 브라우저 스탁이나 셀셀 랩에 어떤 명령도 보낼 수 없다. 브라우저가 흰색 페이지를 엽니 다. – cleau