大佬教程收集整理的这篇文章主要介绍了angularjs – 集成量角器与Yeoman通过Grunt,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
npm install protractor grunt-protractor-runner --save-dev
>为量角器(protractor.conf.js)创建一个配置文件,将specs和baseUrl更改为测试文件和测试服务器:
exports.config = { SELEniumAddress: 'http://localhost:4444/wd/hub',specs: ['test/e2e/*_test.js'],baseUrl: 'http://localhost:9001' //default test port with Yeoman }
>更新您的Gruntfile.js,在karma任务后添加以下内容:
protractor: { options: { keepAlive: true,configFile: "protractor.conf.js" },run: {} }
>添加要测试的量角器任务
grunt.registerTask('test',[ 'clean:server','concurrent:test','autoprefixer','connect:test','karma','protractor:run' ]);
>下载并启动SELEnium服务器:
node_modules/protractor/bin/webdriver-manager update node_modules/protractor/bin/webdriver-manager start
(在Windows
以上是大佬教程为你收集整理的angularjs – 集成量角器与Yeoman通过Grunt全部内容,希望文章能够帮你解决angularjs – 集成量角器与Yeoman通过Grunt所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。