Sometimes codeceptjs takes long time between scenarios with dockersized selenium server
See original GitHub issueWhat 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:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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:
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