μ΄ λ¬Έμ λ https://github.com/angular/protractor/issues/4311 μ μ°μμ λλ€. Cucumberjs μ€ν¬λ¦½νΈλ₯Ό μ€ννκΈ° μν΄ κ°λκΈ°λ₯Ό μ¬μ©νλ λ°©λ²μ λν ꡬ문μ λ³κ²½ μ¬νμ λν΄ λ Όμνκ³ μμ΅λλ€.
@wswebcreation https://github.com/wswebcreation μμ μμ²ν λλ‘ λ€λ₯Έ λ¬Έμ λ₯Ό λ«κ³ μ¬κΈ°μμ μ λ¬Έμ λ₯Ό μ΄μμ΅λλ€.
μ±κ³΅μ μΈ μ€νμ λν λ§μ§λ§ κΈ°λ‘μ 2017λ 5μ 12μΌ 14μ 3λΆμ΄μμ΅λλ€. λ¬Έμμ μ νν λ μ§.
νκ·Έμ λν κ·νμ μλ λ§€μ° κ°λ¨ν©λλ€... κ·Έλ λ€λ©΄ 3κ°μ νκ·Έ, μ¦ 2κ°λ μ€νλμ΄μΌ νκ³ 1κ°λ 무μλμ΄μΌ νλ λ°©λ²μ νΈμΆν΄μΌ ν©λλ€. 5μ 12μΌ μ΄μ μλ μ μλνμ§λ§ μ§κΈμ μλνμ§ μμ΅λλ€.
protractor ./FM_IntTest_UI_conf.js --disableChecks [email protected] --params.login.passw=mypassword --cucumberOpts.tags ~<strong i="13">@ignore</strong> --cucumberOpts.tags <strong i="14">@smoke</strong>,@sprint
κ·νμ λ¬Έμμλ μ΄μ μ΄μ κ°μμΌ νλ€κ³ λμ μμ§λ§ μλνμ§ μκ³ "ν°μΌ"κ³Ό ν¨κ» μ μΆν κ²κ³Ό λμΌν μ€λ₯ λ©μμ§λ₯Ό λ°νν©λλ€.
protractor ./FM_IntTest_UI_conf.js --disableChecks [email protected] --params.login.passw=mypassword --cucumberOpts.tags '<strong i="18">@smoke</strong> or <strong i="19">@rt</strong>' --cucumberOpts.tags 'not <strong i="20">@ignore</strong>'
μ€λ₯: μ€λ₯: λ μ΄μμ κ΅¬μ± νμΌμ΄ μ§μ λμμ΅λλ€.
C:\Users\echavez\AppData\Roaming\npm\node_modules\protractor\built\cli.js:155:15μμ
C:\Users\echavez\AppData\Roaming\npm\node_modules\protractor\node_modules\optimist\index.js:307:21
Array.forEachμμ(λ€μ΄ν°λΈ)
parseArgs(C:\Users\echavez\AppData\Roaming\npm\node_modules\protractor\node_modules\optimist\index.js:305:16)
Object.Argv.self.parseμμ (C:\Users\echavez\AppData\Roaming\npm\node_modules\protractor\node_modules\optimist\index.js:140:16)
κ°μ²΄μμ. (C:\Users\echavez\AppData\Roaming\npm\node_modules\protractor\built\cli.js:158:21)
Module._compileμμ (module.js:571:32)
Object.Module._extensions..jsμμ (module.js:580:10)
Module.loadμμ (module.js:488:32)
tryModuleLoadμμ(module.js:447:12)
Cucumber λ¬Έμμμ λ¨κ³ μ μμ λν μ½λ© ꡬ문λ λ³κ²½λ κ²μ λ³Ό μ μμ΅λκΉ? μ μ§κΈ λ 볡μ‘νκ² λ§λλκ°? μ ꡬ문μ μ¬μ©νλ©΄ μλ리μ€λ³λ‘ λ¨κ³λ₯Ό κ·Έλ£Ήνν΄μΌ νκΈ° λλ¬Έμ λλ€. κ·Έλ¬λ μ¬λ¬ μλ리μ€μμ λ°λ³΅λλ λͺ κ°μ§ λ¨κ³κ° μμΌλ―λ‘ κ° μλ리μ€μμ μ½λλ₯Ό λ°λ³΅ν©λκΉ? λ΄ μ½λμμ μ€λ³΅μΌλ‘ λλ κ²μ λλ€. μμ?
λ€μμ λ΄ test.spec.js νμΌμ μλ λ΄μ©μ μΌλΆμ λλ€.
this.Given('I am testing my Widget Application', function (callback) {
edirp.edirejectwidgetlink.click().then(function(){
callback();
}).catch(function(reason) {
console.log('ERROR: Widget button not found');
callback(reason);
});
});
this.When('There are records in the Widget List', function() {
edirp.edigetrow.count().then(function(cnt){
if(cnt>0){
return recordsFound = cnt;
}else{
return recordsFound = 0;
}
});
});
this.Then('Header name of the Widget List is '(.+)'', function(header, callback) {
expect(po.headertext.getText()).to.eventually.equal(header).then(function(){
callback();
}).catch(function(reason) {
console.log('Warning: Incorrect Text.');
callback(reason);
});
});
λ€μμ "μ λ°μ΄νΈ"λ‘ μ μλ λ΄μ©μ μΌλΆμ λλ€... μ μκ² μμ΄ DOWNGRADEλ λ€μκ³Ό κ°μ΅λλ€.
var seleniumWebdriver = require('selenium-webdriver');
var {defineSupportCode} = require('cucumber');
defineSupportCode(function({Given, When, Then}) {
Given('I am testing my Widget Application', function (callback) {
edirp.edirejectwidgetlink.click().then(function(){
callback();
}).catch(function(reason) {
console.log('ERROR: Widget button not found');
callback(reason);
});
When('There are records in the Widget List', function() {
edirp.edigetrow.count().then(function(cnt){
if(cnt>0){
return recordsFound = cnt;
}else{
return recordsFound = 0;
}
});
Then('Header name of the Widget List is '(.+)'', function(header, callback) {
expect(po.headertext.getText()).to.eventually.equal(header).then(function(){
callback();
}).catch(function(reason) {
console.log('Warning: Incorrect Text.');
callback(reason);
});
});
μλ리μ€μ μ¬λ¬ Given, When, Then...μ΄ μλ κ²½μ° λ€μκ³Ό κ°μ΄ μ¬κΈ°μ μ΄κ±°ν΄μΌ ν©λκΉ?
defineSupportCode(function({Given, And, And, When, And, And, Then, And, And, And}) {
κ·Έκ² μ¬μ€μ΄λΌλ©΄... μ΄μ λ΄ κΈ°λ₯μ λ€λ₯Έ μλ리μ€μμ "EDI-Rejects μμ ―μ λ μ½λκ° μμ λ" λ¨κ³λ₯Ό λ€μ μ¬μ©νλ €λ©΄ λͺ¨λ κΈ°λ₯μ λ€μ μ½λ©ν΄μΌ ν©λκΉ?
λ΄κ° νμν κ²μ λ Όμμ΄ μλ λ΅λ³λΏμ λλ€. κ°μΈμ μΌλ‘ λ°μλ€μ΄μ§ λ§μμμ€.
μλ리μ€μ μ¬λ¬ Given, When, Then...μ΄ μλ κ²½μ° λ€μκ³Ό κ°μ΄ μ¬κΈ°μ μ΄κ±°ν΄μΌ ν©λκΉ?
defineSupportCode(function({Given, And, And, When, And, And, Then, And, And, And}) {
μλμ. Given
, When
λ° Then
λ μ¬λ¬ λ² νΈμΆν μ μλ ν¨μμ
λλ€(1.xμ this.Given
λ±κ³Ό μ μ¬). And
λ ν¨μκ° μλλλ€. λΉμ μ ν΅κ³Όνλ λͺ¨λ κΈ°λ₯μ λ³Ό μ defineSupportCode
μ API μ°Έμ‘° λ‘λΆν° μ°κ²°λμ΄ README.md
Cucumber λ¬Έμμμ λ¨κ³ μ μμ λν μ½λ© ꡬ문λ λ³κ²½λ κ²μ λ³Ό μ μμ΅λκΉ?
https://github.com/cucumber/cucumber-js/issues/679 μ°Έμ‘°
μ μ§κΈ λ 볡μ‘νκ² λ§λλκ°? μ ꡬ문μ μ¬μ©νλ©΄ μλ리μ€λ³λ‘ λ¨κ³λ₯Ό κ·Έλ£Ήνν΄μΌ νκΈ° λλ¬Έμ λλ€.
그건 μ¬μ€μ΄ μλμΌ
κ°μ¬ν©λλ€ νμΈνκ² μ΅λλ€!
@charlierudolph Tnx μ€λͺ !
μ΄ μ€λ λλ λ«ν ν μ΅κ·Ό νλμ΄ μμκΈ° λλ¬Έμ μλμΌλ‘ μ κ²Όμ΅λλ€. κ΄λ ¨ λ²κ·Έμ λν μ λ¬Έμ λ₯Ό μ¬μμμ€.