我正在我的应用程序中使用protractor进行angular js测试,目前大约有19个测试用例,其中一个失败了。
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
})
});目前,我运行所有的测试用例。但是,我怎么能只运行一个测试用例来调试一个问题,例如一个被描述为“登录页面应该成功登录用户”的问题?
发布于 2014-07-03 00:57:04
最新版本(至少)的Protractor支持通常的茉莉花方式:将describe()函数重命名为ddescribe(),然后只运行其中的测试。或者将it()函数重命名为iit(),则只会运行此测试。
发布于 2014-07-10 04:34:32
也许您应该将测试划分到不同的套件中。然后,您只需运行: protractor test/protractor-conf.js --suite example
发布于 2020-02-21 21:13:28
您可以使用--grep。
protractor conf.js --grep='name of your test case'
https://stackoverflow.com/questions/24536572
复制相似问题