question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sometimes codeceptjs takes long time between scenarios with dockersized selenium server

See original GitHub issue

What are you trying to achieve?

Use codeceptjs to run e2e test with dockersized selenium server.

What do you get instead?

Codeceptjs takes long time between scenarios with dockersized selenium server.

Provide console output if related. Use --verbose mode for more details.

✓ OK in 1176ms
===>Scenario A Pass and start Scenario B
   Emitted | test.after
 > WebDriverIO._after
   [75] Queued | hook WebDriverIO._after()
 > Login._after
   [75] Queued | hook Login._after()
 > Register._after
   [75] Queued | hook Register._after()
 > Dashboard._after
   [75] Queued | hook Dashboard._after()
 Scenario B: check input value of password
   [76] Starting recording promises
   Emitted | test.before
 > WebDriverIO._before
   [76] Queued | hook WebDriverIO._before()
 > Login._before
   [76] Queued | hook Login._before()
 > Register._before
   [76] Queued | hook Register._before()
 > Dashboard._before
   [76] Queued | hook Dashboard._before()
   [76] Queued | findForgetPwdInfo:test123@test.com
#=====>After this step, codeceptjs takes long time to run next step,please refer the logs of selenium server 
   Emitted | step.before (I find forget pwd info "test123@test.com")
 • I find forget pwd info "test123@test.com"
   Emitted | step.after (I find forget pwd info "test123@test.com")

Provide selenium logs related

2016-12-07T02:03:19.903855306Z Starting ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e) on port 3938
2016-12-07T02:03:19.903941554Z Only local connections are allowed.
2016-12-07T02:03:19.905407504Z 18:03:19.905 INFO - Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
2016-12-07T02:03:19.946505481Z 18:03:19.946 INFO - Done: [delete session: 0b9c52ce-d887-48c7-a607-0d33937cc9d0]
#=========>After this step, codeceptjs takes long time to run next step, almost 2 minutes.
2016-12-07T02:04:49.973557045Z 18:04:49.973 INFO - Executing: [new session: Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@73bf2d22, browserName=chrome, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.2.16, url=http://webdriver.io}}]])
2016-12-07T02:04:49.974759359Z 18:04:49.974 INFO - Creating a new session for Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@73bf2d22, browserName=chrome, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.2.16, url=http://webdriver.io}}]
2016-12-07T02:04:49.988570761Z Starting ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e) on port 5278
2016-12-07T02:04:49.988654417Z Only local connections are allowed.

Provide test source code if related

Before((I) => {
  I.findForgetPwdInfo( "test123@test.com")
    .then((result) => {
      const resetPwdUrl = `${cf.host}/resetPassword?token=${result.token}`;
      I.amOnPage(resetPwdUrl);
    });
});

Scenario('Scenario A:Tips of new password input', (I) => {
  I.click('[placeholder="new password"]');
  I.waitForText('should not be less than 6', 5);
});

Scenario('Scenario B: check input value of password', (I) => {
  I.click('[placeholder="new password"]');
  I.click('submit');
  I.waitForText('The new password can not be null');
});

Details

  • CodeceptJS version: CodeceptJS v0.4.9
  • NodeJS Version: node 7.0.0
  • Operating System: Ubuntu 14.04 LTS
  • Protractor || WebDriverIO || Nightmare version (if related): WebDriverIO
  • Configuration file:codecept.conf.js
  • Dockersized selenium server: selenium/standalone-chrome-debug
const cf = require('./config/conf.js');

exports.config = {
  tests: './tests/*/*_test.js',
  timeout: 10000,
  output: './output',
  helpers: {
    WebDriverIO: {
      url: cf.testHost,
      browser: 'chrome',
      windowSize: 'maximize',
      host: cf.seleniumHost,
      post: cf.seleniumPort
    },
    Login: {
      require: './helpers/login_helper.js'
    },
    Register: {
      require: './helpers/register_helper.js'
    },
    Dashboard: {
      require: './helpers/dashboard_helper.js'
    }
  },
  include: {
    I: './steps_file.js',
    loginPage: './pages/login.js',
    registerPage: './pages/register.js'
  },
  bootstrap: './mock_server/create_mock_server.js',
  teardown: './mock_server/del_mock_server.js',
  mocha: {
    reporterOptions: {
    mochaFile: 'output/result.xml',
    reportDir: 'output',
    reportName: 'test-report',
    inlineAssets: true
    }
  },
  name: 'e2e-test'
};

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
junguchinacommented, Dec 12, 2016

@clouless @DavertMik I have resolved this issue with the version 2.53.1 of docerized selenium server, now the e2e test of codeceptjs can run one by one. I found this issue with the version 3.0.1 docerized of selenium, I think this issue caused by the version 3.0.1 of selenium server. With below command to run the version 2.53.1 of docerized selenium server:

docker run --name selenium_2.53.1 -d -p 4444:4444 -p 5900:5900 selenium/standalone-chrome-debug:2.53.1
1reaction
DavertMikcommented, Dec 12, 2016

Thanks for finding that out. I was using 2.53 and didn’t have a chance to upgrade yet. Probably that’s right, this can be selenium 3.0.1 ug

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sometimes codeceptjs takes long time between scenarios ...
Codeceptjs takes long time between scenarios with dockersized selenium server. Provide console output if related. Use --verbose mode for more ...
Read more >
Testing with WebDriver - CodeceptJS
The standard and proved way to run browser test automation over years is Selenium WebDriver. Over years this technology was standartized and ...
Read more >
WebDriver - CodeceptJS
WebDriver requires Selenium Server and ChromeDriver/GeckoDriver to be installed. Those tools can be easily installed via NPM.
Read more >
Getting Started - CodeceptJS
Each test is described inside a Scenario function with the I object passed into it. The I object is an actor, an abstraction...
Read more >
Acceptance Testing - CodeceptJS
Acceptance (also called End to End) tests can cover standard but complex scenarios from a user's perspective. With acceptance tests you can ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found