在量角器硒中进行单次测试

roh*_*m19 1 javascript gruntjs selenium-webdriver protractor

如何在量角器硒中进行单次测试.

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
})
});
Run Code Online (Sandbox Code Playgroud)

我想只运行一次测试.我可以使用它来运行它,fit但我想从命令行执行它而不更改测试.

另外我如何使用Grunt进行单独测试?

ale*_*cxe 6

您可以使用--grep命令行参数:

protractor conf.js --grep="navigation"
Run Code Online (Sandbox Code Playgroud)