I am using Protractor for e2e testing. I want to know, How many 'it' we can define inside a 'describe block' in a test file like below-

describe('This is my test suite',function(){

      it('This is my test case 1',function(){
      it('This is my test case 2',function(){
      it('This is my test case 3',function(){
      it('This is my test case 4',function(){

     it('This is my test case n',function(){


What could be maximum value of n for this describe block?


I don't recall any limitation to the number of it blocks per describe in Jasmine. But, even though there is no technical limitation, make sure you don't hurt readability by having many it blocks per describe.

Instead of putting tests into a single describe, organize your tests logically, use multiple describe blocks, use multiple files grouped per a test directory logically.

There is also jasmine-data-provider project which introduces a handy using keyword that allows to dynamically "multiply" tests based on different parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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