我是新的量角器測試,但我不能運行我的測試。 我protractor.config.js:e2e testin與茉莉量角器「沒有規格找到」
exports.config = {
allScriptsTimeout: 99999,
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
browserName: 'chrome'
},
baseUrl: 'http://localhost:8080/',
framework: 'jasmine',
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['.src/test/e2e/login.e2e.spec.js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
isVerbose: true,
includeStackTrace: true
}
};
,這是我試圖運行測試:
'use strict';
describe('my app', function() {
beforeEach(function() {
browser.get('index.html');
});
it('should automatically redirect to/when location hash is empty', function() {
expect(browser.getLocationAbsUrl()).toMatch("/");
});
});
這是錯誤我得到:
I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[13:20:49] I/launcher - Running 1 instances of WebDriver
Started
No specs found
Finished in 0.001 seconds
[13:20:50] I/launcher - 0 instance(s) of WebDriver still running
[13:20:50] I/launcher - chrome #01 passed
[13:20:50] The following tasks did not complete: e2e
[13:20:50] Did you forget to signal async completion?
我運行webdriver-manager和我的應用服務器。我的茉莉花版本是:2.5.2 和我的量角器版本是: 4.0.9
任何想法我做錯了什麼?
謝謝!
可能意味着您指定給您的規格的文件路徑不正確。你使用什麼命令來運行你的測試? – Gunderson
你的測試文件夾樹是什麼樣的? – stsatlantis
嗨!我使用的是一口任務: 功能E2E(){ gulp.src([ 「./ SRC /測試/ * JS。」])管(量角器({ CONFIGFILE:「CONF/protractor.config。 js「, args:['--baseUrl','http:// localhost8080'] }))。on('error',function(e){ throw e; }); } –