0

I know there is a way you can modify the localConfig.json file and by adding something like "tag":"name", in feature files you will be able to write @name and test ONLY this feature.

How does it work?

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
Best_Where_Gives
  • 481
  • 2
  • 22
  • fwiw, you can disable a suite by using `xdescribe` in Jasmine. http://jasmine.github.io/2.0/introduction.html#section-Disabling_Suites – Daniel Apt Sep 04 '15 at 11:12
  • I am working with >60 files, so thats not effective at all. There is this "@Name" thing which makes it a lot easier, just don´t remember the syntax – Best_Where_Gives Sep 04 '15 at 11:13

2 Answers2

0

There are no annotations in javascript.

You have several options here:

  • use suites (recommended) to group your tests logically:

    suites: {
        homepage: 'tests/e2e/homepage/**/*Spec.js',
        search: [
            'tests/e2e/contact_search/**/*Spec.js',
            'tests/e2e/venue_search/**/*Spec.js']
        },
    

    And then run, for instance:

    protractor protractor.conf.js --suite homepage
    
  • use grep option:

    protractor conf.js --grep='pattern to match'
    

See also:

Community
  • 1
  • 1
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
  • This is waaay too complicated for a project with >60 Files. Look at answer for better solution – Best_Where_Gives Sep 10 '15 at 10:52
  • @Best_Where_Gives this is actually a practical advice. And we have a project with way more than 60 files. `suites` is a great way to organize your tests into logical groups. Additionally, it does involve editing your 60+ tests at all. – alecxe Sep 10 '15 at 11:46
0

Okay, so apparently nobody knows this (simple) solution I found out by myself now:

1: Go to localConfig.json

2: Write "testSuiteTags": ["@YourName"]

3: Place @YourName (tag) right before specific scenario in .feature file-

That´s it

Best_Where_Gives
  • 481
  • 2
  • 22