我试图找出一个办法以同样的方式使用,或者还好说,类似的方式,该标记选项cucumberJS
用了protractor
,但与Jasmin
E,有没有办法来标记不同的场景,如:@smoke
,@regression
等等.然后告诉控制台运行那些?
我拒绝使用Cucumber
,因为它的支持它似乎变得片状!
任何帮助都感激不尽!
我在 Jasmine 中有以下测试,我需要对 2 个不同的 URL 执行,这 2 个 url 是同一产品的不同版本:
describe('TEST ',function(){
var basePage = new BasePage();
var page1 = new Page1();
describe('TEST',function(){
beforeEach(function(){
browser.get('URL-1.html');
});
it('REUSE THIS TEST' , function (){
browser.wait(EC.visibilityOf(viewerWidgetPage.videoPlayer));
page1.videoControls.click();
expect(basePage.hasClass(page1.videoPlayer, 'vjs-playing')).toBeTruthy();
page1.audioControl.click();
//Verify that the video property is muted.
browser.executeAsyncScript_(function(callback){
callback(window.player.muted());
}).then(function(isMuted){
expect(isMuted).toBeFalsy();
});
page1.audioControl.click();
//Verify that the video property is muted.
browser.executeAsyncScript_(function(callback){
callback(window.player.muted());
}).then(function(isMuted){
expect(isMuted).toBeTruthy();
});
});
});
Run Code Online (Sandbox Code Playgroud)
有没有办法在另一个测试中使用“它”“重用此测试”?