kiwitcms/phpunit-plugin

v1.0.0 2023-01-29 19:28 UTC

This package is auto-updated.

Last update: 2024-12-07 21:54:11 UTC


README

Build Status Tidelift Become-a-sponsor Twitter

Configuration and environment

1. Install package

The preferred method of installation is via Composer. Run the following command to install the package and add it as a requirement to your project's composer.json:

composer require kiwitcms/phpunit-plugin

2. Create ~/.tcms.conf with the following contents:

[tcms]
url =
username =
password =

product =
product_version =
build =

The filename ~/.tcms.conf is expanded to something like /home/tcms-bot/.tcms.conf on Linux and C:\Users\tcms-bot\.tcms.conf on Windows, where tcms-bot is the username on the local computer.

It’s also possible to provide system-wide config in /etc/tcms.conf, which is valid only on Linux! On Windows it would be C:\tcms.conf.

Execute the following command to find the exact location on your system:

php configFilePath.php

Set the appropriate values.

You can set all of them as environment variables (config file values have precedence):

TCMS_API_URL =
TCMS_USERNAME =
TCMS_PASSWORD =
TCMS_PRODUCT =
TCMS_PRODUCT_VERSION =
TCMS_BUILD =
TCMS_RUN_ID =

3. Add listener configuration to phpunit.xml

<listeners>
    <listener class="\KiwiTcmsPhpUnitPlugin\PHPUnit\PHPUnitTestListener" file="vendor/kiwitcms/phpunit-plugin/src/PHPUnit/PHPUnitTestListener.php" />
</listeners>

Other

If the product, product version or build do no exist, they will be created.

A new test run and test plan will be created on each run. You can set run_id in the config file or TCMS_RUN_ID env var, if you want to update a single run.

License

Distributed under the terms of the GNU GPL v3.0 license, "kiwitcms/phpunit-plugin" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.