Dynamically skip protractor tests

Is there a way to skip the protractor test dynamically? I have scripts where the user can choose any particular test to run. So, I want to run only those tests for which the user has given and dependent tests, all other tests should be skipped.

I am using runter-protractor-runner.

  • protractor: 2.0
  • Jasmine: 2.3
+3


source to share


2 answers


As shown in this question , you can specify the URL of a specific specification. Otherwise, you will have to use focused fdescribe / fit, but you cannot change it at runtime. This does not apply to Transporter, but rather to Jasmine.



+1


source


Maybe not relevant for you. But it can be helpful for other people. You can try using the following construction:



it('your test', function(done)){

if('user action or result of user action'){
console.log("Test is skiped");
done();
}
//other test code
...................
done(); 
}

      

0


source







All Articles