I am using ng e2e --protractorConfig=e2e/protractor.conf.js to run my e2e test.

I want to add a regular expression like @smoke to this command. But when I add --grep='@smoke' to it as:

ng e2e --protractorConfig=e2e/protractor.conf.js --grep='@smoke'

I get errors.

What is the correct way to group test cases?

  • 2
    Please edit your question and add the errors you are getting.
    – Kate Paulk
    Oct 10, 2019 at 12:39

1 Answer 1


You may group tests as suites like below:


suites: { 
        smoke: 'tests/e2e/smoke/*.js', 
        performance: 'tests/e2e/performance/*.js',
      regression: 'tests/e2e/regression/*.js'

And run like below:

 $ protractor conf.js --suite smoke

Using jasmine framework, tests can also be organized/grouped using a regular expression.

You can add something like @smoke, @regressions to your tests and then only run those ones by passing the grep flag.

it('should do stuff @smoke', function() { ... });

Then run protractor passing the grep flag:

protractor conf.js --grep='@smoke'
  • when i am using this protractor conf.js --grep='@smoke' Still i am getting error conf.js exports.config={ seleniumAddress:"localhost:4444/wd/hub", specs:['@smoke'], }; directConnect=true Is there anything , that i am missing? Dec 26, 2019 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.