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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With