PHPackages                             vitexsoftware/flexibee-testing-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. vitexsoftware/flexibee-testing-tools

ActiveLibrary[Testing &amp; Quality](/categories/testing)

vitexsoftware/flexibee-testing-tools
====================================

Several AbraFlexi Testing Tools.

v1.1.8(1mo ago)5101[3 PRs](https://github.com/VitexSoftware/AbraFlexi-Tools/pulls)MITPHPCI passing

Since Jul 28Pushed 1w ago2 watchersCompare

[ Source](https://github.com/VitexSoftware/AbraFlexi-Tools)[ Packagist](https://packagist.org/packages/vitexsoftware/flexibee-testing-tools)[ Patreon](https://www.patreon.com/VitexSoftware)[ RSS](/packages/vitexsoftware-flexibee-testing-tools/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (11)Versions (16)Used By (0)

Tools for AbraFlexi
===================

[](#tools-for-abraflexi)

Set of commandline tools for interaction with AbraFlexi server

[![wakatime](https://camo.githubusercontent.com/878b463aa498d0be8671d2237b7915b2b0fd625a610ef5df779872cef273fd48/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f757365722f35616262613963612d383133652d343361632d396235662d6231636664663364633163372f70726f6a6563742f64653938316662322d633130332d343230332d613531612d3130346564303438393630382e737667)](https://wakatime.com/badge/user/5abba9ca-813e-43ac-9b5f-b1cfdf3dc1c7/project/de981fb2-c103-4203-a51a-104ed0489608)

[![Project Logo](abraflexitools.svg?raw=true)](abraflexitools.svg?raw=true)

AbraFlexi Get
-------------

[](#abraflexi-get)

Obtain record data from AbraFlexi

Usage:

```
fbget -eevidence-name -iRowID [-u] [-cpath] [column names to show]

```

**-p** path to custom config file **-u** show record URL

Example:

```
~$ fbget -v -u -c /etc/abraflexi/localhost-client.json -e adresar -i 666 kod nazev
https://localhost:5434/c/spoje_net_s_r_o_/adresar/666&detail=custom:kod,nazev
```

```
{
    "external-ids": [
        "ext:subreg:36699",
        "ext:ipex:58487"
    ],
    "id": "666",
    "kod": "VITEX",
    "nazev": "V\u00edt\u011bzslav Dvo\u0159\u00e1k",
    "kontakty": [
        {
            "id": "2371"
        }
    ]
}
```

AbraFlexi PUT
-------------

[](#abraflexi-put)

Insert or update record data in AbraFlexi

Usage:

```
fbput -eevidence -iRowID [-cpath] [-u] [--colum-name=value] [--colum-name2=value2] ...

```

**-p** path to custom config file **-u** show record URL

Example:

fbput.php --evidence adresar -i 333 -u --nazev=Zmeneno

```
https://demo.abraflexi.eu:5434/c/demo/adresar/333
{"winstrom":{"@version":"1.0","success":"true","stats":{"created":"0","updated":"1","deleted":"0","skipped":"0","failed":"0"},"results":[{"id":"333","request-id":"333","ref":"

```

[![fbcp](fbcp.svg?raw=true)](fbcp.svg?raw=true)

AbraFlexi company Copy
----------------------

[](#abraflexi-company-copy)

Copy one AbraFlexi company to another AbraFlexi

Usage:

```
fbcp https://user:password@abraflexi.source.cz:5434/c/firma_a_s_  https://user:password@abraflexi.destination.cz:5434/c/firma_a_s_  [production]

```

Use **production** parameter to keep EET, Auto Sending Mails and WebHooks enabled in restored company.

Example:

```
fbcp https://lgn:pwd@company.abraflexi.eu:5434/c/company_name https://lgn2:pwd2@vitexsoftware.abraflexi.eu:5434/c/company_name
04/14/18 13:57:18 `FlexiPeeHP\Company`  ⓘ saving backup
04/14/18 13:57:25 `FlexiPeeHP\Company`  ❁ backup saved
04/14/18 13:57:26 `FlexiPeeHP\Company`  ⓘ Remove company before restore
04/14/18 13:57:27 `FlexiPeeHP\Company`  ☠ JSON Decoder: Syntax error
04/14/18 13:57:27 `FlexiPeeHP\Company`  ⚙ ok
04/14/18 13:57:27 `FlexiPeeHP\Company`  ❁ restore begin
04/14/18 13:57:58 `FlexiPeeHP\Company`  ❁ backup restored

```

Create New Company in AbraFlexi
-------------------------------

[](#create-new-company-in-abraflexi)

```
    fbnc  new_company_name
    fbnc  https://user:password@abraflexi.source.cz:5434/c/nova_firma_a_s_

```

Delete Company in AbraFlexi
---------------------------

[](#delete-company-in-abraflexi)

```
    fbdc company_to_delete
    fbdc https://user:password@abraflexi.source.cz:5434/c/smazat_firma_a_s_

```

Configuration file example
--------------------------

[](#configuration-file-example)

```
{
    "ABRAFLEXI_URL": "https:\/\/demo.abraflexi.eu:5434",
    "ABRAFLEXI_LOGIN": "winstrom",
    "ABRAFLEXI_PASSWORD": "winstrom",
    "ABRAFLEXI_COMPANY": "demo"
}
```

Default config file location is /etc/abraflexi/client.json ( also provided by [abraflexi-client-config](https://github.com/VitexSoftware/abraflexi-client-config) debian package )

WebHooks Wipe
-------------

[](#webhooks-wipe)

Drop all webHooks

```
    fbwhwipe [custom config file]

```

WebHook establish
-----------------

[](#webhook-establish)

Register new webhook in AbraFlexi

```
    fbwh  http://webhook.processor/url [xml|json] [custom/config.json]

```

Fake Address Generator
----------------------

[](#fake-address-generator)

```
abraflexi-fake-address --config=../tests/client.json -i 10
```

create 10 fake address

Benchmark
---------

[](#benchmark)

Count time of several operations speed upon given company/database. The benchmark always prepares required test records (bank account, cash register, pricelist) before running.

Options:

- -c - number of cycles
- -d - delay in seconds between each operation
- -o - output file path (default: RESULT\_FILE env or stdout)
- -e - path to .env configuration file
- -v - show version and exit

```
abraflexi-benchmark -c 10 -d 1
```

The quickest way to run the benchmark against the instance configured in `.env`:

```
make benchmark
```

### Environment variables

[](#environment-variables)

VariableDefaultDescription`ABRAFLEXI_URL`—AbraFlexi server URL`ABRAFLEXI_LOGIN`—Login username`ABRAFLEXI_PASSWORD`—Login password`ABRAFLEXI_COMPANY`—Company code`ABRAFLEXI_BANK``BANKOVNÍ ÚČET`Bank account code used for bank-move tests`ABRAFLEXI_BANK_DOCTYPE``STAND`Bank document type code (`typDokl`); must exist in the target companyThe JSON report output conforms to the [MultiFlexi report schema](https://raw.githubusercontent.com/VitexSoftware/php-vitexsoftware-multiflexi-core/refs/heads/main/schema/report.json):

```
{
    "producer": "abraflexi-benchmark",
    "status": "success",
    "timestamp": "2026-02-27T15:44:59+01:00",
    "message": "Benchmark completed: 10 cycles with 1s delay",
    "metrics": {
        "pass_10_address_read": "0.123",
        "pass_10_address_write": "0.456",
        "cycles": 10,
        "delay": 1
    }
}
```

[![Result](benchmark-result.png?raw=true)](benchmark-result.png?raw=true)

Payment Simulator
-----------------

[](#payment-simulator)

Simulates realistic customer payment behaviour in AbraFlexi bank evidence. Intended for continuous integration testing of the reminder and matcher pipeline on a test company without affecting real customers.

```
abraflexi-payment-simulator
```

### Customer profiles

[](#customer-profiles)

Assign one of the following AbraFlexi labels to a customer to control their simulated behaviour:

LabelBehaviour`SIM_REGULAR`Pays the exact invoice amount every run (default when no label set)`SIM_LATE_DOUBLE`Skips one cycle; pays all outstanding invoices when ≥ 2 are unpaid`SIM_OVER_PAYER`Pays 1–50 CZK more than owed (creates overpayment)`SIM_UNDER_PAYER`Pays 1–50 CZK less than owed (leaves a remainder)`SIM_TYPO_VARSYM`Pays the correct amount but with a mangled variable symbol (one digit missing or extra)`SIM_NON_PAYER`Never pays (triggers reminder escalation → `NEPLATIC` → `ODPOJENO`)### Environment variables

[](#environment-variables-1)

VariableDefaultDescription`ABRAFLEXI_URL`—AbraFlexi server URL`ABRAFLEXI_LOGIN`—Login username`ABRAFLEXI_PASSWORD`—Login password`ABRAFLEXI_COMPANY`—Company code`ABRAFLEXI_BANK`—Bank account code for simulated payments (**required**)`ABRAFLEXI_BANK_DOCTYPE``STANDARD`Document type code (`typDokl`)`RESULT_FILE``php://stdout`Path to write JSON result report`EASE_LOGGER``console|syslog`Log output target### JSON output

[](#json-output)

```
{
    "exitcode": 0,
    "status": "success",
    "timestamp": "2026-06-24T10:00:00+02:00",
    "message": "Created: 4 payments, Skipped: 1 (NON_PAYER/LATE), Errors: 0",
    "metrics": { "created": 4, "skipped": 1, "errors": 0 },
    "payments": [
        { "invoice": "FV-2026-0042", "profile": "REGULAR", "amount": 1200.0, "varSym": "20260042", "action": "payment_created" },
        { "invoice": "FV-2026-0043", "profile": "TYPO_VARSYM", "amount": 800.0, "varSym": "2026043", "action": "payment_created" },
        { "invoice": "FV-2026-0044", "profile": "NON_PAYER", "action": "skipped" }
    ]
}
```

### MultiFlexi runtemplate

[](#multiflexi-runtemplate)

Register the app in MultiFlexi and create an hourly runtemplate via the CLI:

```
# Register the app (done once after package installation)
multiflexi-cli app:import multiflexi/payment_simulator.multiflexi.app.json

# Create the runtemplate (replace company slug and config values)
multiflexi-cli run-template:create \
  --name "Payment Simulator – spoje_net_s_r_o_" \
  --app_uuid "55dcc221-b5d0-4656-95e6-e8b5e41ca92a" \
  --company "spoje_net_s_r_o_" \
  --cron "0 * * * *" \
  --active true \
  --config ABRAFLEXI_BANK=RB1328660
```

Certificate Updater
-------------------

[](#certificate-updater)

Generate or renew HTTPS certificate for AbraFlexi server.

```
abraflexi-certbot

```

The tool reads AbraFlexi connection details from the standard config file (`/etc/abraflexi/client.json`) and uploads the Let's Encrypt certificate via the AbraFlexi REST API endpoint `/certificate.json`.

### Prerequisites

[](#prerequisites)

The certificate must be obtained and renewed by [Certbot](https://certbot.eff.org/)(Let's Encrypt). The tool expects the certificate files to be present in `/etc/letsencrypt/live//`.

### ⚠️ Required: Force RSA key type in Certbot

[](#️-required-force-rsa-key-type-in-certbot)

**AbraFlexi only supports RSA private keys.** Since 2024, Let's Encrypt issues ECDSA (EC) keys by default. Uploading an EC certificate results in the error:

```
BCECPrivateKey cannot be cast to RSAPrivateCrtKey

```

You must explicitly configure Certbot to use an RSA key for the certificate used by AbraFlexi.

**Edit the renewal configuration file** for your domain:

```
/etc/letsencrypt/renewal/.conf

```

Add or update the following lines in the `[renewalparams]` section:

```
[renewalparams]
key_type = rsa
rsa_key_size = 4096
```

**Example** (`/etc/letsencrypt/renewal/abraflexi.example.com.conf`):

```
# renew_before_expiry = 30 days
version = 2.9.0
archive_dir = /etc/letsencrypt/archive/abraflexi.example.com
cert = /etc/letsencrypt/live/abraflexi.example.com/cert.pem
privkey = /etc/letsencrypt/live/abraflexi.example.com/privkey.pem
chain = /etc/letsencrypt/live/abraflexi.example.com/chain.pem
fullchain = /etc/letsencrypt/live/abraflexi.example.com/fullchain.pem

[renewalparams]
authenticator = standalone
key_type = rsa
rsa_key_size = 4096
```

After editing the file, force a renewal to immediately generate an RSA certificate:

```
certbot renew --cert-name  --force-renewal
```

Verify the key type before running `abraflexi-certbot`:

```
openssl pkey -in /etc/letsencrypt/live//privkey.pem -text -noout | head -3
# Expected output: RSA Private-Key (not EC Private-Key)
```

### Automatic renewal via deploy hook

[](#automatic-renewal-via-deploy-hook)

To automatically upload the certificate to AbraFlexi after each renewal, create a deploy hook at `/etc/letsencrypt/renewal-hooks/deploy/abraflexi.sh`:

```
#!/bin/bash
abraflexi-certbot
```

```
chmod +x /etc/letsencrypt/renewal-hooks/deploy/abraflexi.sh
```

Certbot will execute this script automatically after every successful renewal.

MultiFlexi
----------

[](#multiflexi)

Tools for AbraFlexi is ready for run as [MultiFlexi](https://multiflexi.eu) application. See the full list of ready-to-run applications within the MultiFlexi platform on the [application list page](https://www.multiflexi.eu/apps.php).

[![MultiFlexi App](https://github.com/VitexSoftware/MultiFlexi/raw/main/doc/multiflexi-app.svg)](https://www.multiflexi.eu/apps.php)

Installation
------------

[](#installation)

There is repository for Debian/Ubuntu Linux distributions:

```
sudo apt install lsb-release wget apt-transport-https bzip2

wget -qO- https://repo.vitexsoftware.com/keyring.gpg | sudo tee /etc/apt/trusted.gpg.d/vitexsoftware.gpg
echo "deb [signed-by=/etc/apt/trusted.gpg.d/vitexsoftware.gpg]  https://repo.vitexsoftware.com  $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
sudo apt update

sudo apt install abraflexi-tools
```

[![Debian Installation](https://raw.githubusercontent.com/VitexSoftware/AbraFlexi-Tools/master/debian-screenshot.png "Debian example")](https://raw.githubusercontent.com/VitexSoftware/AbraFlexi-Tools/master/debian-screenshot.png)

We use:

- [PHP Language](https://secure.php.net/)
- [PHP AbraFlexi](https://github.com/Spoje-NET/php-abraflexi) - Library for Interaction with [AbraFlexi](https://abraflexi.eu/)
- [Ease Core](https://github.com/VitexSoftware/php-ease-core) - Glue &amp; Tool Set

Thanks to:
----------

[](#thanks-to)

- [PureHTML](https://purehtml.cz/) &amp; [Spoje.Net](https://spoje.net/) for support
- [Abra](https://abra.eu) for [AbraFlexi](https://abraflexi.eu/)

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance95

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 88.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~497 days

Recently: every ~539 days

Total

6

Last Release

42d ago

Major Versions

0.12 → v1.1.82026-05-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/f24039b55245f141b108d0245b5821fe6cc4bb0585e36283f97301cd3aa792bc?d=identicon)[vitex](/maintainers/vitex)

---

Top Contributors

[![Vitexus](https://avatars.githubusercontent.com/u/2621130?v=4)](https://github.com/Vitexus "Vitexus (159 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (21 commits)")

---

Tags

abraflexicommandlinedebianflexibeeflexibee-testingtoolsphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vitexsoftware-flexibee-testing-tools/health.svg)

```
[![Health](https://phpackages.com/badges/vitexsoftware-flexibee-testing-tools/health.svg)](https://phpackages.com/packages/vitexsoftware-flexibee-testing-tools)
```

###  Alternatives

[refinery29/test-util

Provides a test helper, generic data providers, and assertions.

1554.0k5](/packages/refinery29-test-util)[grrr-amsterdam/garp3

Framework and CMS built on top of Zend Framework.

1152.5k1](/packages/grrr-amsterdam-garp3)[vigneshc91/laravel-test-generator

Laravel package for generating unit test automatically

248.7k](/packages/vigneshc91-laravel-test-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
