如何从web应用程序运行量角器? [英] How to run protractor from webapp?

查看:164
本文介绍了如何从web应用程序运行量角器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些量角器测试(针对angularApp),我想运行。要做到这一点,我已经创建了一个提示输入脚本文件的用户的用户界面。然后我需要的,不知何故,使量角器启动和运行测试。

I've some protractor tests (against angularApp) that I would like to run. To do that, i've created an user interface that prompts an user for the script file. Then I need, somehow, make protractor start and run the test.

我有哪些选择实现这一目标?

What are my options to achieve this ?

推荐答案

您可以通过文件到您的后端(并保存),然后执行测试,你通常会量角器conf.js

You can pass the file to your backend (and save it), which then executes the test as you normally would protractor conf.js.

如果你没有,可以通过节点运行量角器一个后端,那么你需要到餐桌自己量角器的副本,去掉任何节点的API,并做类似什么的 https://github.com/angular/protractor/blob/master/lib/runnerCli.js 是这样做,但它会是混乱。

If you don't have a backend that can run protractor via node, then you need to fork your own copy of Protractor, strip out any node APIs, and do something similar to what https://github.com/angular/protractor/blob/master/lib/runnerCli.js is doing, but it will be messy.

这篇关于如何从web应用程序运行量角器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆