how we can iterate single test case in jasmine(Protractor framework)

333 views
Skip to first unread message

Nakul Arora

unread,
Nov 4, 2014, 3:49:24 AM11/4/14
to ang...@googlegroups.com
i am new to Protractor and Jasmine.  We are trying to automate E2E testing of Angular application using Protractor and Jasmine. As part of the test data input we would like the script to read the data from an excel file (*.xls, *.xlsx). But I am unable to find any reference to this information. I really appreciate if anyone can give the exact approach to read data from excel as an input to the automation script and iterate single test case in framework.

Michael Bielski

unread,
Nov 4, 2014, 11:12:52 AM11/4/14
to ang...@googlegroups.com
If you are using Jasmine 2 you can use "iit" to tell Jasmine that you just want that one test run. Similarly, using "ddescribe" will tell it to run just that one suite. Just remember to take them out as soon as you are done so that the rest of your tests will run normally.

Nakul Arora

unread,
Nov 5, 2014, 11:56:17 PM11/5/14
to ang...@googlegroups.com
sure Michael, but how can we provide dynamically different data in same test case when it run 2 times?

Michael Bielski

unread,
Nov 6, 2014, 10:09:04 AM11/6/14
to ang...@googlegroups.com
What I described is used primarily for debugging or while writing new tests against existing code and you don't want to run the tests for the whole app. If you want to run just one test, isolate it in a single suite and call just that suite from Protractor (information here: https://github.com/angular/protractor/blob/master/docs/referenceConf.js). Sorry, but I can't be of help on the Excel matter.
Reply all
Reply to author
Forward
0 new messages