Codeception / Codeception/module-webdriver

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

Ouverte
#112 14 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
PHP
Étoiles
39
Forks
25
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

#### 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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.