2

We group Test case in TestNG using.

@Test( groups = {"xyz", "test" })
@Test( groups = {"Testing" })

If we call this in xml configuration it will run only that group test cases, reaming won't execute . BY calling it in XML as shown below.

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

.

Like this is there any behavior available in Jasmine Framework for grouping test cases with out writing test cases in separate place.

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
Naveen
  • 366
  • 3
  • 12

1 Answers1

4

First of all, there are no annotations in javascript.

It sounds like you are asking about the concept of suites in Protractor:

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

It allows to have user-defined sets of tests grouped logically which you can run separately:

protractor protractor.conf.js --suite homepage

There is also a grep option, see:

Community
  • 1
  • 1
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
  • Suites will execute different spec that I know. Inside each spec we need to group test cases which we do in Testng. – Naveen Jul 29 '15 at 14:09
  • @Naveen well, you can have nested describe blocks which can help to group it blocks inside..then, use the `grep` option to run the specific groups..just thoughts. – alecxe Jul 29 '15 at 14:10
  • I am not that good in jasmine. I need some functionality like this http://testng.org/doc/documentation-main.html#groups-of-groups – Naveen Jul 29 '15 at 14:18