-
Notifications
You must be signed in to change notification settings - Fork 23
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.
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
<?php
namespace acceptance;
use AcceptanceTester;
use Codeception\Util\Locator;
class LoginCest
{
// removed the contents of the test to check that current issues have nothing to do with the test itself
public function loginPageHasFormTest(AcceptanceTester $I)
{
}
}
Details
Contents of the output .html
/session//source
-
Codeception version: Codeception PHP Testing Framework v4.1.28
-
PHP Version: 7.4
-
Operating System: Mac Monterey v12.2.1
-
Installation type: Composer
-
List of installed packages (
composer show
) -
auth0/auth0-php 8.0.6 Auth0 PHP SDK. Straight-forward and tested methods for accessing Auth0 Authentication and Management API endpoints.
aws/aws-crt-php v1.0.2 AWS Common Runtime for PHP
aws/aws-sdk-php 3.209.10 AWS SDK for PHP - Use Amazon Web Services in your PHP project
behat/gherkin v4.9.0 Gherkin DSL parser for PHP
codeception/codeception 4.1.28 BDD-style testing framework
codeception/lib-asserts 2.0.0 Assertion methods used by Codeception core and Asserts module
codeception/lib-innerbrowser 2.0.2 Parent library for all Codeception framework modules and PhpBrowser
codeception/module-asserts 2.0.1 Codeception module containing various assertions
codeception/module-phpbrowser 2.0.2 Codeception module for testing web application over HTTP
codeception/module-rest 2.0.1 REST module for Codeception
codeception/module-webdriver 2.0.2 WebDriver module for Codeception
codeception/phpunit-wrapper 9.0.6 PHPUnit classes used by Codeception
codeception/stub 4.0.1 Flexible Stub wrapper for PHPUnit's Mock Builder
composer/pcre 1.0.1 PCRE wrapping library that offers type-safe preg_* replacements.
composer/semver 3.2.7 Semver library that offers utilities, version constraint parsing and validation.
composer/xdebug-handler 3.0.1 Restarts a process without Xdebug.
doctrine/annotations 1.13.2 Docblock Annotations Parser
doctrine/inflector 2.0.4 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.
doctrine/instantiator 1.4.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer 1.2.2 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
drewm/mailchimp-api v2.5.4 Super-simple, minimum abstraction MailChimp API v3 wrapper
eftec/bladeone 4.2 The standalone version Blade Template Engine from Laravel in a single php file
elasticsearch/elasticsearch v5.5.0 PHP Client for Elasticsearch
friendsofphp/php-cs-fixer v3.5.0 A tool to automatically fix PHP code style
fzaninotto/faker v1.9.2 Faker is a PHP library that generates fake data for you.
graham-campbell/result-type v1.0.4 An Implementation Of The Result Type
guzzlehttp/guzzle 7.4.1 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.5.1 Guzzle promises library
guzzlehttp/psr7 2.1.0 PSR-7 message implementation that also provides common utility methods
guzzlehttp/ringphp 1.1.1 Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.
guzzlehttp/streams 3.0.0 Provides a simple abstraction over streams of data
hashids/hashids 2.0.4 Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers
hubspot/hubspot-php 4.0.1 HubSpot PHP API client
illuminate/bus v8.80.0 The Illuminate Bus package.
illuminate/collections v8.80.0 The Illuminate Collections package.
illuminate/container v8.80.0 The Illuminate Container package.
illuminate/contracts v8.80.0 The Illuminate Contracts package.
illuminate/database v8.80.0 The Illuminate Database package.
illuminate/events v8.80.0 The Illuminate Events package.
illuminate/macroable v8.80.0 The Illuminate Macroable package.
illuminate/pipeline v8.80.0 The Illuminate Pipeline package.
illuminate/support v8.80.0 The Illuminate Support package.
intervention/image 2.7.1 Image handling and manipulation library with support for Laravel integration
justinrainbow/json-schema 5.2.11 A library to validate a json schema.
kigkonsult/icalcreator v2.24.2 iCalcreator is the PHP implementation of rfc2445/rfc5545, management of iCal formatted files
kriswallsmith/buzz 1.2.0 Lightweight HTTP client
laravel/envoy v2.8.1 Elegant SSH tasks for PHP.
league/csv 8.2.3 Csv data manipulation made easy in PHP
monolog/monolog 1.26.1 Sends your logs to files, sockets, inboxes, databases and various web services
mtdowling/jmespath.php 2.6.1 Declaratively specify how to extract elements from a JSON document
myclabs/deep-copy 1.10.2 Create deep copies (clones) of your objects
nesbot/carbon 2.55.2 An API extension for DateTime that supports 281 different languages.
nikic/php-parser v4.13.2 A PHP parser written in PHP
nyholm/psr7 1.5.0 A fast PHP7 implementation of PSR-7
parsecsv/php-parsecsv 1.0.0 CSV data parser for PHP
phar-io/manifest 2.0.3 Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version 3.1.0 Library for handling version information and constraints
php-cs-fixer/diff v2.0.2 sebastian/diff v3 backport support for PHP 5.6+
php-http/discovery 1.14.1 Finds installed HTTPlug implementations and PSR-7 message factories
php-http/httplug 2.2.0 HTTPlug, the HTTP client abstraction for PHP
php-http/message-factory v1.0.2 Factory interfaces for PSR-7 HTTP Message
php-http/multipart-stream-builder 1.2.0 A builder class that help you create a multipart stream
php-http/promise 1.1.0 Promise used for asynchronous HTTP requests
php-webdriver/webdriver 1.12.0 A PHP client for Selenium WebDriver. Previously facebook/webdriver.
phpdocumentor/reflection-common 2.2.0 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 5.3.0 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver 1.6.0 A PSR-5 based resolver of Class names, Types and Structural Element Names
phpfastcache/phpfastcache 6.1.5 PHP Cache Class - Reduce your database call using cache system. PhpFastCache handles a lot of drivers such as Apc(u), Cassandra, CouchBase, Couchdb, Mongodb, Files, (P)redis, Leveldb, Memcache(d), Ss...
phpoption/phpoption 1.8.1 Option Type for PHP
phpspec/prophecy v1.15.0 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 9.2.10 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator 3.0.6 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker 3.1.1 Invoke callables with a timeout
phpunit/php-text-template 2.0.4 Simple template engine.
phpunit/php-timer 5.0.3 Utility class for timing
phpunit/phpunit 9.5.12 The PHP Unit Testing framework.
psr/cache 1.0.1 Common interface for caching libraries
psr/container 1.1.2 Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher 1.0.0 Standard interfaces for event handling.
psr/http-client 1.0.1 Common interface for HTTP clients
psr/http-factory 1.0.1 Common interfaces for PSR-7 HTTP message factories
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.1.4 Common interface for logging libraries
psr/simple-cache 1.0.1 Common interfaces for simple caching
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
react/promise v2.8.0 A lightweight implementation of CommonJS Promises/A for PHP
sebastian/cli-parser 1.0.1 Library for parsing CLI options
sebastian/code-unit 1.0.8 Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3 Looks up which function or method a line of code belongs to
sebastian/comparator 4.0.6 Provides the functionality to compare PHP values for equality
sebastian/complexity 2.0.2 Library for calculating the complexity of PHP code units
sebastian/diff 4.0.4 Diff implementation
sebastian/environment 5.1.3 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 4.0.4 Provides the functionality to export PHP variables for visualization
sebastian/global-state 5.0.3 Snapshotting of global state
sebastian/lines-of-code 1.0.3 Library for counting the lines of code in PHP source code
sebastian/object-enumerator 4.0.4 Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector 2.0.4 Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context 4.0.4 Provides functionality to recursively process PHP variables
sebastian/resource-operations 3.0.3 Provides a list of PHP built-in functions that operate on resources
sebastian/type 2.3.4 Collection of value objects that represent the types of the PHP type system
sebastian/version 3.0.2 Library that helps with managing the version number of Git-hosted PHP projects
sendgrid/php-http-client 3.14.1 HTTP REST client, simplified for PHP
sendgrid/sendgrid 7.4.2 This library allows you to quickly and easily send emails through Twilio SendGrid using PHP.
setasign/fpdf 1.8.1 FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.
softcreatr/jsonpath 0.7.5 JSONPath implementation for parsing, searching and flattening arrays
squizlabs/php_codesniffer 3.6.2 PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
symfony/browser-kit v5.4.3 Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically
symfony/console v5.4.2 Eases the creation of beautiful and testable command line interfaces
symfony/css-selector v5.4.2 Converts CSS selectors to XPath expressions
symfony/deprecation-contracts v2.5.0 A generic function and convention to trigger deprecation notices
symfony/dom-crawler v5.4.6 Eases DOM navigation for HTML and XML documents
symfony/event-dispatcher v5.4.0 Provides tools that allow your application components to communicate with each other by dispatching events and listening to them
symfony/event-dispatcher-contracts v2.5.0 Generic abstractions related to dispatching event
symfony/filesystem v5.4.0 Provides basic utilities for the filesystem
symfony/finder v5.4.2 Finds files and directories via an intuitive fluent interface
symfony/options-resolver v5.4.0 Provides an improved replacement for the array_replace PHP function
symfony/polyfill-ctype v1.24.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme v1.24.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-normalizer v1.24.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring v1.24.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php73 v1.24.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80 v1.24.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/polyfill-php81 v1.24.0 Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions
symfony/process v5.4.2 Executes commands in sub-processes
symfony/service-contracts v2.5.0 Generic abstractions related to writing services
symfony/stopwatch v5.4.0 Provides a way to profile code
symfony/string v5.4.2 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way
symfony/translation v4.4.34 Provides tools to internationalize your application
symfony/translation-contracts v2.5.0 Generic abstractions related to translation
symfony/yaml v3.4.31 Symfony Yaml Component
theseer/tokenizer 1.2.1 A small library for converting tokenized PHP source code into XML and potentially other formats
twilio/sdk 5.42.2 A PHP wrapper for Twilio's API
vlucas/phpdotenv v5.4.1 Loads environment variables from.env
togetenv()
,$_ENV
and$_SERVER
automagically.
voku/portable-ascii 1.5.6 Portable ASCII library - performance optimized (ascii) string functions for php.
webmozart/assert 1.10.0 Assertions to validate method input/output with nice error messages.
wimg/php-compatibility 9.3.5 A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility. -
Suite configuration:
modules:
enabled:
- WebDriver:
url: http://127.0.0.1
browser: chrome
capabilities:
chromeOptions:
args: [ "--headless", "--disable-gpu" ]