如何针对有角度的应用程序从UI运行量角器测试 [英] How to run a protractor test from a UI against an angular app

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

问题描述

我必须创建一个用户界面,用户将在其中选择要运行的方案,然后将执行其量角器测试.在可以选择一个或多个场景进行测试并针对有角度的js应用程序运行的情况下,如何做到这一点?我环顾了这个如何从webapp运行量角器?问题,但无法连接选择答案.

I have to created a user interface where a user will select a scenario to run and then its protractor test will be executed . How can this be done where I can select on or more scenario for test and run it against a angular js app . I looked around this How to run protractor from webapp? question but could not connect with the answer selected.

推荐答案

您需要使用jasmine2,并为测试名称提供一些正则表达式(it内的文本("should bla bla bla",函数. .)块.

You need to use jasmine2 and provide some regular expression for the name of the test (the text inside the it('should bla bla bla', function...) block.

您可以将grep 标记应用于量角器:

You can should the grep flag to protractor:

protractor --grep "should list todos" protractor.conf.js

将此添加到量角器配置文件:

Add this to your protractor config file:

exports.config = {  
  framework: 'jasmine2',

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

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