Codeception / Codeception/module-webdriver

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

未关闭
#112 14 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PHP
星标
39
派生
25
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。