Angularjs e2e带茉莉花量角器的睾丸素“;“未找到任何规格”;
我是新的量角器测试,但我不能运行我的测试。 My Digrator.config.js:Angularjs e2e带茉莉花量角器的睾丸素“;“未找到任何规格”;,angularjs,testing,protractor,karma-jasmine,gulp-protractor,Angularjs,Testing,Protractor,Karma Jasmine,Gulp Protractor,我是新的量角器测试,但我不能运行我的测试。 My Digrator.config.js: 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.
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
知道我做错了什么吗
谢谢 我意识到了我的问题所在(感谢那些帮助我认识到这一点的评论)。 我在运行我的测试时做了一个吞咽任务:
function e2e() {
gulp.src(["/src/test/*.js"]).pipe(protractor({
configFile: "conf/protractor.config.js",
args: ['--baseUrl', 'http://localhost8080']
})).on('error', function (e) {
throw e;
});
}
我不知道为什么:gulp.src([“/src/test/*.js”])
无法访问我的测试文件,所以我将其更改为:gulp.src([“src/test/e2e/login.e2e.spec.js”])
我知道这不是最好的解决办法,但足以生存 我意识到了我的问题所在(感谢那些帮助我认识到这一点的评论)。 我在运行我的测试时做了一个吞咽任务:
function e2e() {
gulp.src(["/src/test/*.js"]).pipe(protractor({
configFile: "conf/protractor.config.js",
args: ['--baseUrl', 'http://localhost8080']
})).on('error', function (e) {
throw e;
});
}
我不知道为什么:gulp.src([“/src/test/*.js”])
无法访问我的测试文件,所以我将其更改为:gulp.src([“src/test/e2e/login.e2e.spec.js”])
我知道这不是最好的解决办法,但足以生存 可能意味着您为规格指定的文件路径不正确。您使用什么命令运行测试?您的测试文件夹树是什么样子的?您好!我正在使用一个gulp任务:函数e2e(){gulp.src([“/src/tests/*.js”]).pipe(量角器({configFile:[conf/granger.config.js],args:['--baseUrl','})).on('error',函数(e){throw e;});}我的树文件夹是:name_proyect/src/test/e2e/login.e2e.spec.js可能意味着您为规范指定的文件路径不正确。您使用什么命令来运行测试?您的测试文件夹树是什么样子的?嗨!我正在使用一个gulp任务:function e2e(){gulp.src([“/src/tests/*.js]”)。pipe(量角器({configFile:“conf/gragrator.config.js”,参数:['--baseUrl','}])。关于('error',函数(e){throw e;});}我的树状文件夹是:name_proyect/src/test/e2e/login.e2e.spec.js您遇到的问题是
src/test/login.e2e.spec.js
与src/test/e2e/login.e2e.spec.js
不同。您遇到的问题是src/test/login.e2e.spec.js
与不同>src/test/e2e/login.e2e.spec.js
尝试改用src/test/***.js
。