Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Test cases sequentially in Protractor

Tags:

protractor

I want to know how I can run test cases sequentially in a test suite. For an example, loading a URL, login to the system etc.

like image 584
DushanthaR Avatar asked Nov 04 '14 09:11

DushanthaR


1 Answers

Check the protractor.conf.js example.

You could specify a glob that will load files in alphabetical order, or pass a list that forces sequential execution in the order you specify.

specs: [
    'test/stories/login.js',
    'test/stories/home/overview.js',
    'test/stories/home/purchase/widget.js'
],

and so on. I would not recommend forcing tests to execute in an exact order between spec files, since this means you'll have a hard time isolating just certain parts of tests later when they break. You'll be forced to always run the whole suite every time.

like image 185
yurisich Avatar answered Oct 11 '22 15:10

yurisich