Estoy siguiendo el ejemplo de esta página cucumber-js / docs / nodejs_example.md
A veces pasa, pero también tengo muchos tiempos de espera. ¿Es necesario actualizar el ejemplo o se trata de un problema con el ejecutor de pruebas?
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)
Confirmé que esto me estaba funcionando. Intente aumentar el tiempo de espera.
Editar : Lamento haberte molestado. En 5 minutos de publicar este mensaje, encontré una solución para aumentar el tiempo de espera del paso que se describe aquí . Dejando el comentario aquí para cualquiera que encuentre este problema
@charlierudolph , ¿dónde aumenta el tiempo de espera? Esta es la función que escribí para iniciar sesión usando 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();
});
})
}
Sé que le di a la función browser.driver.wait
un tiempo de espera de 15 segundos, pero eso no importa, el paso se agota con 5 segundos.
Luego intenté agregar los siguientes valores globalmente en config.ts
allScriptsTimeout: 60000,
getPageTimeout: 60000,
setDefaultTimeout: 60000,
Incluso después de todo esto, sigo recibiendo el siguiente error
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)
Este hilo se ha bloqueado automáticamente ya que no ha habido ninguna actividad reciente después de que se cerró. Abra un nuevo problema para errores relacionados.
Comentario más útil
Editar : Lamento haberte molestado. En 5 minutos de publicar este mensaje, encontré una solución para aumentar el tiempo de espera del paso que se describe aquí . Dejando el comentario aquí para cualquiera que encuentre este problema
@charlierudolph , ¿dónde aumenta el tiempo de espera? Esta es la función que escribí para iniciar sesión usando auth0
Sé que le di a la función
browser.driver.wait
un tiempo de espera de 15 segundos, pero eso no importa, el paso se agota con 5 segundos.Luego intenté agregar los siguientes valores globalmente en config.ts
Incluso después de todo esto, sigo recibiendo el siguiente error