2

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.

Community
  • 1
  • 1
Hmahwish
  • 2,222
  • 8
  • 26
  • 45

1 Answers1

1

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.

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',
Andres D
  • 8,910
  • 2
  • 26
  • 31
  • Thanks @Andres but does this means I have to run protractor by this protractor --grep "should list todos" protractor.conf.js . like I selected a scenario and I have to run its test by a button click . – Hmahwish Jul 07 '15 at 10:33