jeudi 7 juin 2018

How to execute protractor tests in a specific order

I've created protractor tests for my project, they run just fine, however, i would like to execute them in a specific order.

By default, protractor tests execute in this order, as specified in protractor.conf.js:

specs: [
    './e2e/entities/*.spec.ts',
    './e2e/account/*.spec.ts',
    './e2e/admin/*.spec.ts',
],

When i change this part, to execute only one test, for example this:

specs: [
    './e2e/entities/client-customer.spec.ts'        
],

It still execute all the tests in alphabethic order, ignoring the specs: [] part.

Some people suggested that i could fix this by prefixing a number to each tests, like:

Blockquote 1-client-customer.spec.ts

But this not only would be a non definitive solution, but also doesn't work!! It still execute them alphabetically, ignoring the number prefix.

Does anyone has an idea on this? Thanks a lot!!

Aucun commentaire:

Enregistrer un commentaire