Cucumber-js: NodeJS 예제 μ‹œκ°„ 초과

에 λ§Œλ“  2017λ…„ 03μ›” 30일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: cucumber/cucumber-js

이 νŽ˜μ΄μ§€μ˜ 예λ₯Ό λ”°λ₯΄κ³  μžˆμŠ΅λ‹ˆλ‹€. cucumber-js/docs/nodejs_example.md

가끔 μ§€λ‚˜κ°€κΈ΄ ν•˜μ§€λ§Œ νƒ€μž„μ•„μ›ƒλ„ 많이 λ°›μŠ΅λ‹ˆλ‹€. 예제λ₯Ό μ—…λ°μ΄νŠΈν•΄μ•Ό ν•©λ‹ˆκΉŒ, μ•„λ‹ˆλ©΄ ν…ŒμŠ€νŠΈ λŸ¬λ„ˆμ˜ λ¬Έμ œμž…λ‹ˆκΉŒ?

NodeJS v6.9.1

"chromedriver": "^2.28.0",
"cucumber": "2.0.0-rc.9",
"selenium-webdriver": "^3.3.0"
Feature: Example feature

    As a user of Cucumber.js
    I want to have documentation on Cucumber
    So that I can concentrate on building awesome applications

  Scenario: Reading documentation
  βœ” Given I am on the Cucumber.js GitHub repository
  βœ” When I click on "CLI"
  βœ– Then I should see "Running specific features"

Failures:

1) Scenario: Reading documentation - features/documentation.feature:6
   Step: Then I should see "Running specific features" - features/documentation.feature:9
   Step Definition: features/step_definitions/browser_steps.js:15
   Message:
     Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:365:14)
         at tryOnTimeout (timers.js:237:5)
         at Timer.listOnTimeout (timers.js:207:5)

1 scenario (1 failed)
3 steps (1 failed, 2 passed)



md5-2a2c7c10e6fd71308dbd83970eac71b5



Feature: Example feature

    As a user of Cucumber.js
    I want to have documentation on Cucumber
    So that I can concentrate on building awesome applications

  Scenario: Reading documentation
  βœ– Given I am on the Cucumber.js GitHub repository
  - When I click on "CLI"
  - Then I should see "Running specific features"

Failures:

1) Scenario: Reading documentation - features/documentation.feature:6
   Step: Given I am on the Cucumber.js GitHub repository - features/documentation.feature:7
   Step Definition: features/step_definitions/browser_steps.js:5
   Message:
     Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:365:14)
         at tryOnTimeout (timers.js:237:5)
         at Timer.listOnTimeout (timers.js:207:5)

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

μˆ˜μ • : 번거둭게 ν•΄μ„œ μ£„μ†‘ν•©λ‹ˆλ‹€. 이 λ©”μ‹œμ§€λ₯Ό κ²Œμ‹œν•œ 지 5λΆ„ λ§Œμ— 여기에 μ„€λͺ…λœ 단계 μ œν•œ μ‹œκ°„μ„ λŠ˜λ¦¬λŠ” μ†”λ£¨μ…˜μ„ μ°Ύμ•˜
@charlierudolph , μ–΄λ””μ—μ„œ μ‹œκ°„ 초과λ₯Ό λŠ˜λ¦¬λ‚˜μš”? 이것은 auth0을 μ‚¬μš©ν•˜μ—¬ λ‘œκ·ΈμΈν•˜κΈ° μœ„ν•΄ μž‘μ„±ν•œ κΈ°λŠ₯μž…λ‹ˆλ‹€.

login(userId, password): void {
        let self: any = this;
        self.signInButton.click().then(function () {
            self.password.sendKeys(password)
            // element(by.css('input[name="password"]')).sendKeys(password);
            browser.waitForAngularEnabled(false);
            self.email.sendKeys(userId);
            self.loginSubmitButton.click().then(function() {
                browser.driver.wait(function() {
                    return self.loginConfirmationWindow.isPresent();
                }, 15000).then(function() {
                    return;
                }, function(){
                    console.log(new Error('Login confirmed window did not show up'));
                    return;
                })
                self.loginConfirmationClose.click();
            });

        })
    }

browser.driver.wait ν•¨μˆ˜μ— 15초의 μ‹œκ°„ μ œν•œμ„ μ£Όμ—ˆλ‹€λŠ” 것을 μ•Œκ³  μžˆμ§€λ§Œ 그것은 μ€‘μš”ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ‹¨κ³„λŠ” 5μ΄ˆμ— μ‹œκ°„ μ΄ˆκ³Όλ©λ‹ˆλ‹€.
그런 λ‹€μŒ config.ts에 λ‹€μŒ 값을 μ „μ—­μ μœΌλ‘œ μΆ”κ°€ν•˜λ €κ³  μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€.

    allScriptsTimeout: 60000,
    getPageTimeout: 60000,
    setDefaultTimeout: 60000,

이 λͺ¨λ“  후에도 μ—¬μ „νžˆ λ‹€μŒ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

 Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (/Users/mohamedr2/workspace/test_app/node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:386:14)
         at tryOnTimeout (timers.js:250:5)
         at Timer.listOnTimeout (timers.js:214:5)

λͺ¨λ“  3 λŒ“κΈ€

λ‚˜λŠ” 이것이 λ‚˜λ₯Ό μœ„ν•΄ μΌν•˜κ³  μžˆμŒμ„ ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€. μ‹œκ°„ 초과λ₯Ό λŠ˜λ €μ£Όμ„Έμš”.

μˆ˜μ • : 번거둭게 ν•΄μ„œ μ£„μ†‘ν•©λ‹ˆλ‹€. 이 λ©”μ‹œμ§€λ₯Ό κ²Œμ‹œν•œ 지 5λΆ„ λ§Œμ— 여기에 μ„€λͺ…λœ 단계 μ œν•œ μ‹œκ°„μ„ λŠ˜λ¦¬λŠ” μ†”λ£¨μ…˜μ„ μ°Ύμ•˜
@charlierudolph , μ–΄λ””μ—μ„œ μ‹œκ°„ 초과λ₯Ό λŠ˜λ¦¬λ‚˜μš”? 이것은 auth0을 μ‚¬μš©ν•˜μ—¬ λ‘œκ·ΈμΈν•˜κΈ° μœ„ν•΄ μž‘μ„±ν•œ κΈ°λŠ₯μž…λ‹ˆλ‹€.

login(userId, password): void {
        let self: any = this;
        self.signInButton.click().then(function () {
            self.password.sendKeys(password)
            // element(by.css('input[name="password"]')).sendKeys(password);
            browser.waitForAngularEnabled(false);
            self.email.sendKeys(userId);
            self.loginSubmitButton.click().then(function() {
                browser.driver.wait(function() {
                    return self.loginConfirmationWindow.isPresent();
                }, 15000).then(function() {
                    return;
                }, function(){
                    console.log(new Error('Login confirmed window did not show up'));
                    return;
                })
                self.loginConfirmationClose.click();
            });

        })
    }

browser.driver.wait ν•¨μˆ˜μ— 15초의 μ‹œκ°„ μ œν•œμ„ μ£Όμ—ˆλ‹€λŠ” 것을 μ•Œκ³  μžˆμ§€λ§Œ 그것은 μ€‘μš”ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ‹¨κ³„λŠ” 5μ΄ˆμ— μ‹œκ°„ μ΄ˆκ³Όλ©λ‹ˆλ‹€.
그런 λ‹€μŒ config.ts에 λ‹€μŒ 값을 μ „μ—­μ μœΌλ‘œ μΆ”κ°€ν•˜λ €κ³  μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€.

    allScriptsTimeout: 60000,
    getPageTimeout: 60000,
    setDefaultTimeout: 60000,

이 λͺ¨λ“  후에도 μ—¬μ „νžˆ λ‹€μŒ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

 Error: function timed out after 5000 milliseconds
         at Timeout.<anonymous> (/Users/mohamedr2/workspace/test_app/node_modules/cucumber/lib/user_code_runner.js:91:22)
         at ontimeout (timers.js:386:14)
         at tryOnTimeout (timers.js:250:5)
         at Timer.listOnTimeout (timers.js:214:5)

이 μŠ€λ ˆλ“œλŠ” λ‹«νžŒ ν›„ 졜근 ν™œλ™μ΄ μ—†μ—ˆκΈ° λ•Œλ¬Έμ— μžλ™μœΌλ‘œ μž κ²ΌμŠ΅λ‹ˆλ‹€. κ΄€λ ¨ 버그에 λŒ€ν•œ μƒˆ 문제λ₯Ό μ—¬μ‹­μ‹œμ˜€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰