protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Is there any way to run group based test cases.

Open prakashomp opened this issue 12 years ago • 6 comments

Hi,

I have a doubt is there any possibility to run tests group based in instances . like in chrome running smoke level test cases and in firefox running full test cases parallel.

Regards OmPrakash

prakashomp avatar Jul 03 '14 07:07 prakashomp

Is this what you're looking for?

exports.config = {

  // Spec patterns are relative to this directory.
  specs: [
    // shared specs...leave it blank if none
  ],

  chromeOnly: false,
  multiCapabilities: [{
    'browserName': 'chrome',
    specs: 'some_smoke_level_test_case.js'
  }, {
    'browserName': 'firefox',
    specs: 'some_full_test_case.js'
  }],
};

hankduan avatar Jul 07 '14 17:07 hankduan

means we have to write code separately? it s not possible the grouping test cases like TESTNG .

prakashomp avatar Jul 08 '14 04:07 prakashomp

Not familiar with TESTNG. Can you explain the set up you want?

hankduan avatar Jul 08 '14 04:07 hankduan

@Test( groups = {"smoke", "regression" }) @Test( groups = {"smoke" }) This is grouping in TESTNG framework If we call in xml configuration it will run only that group test cases only reaming won't execute . like this calling.

<groups>
    <run>
        <include name="smoke"/>
    </run>
</groups>

Like that behavior is available in jasmine framework with out writing test cases in separate place.

prakashomp avatar Jul 10 '14 05:07 prakashomp

This is not currently available in Jasmine or Mocha, so it's unlikely that we will adopt it in Protractor. You'll have to use suites. You can add one test file to multiple suites, but you can't separate individual specs in a file into different suites.

juliemr avatar Jul 10 '14 17:07 juliemr

Thank you Juliemr for your reply

prakashomp avatar Jul 10 '14 18:07 prakashomp