Protractor + Jasmine tags to run a bundle kit

I am trying to figure out a way to use it in the same way or better say, in a similar way, the tag parameters that cucumberJS has with protractor , but with Jasmin e, there is a way to mark various scripts, for example: @smoke , @regression , etc., and then tell the console to start with them?

I refuse to use Cucumber , as it supports it, it seems to become flaky!

Any help would be greatly appreciated!

+7
javascript jasmine protractor cucumberjs
source share
2 answers

An alternative to grep would be to use suites :

 suites: { smoke: [ "spec1.js", "spec2.js", "spec3.js" ], regression: [ "spec4.js", "spec5.js", ], } 

Then run protractor by specifying the suite argument:

 protractor conf.js --suite smoke protractor conf.js --suite regression protractor conf.js --suite smoke,regression 
+8
source share

With jasmine2, you can filter tests using a regular expression. Perhaps you can add something like @smoke, @regressions to your tests, and then run only those passing the grep flag:

 it('should do stuff @smoke', function() { ... }); 

Then run the protractor passing the grep flag:

protractor conf.js --grep='@smoke'

+7
source share

All Articles