I am using protractor for angular js testing in my app and have around 19 test cases at the moment, of which one of them is failing
describe('Login page', function() {
beforeEach(function() {
browser.ignoreSynchronization = true;
ptor = protractor.getInstance();
});
it('should contain navigation items', function(){
//test case code here
});
it('should login the user successfully', function(){
//test case code here
})
});
Currently, I run all the test cases. But, how can I run just one test case to debug an issue for example one which is described as "Login page should login the user successfully"?
The most recent version (at least) of Protractor supports the usual Jasmine way of doing that: rename a
describe()
function toddescribe()
, and only the tests inside it will run. Or rename anit()
function toiit()
, and only this test will run.Perhaps you should separate the tests into different suites. Then you can just run: protractor test/protractor-conf.js --suite example
Jasmine added
fit
andfdescribe
in 2.1 for running single tests or describe blocks.http://pivotallabs.com/new-key-features-jasmine-2-1/
from 2.1 git lib/jasmine-core/jasmine.js