Codeception / Codeception/module-webdriver

Could not start a new session. Error while creating session with the driver service

Aperta
#112 14 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PHP
Stelle
39
Fork
25
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

#### What are you trying to achieve?
Run codeception in Docker using standalone selenium server

#### What do you get instead?
[Error] Class name must be a valid object or a string

NOTE: Since the above seems to be an issue external to the tests (as I removed all the actuals tests--see PHP section below) I debugged through and found that the issue was happening within the foreach loop in \PhpUnit\TextUi\DefaultResultPrinter::printDefects() when it calls `$this->printDefect()`.
In a dump of `$defect`, I found the following:

[message] => Could not start a new session. Could not start a new session. Error while creating session with the driver service. Stopping driver service: Driver server process died prematurely.

> Provide console output if related. Use `-vvv` mode for more details.

```bash
Codeception PHP Testing Framework v4.1.28
Powered by PHPUnit 9.5.12 by Sebastian Bergmann and contributors.

Acceptance Tests (1) -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
E LoginCest: Login page has form test (0.00s)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 00:04.366, Memory: 10.00 MB

There was 1 error:

---------
1) LoginCest: Login page has form test
Test tests/acceptance/LoginCest.php:loginPageHasFormTest

[Error] Class name must be a valid object or a string

Artifacts:

Png: /var/www/app/tests/_output/acceptance.LoginCest.loginPageHasFormTest.fail.png
Html: /var/www/app/tests/_output/acceptance.LoginCest.loginPageHasFormTest.fail.html

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.```
> Provide test source code if related

```php

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.