How to run protractor from webapp?

£可爱£侵袭症+ 提交于 2020-01-13 17:04:41

问题


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 ?


回答1:


You can pass the file to your backend (and save it), which then executes the test as you normally would protractor conf.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.



来源:https://stackoverflow.com/questions/27843015/how-to-run-protractor-from-webapp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!