PHP test step
The PHP test step executes arbitrary PHP code using the set PHP version. PHP versions 7.4 and 8.1 are supported. The maximum length of the script is 10240 characters.
The step fails if the program ends with a non-zero exit code. The content of the standard output and standard error is recorded as the result of the test step and can be viewed using the Wenenu UI or accessed using the Wenenu API. The maximum combined length of the standard output and error is 524288 characters. The output is truncated if it exceeds the maximum length.
The variables of the test scenario are available as environment variables during the execution. |
Filesystem operations are available. Every test step runs in separate docker containers. Test steps in the same test scenario have a common directory mounted into the container, sharing files between test steps is possible. The mounted directory is under /tests which is the current directory when the test execution starts.
|
For security reasons, do not display any sensitive information in the step result. |
UI settings
Arbitrary name of the test step up to 64 characters |
|
Test agent that is going to execute the test step |
|
Version of PHP that executes the code |
|
Arbitrary PHP code that gets executed |
JSON
{
"displayName": "PHP v7.4 test",
"type": "php",
"id": "aa83579a-185b-4719-8e73-ad4832151e76",
"version": "7.4.x",
"code": "<?php\necho phpversion();\necho \"\\nHello world\\n\";\necho getcwd() . \"\\n\";\nprint_r(get_loaded_extensions());",
"agent": {
"type": "standard",
"id": "162dff466f92c372005cf7055d006b77ac377e01c60ae59f942d74680f2496d1"
}
}
Arbitrary name of the test step up to 64 characters | |
Type of the test step, must be 'php' | |
Version 4 unique identifier of the test step, must be unique within the test scenario | |
Version of PHP that executes the code | |
Arbitrary PHP code that gets executed | |
Agent object defining the agent that will execute the test step |
Available modules, commands and libraries
A directory with popular composer packages is available at the path contained in the environment variable WENENU_COMPOSER_LOCATION
require getenv('WENENU_COMPOSER_LOCATION') . '/vendor/autoload.php';
PHP 7.4.9
Name | Type | Version |
---|---|---|
bz2 |
extension |
7.4.14 |
calendar |
extension |
7.4.14 |
Core |
extension |
7.4.14 |
ctype |
extension |
7.4.14 |
curl |
extension |
7.4.14 |
date |
extension |
7.4.14 |
dom |
extension |
20031129 |
exif |
extension |
7.4.14 |
FFI |
extension |
7.4.14 |
fileinfo |
extension |
7.4.14 |
filter |
extension |
7.4.14 |
ftp |
extension |
7.4.14 |
gd |
extension |
7.4.14 |
gettext |
extension |
7.4.14 |
hash |
extension |
7.4.14 |
iconv |
extension |
7.4.14 |
json |
extension |
7.4.14 |
ldap |
extension |
7.4.14 |
libxml |
extension |
7.4.14 |
mbstring |
extension |
7.4.14 |
mysqli |
extension |
7.4.14 |
mysqlnd |
extension |
7.4.14 |
odbc |
extension |
7.4.14 |
openssl |
extension |
7.4.14 |
pcntl |
extension |
7.4.14 |
pcre |
extension |
7.4.14 |
PDO |
extension |
7.4.14 |
pdo_dblib |
extension |
7.4.14 |
PDO_Firebird |
extension |
7.4.14 |
pdo_mysql |
extension |
7.4.14 |
PDO_ODBC |
extension |
7.4.14 |
pdo_pgsql |
extension |
7.4.14 |
pdo_sqlite |
extension |
7.4.14 |
pgsql |
extension |
7.4.14 |
Phar |
extension |
7.4.14 |
posix |
extension |
7.4.14 |
readline |
extension |
7.4.14 |
Reflection |
extension |
7.4.14 |
session |
extension |
7.4.14 |
shmop |
extension |
7.4.14 |
SimpleXML |
extension |
7.4.14 |
soap |
extension |
7.4.14 |
sockets |
extension |
7.4.14 |
sodium |
extension |
7.4.14 |
SPL |
extension |
7.4.14 |
sqlite3 |
extension |
7.4.14 |
standard |
extension |
7.4.14 |
sysvmsg |
extension |
7.4.14 |
sysvsem |
extension |
7.4.14 |
sysvshm |
extension |
7.4.14 |
tidy |
extension |
7.4.14 |
tokenizer |
extension |
7.4.14 |
xml |
extension |
7.4.14 |
xmlreader |
extension |
7.4.14 |
xmlwriter |
extension |
7.4.14 |
xsl |
extension |
7.4.14 |
Zend OPcache |
extension |
7.4.14 |
zip |
extension |
1.15.6 |
zlib |
extension |
7.4.14 |
Zend OPcache |
extension |
7.4.14 |
brick/math |
composer-package |
0.9.2 |
composer/package-versions-deprecated |
composer-package |
1.11.99.1 |
doctrine/cache |
composer-package |
1.10.2 |
doctrine/collections |
composer-package |
1.6.7 |
doctrine/dbal |
composer-package |
3.0.0 |
doctrine/event-manager |
composer-package |
1.1.1 |
doctrine/lexer |
composer-package |
1.2.1 |
egulias/email-validator |
composer-package |
3.0.0 |
firebase/php-jwt |
composer-package |
v5.2.0 |
fzaninotto/faker |
composer-package |
v1.9.2 |
graham-campbell/result-type |
composer-package |
v1.0.1 |
guzzlehttp/guzzle |
composer-package |
7.2.0 |
guzzlehttp/promises |
composer-package |
1.4.0 |
guzzlehttp/psr7 |
composer-package |
1.7.0 |
phpoption/phpoption |
composer-package |
1.7.5 |
phpunit/php-timer |
composer-package |
5.0.3 |
psr/container |
composer-package |
1.0.0 |
psr/http-client |
composer-package |
1.0.1 |
psr/http-message |
composer-package |
1.0.1 |
ralouphie/getallheaders |
composer-package |
3.0.3 |
ramsey/collection |
composer-package |
1.1.3 |
ramsey/uuid |
composer-package |
4.1.1 |
sebastian/comparator |
composer-package |
4.0.6 |
sebastian/diff |
composer-package |
4.0.4 |
sebastian/exporter |
composer-package |
4.0.3 |
sebastian/global-state |
composer-package |
5.0.2 |
sebastian/object-reflector |
composer-package |
2.0.4 |
sebastian/recursion-context |
composer-package |
4.0.4 |
symfony/deprecation-contracts |
composer-package |
v2.2.0 |
symfony/polyfill-ctype |
composer-package |
v1.22.0 |
symfony/polyfill-intl-idn |
composer-package |
v1.22.0 |
symfony/polyfill-intl-normalizer |
composer-package |
v1.22.0 |
symfony/polyfill-mbstring |
composer-package |
v1.22.0 |
symfony/polyfill-php72 |
composer-package |
v1.22.0 |
symfony/polyfill-php80 |
composer-package |
v1.22.0 |
symfony/process |
composer-package |
v5.2.1 |
symfony/var-dumper |
composer-package |
v5.2.1 |
symfony/yaml |
composer-package |
v5.2.1 |
vlucas/phpdotenv |
composer-package |
v5.3.0 |
PHP 5.6.44
Name | Type | Version |
---|---|---|
bz2 |
extension |
5.6.44 |
calendar |
extension |
5.6.44 |
Core |
extension |
5.6.40-39 |
ctype |
extension |
5.6.44 |
curl |
extension |
5.6.44 |
date |
extension |
5.6.40-39 |
dom |
extension |
20031129 |
ereg |
extension |
5.6.44 |
exif |
extension |
1.4 |
fileinfo |
extension |
1.0.5 |
filter |
extension |
0.11.0 |
ftp |
extension |
5.6.44 |
gd |
extension |
5.6.44 |
gettext |
extension |
5.6.44 |
hash |
extension |
1.0 |
iconv |
extension |
5.6.44 |
interbase |
extension |
5.6.44 |
json |
extension |
1.2.1 |
ldap |
extension |
5.6.44 |
libxml |
extension |
5.6.44 |
mbstring |
extension |
5.6.44 |
mcrypt |
extension |
5.6.44 |
mhash |
extension |
5.6.44 |
mssql |
extension |
5.6.44 |
mysql |
extension |
1.0 |
mysqli |
extension |
0.1 |
mysqlnd |
extension |
5.0.11-dev |
odbc |
extension |
1.0 |
openssl |
extension |
5.6.44 |
pcntl |
extension |
5.6.44 |
pcre |
extension |
5.6.44 |
PDO |
extension |
1.0.4dev |
pdo_dblib |
extension |
1.0.1 |
PDO_Firebird |
extension |
0.3 |
pdo_mysql |
extension |
1.0.2 |
PDO_ODBC |
extension |
1.0.1 |
pdo_pgsql |
extension |
1.0.2 |
pdo_sqlite |
extension |
1.0.1 |
pgsql |
extension |
5.6.44 |
Phar |
extension |
2.0.2 |
posix |
extension |
5.6.44 |
readline |
extension |
5.6.40-39 |
Reflection |
extension |
5.6.44 |
session |
extension |
5.6.44 |
shmop |
extension |
5.6.44 |
SimpleXML |
extension |
0.1 |
soap |
extension |
5.6.44 |
sockets |
extension |
5.6.44 |
SPL |
extension |
0.2 |
sqlite3 |
extension |
0.7-dev |
standard |
extension |
5.6.40-39 |
sysvmsg |
extension |
5.6.44 |
sysvsem |
extension |
5.6.44 |
sysvshm |
extension |
5.6.44 |
tidy |
extension |
2.0 |
tokenizer |
extension |
0.1 |
wddx |
extension |
5.6.44 |
xml |
extension |
5.6.44 |
xmlreader |
extension |
0.1 |
xmlwriter |
extension |
0.1 |
xsl |
extension |
0.1 |
Zend OPcache |
extension |
7.0.6-dev |
zip |
extension |
1.12.5 |
zlib |
extension |
2.0 |
extension |
5.6.44 |
|
Zend OPcache |
extension |
7.0.6-dev |
doctrine/annotations |
composer-package |
v1.4.0 |
doctrine/cache |
composer-package |
v1.6.2 |
doctrine/collections |
composer-package |
v1.4.0 |
doctrine/common |
composer-package |
v2.7.3 |
doctrine/dbal |
composer-package |
v2.5.13 |
doctrine/inflector |
composer-package |
v1.1.0 |
doctrine/lexer |
composer-package |
1.0.2 |
egulias/email-validator |
composer-package |
2.1.25 |
firebase/php-jwt |
composer-package |
v5.2.0 |
fzaninotto/faker |
composer-package |
v1.9.2 |
guzzlehttp/guzzle |
composer-package |
6.5.5 |
guzzlehttp/promises |
composer-package |
1.4.0 |
guzzlehttp/psr7 |
composer-package |
1.7.0 |
paragonie/random_compat |
composer-package |
v2.0.19 |
phpoption/phpoption |
composer-package |
1.7.5 |
phpunit/php-timer |
composer-package |
1.0.9 |
psr/container |
composer-package |
1.0.0 |
psr/http-message |
composer-package |
1.0.1 |
ralouphie/getallheaders |
composer-package |
3.0.3 |
ramsey/uuid |
composer-package |
3.9.3 |
sebastian/comparator |
composer-package |
1.2.4 |
sebastian/diff |
composer-package |
1.4.3 |
sebastian/exporter |
composer-package |
2.0.0 |
sebastian/global-state |
composer-package |
1.1.1 |
sebastian/recursion-context |
composer-package |
2.0.0 |
symfony/polyfill-ctype |
composer-package |
v1.19.0 |
symfony/polyfill-intl-idn |
composer-package |
v1.19.0 |
symfony/polyfill-intl-normalizer |
composer-package |
v1.19.0 |
symfony/polyfill-mbstring |
composer-package |
v1.19.0 |
symfony/polyfill-php70 |
composer-package |
v1.19.0 |
symfony/polyfill-php72 |
composer-package |
v1.19.0 |
symfony/process |
composer-package |
v3.4.47 |
symfony/var-dumper |
composer-package |
v3.4.47 |
symfony/yaml |
composer-package |
v3.4.47 |
vlucas/phpdotenv |
composer-package |
v4.2.0 |