PHPackages                             centreon/centreon-test-lib - 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. centreon/centreon-test-lib

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

centreon/centreon-test-lib
==========================

Library using for Behat test

25.10.x-dev(2mo ago)82.0M↓21%[2 PRs](https://github.com/centreon/centreon-test-lib/pulls)Apache-2.0PHPPHP 8.2.\*CI passing

Since Mar 10Pushed 1w ago29 watchersCompare

[ Source](https://github.com/centreon/centreon-test-lib)[ Packagist](https://packagist.org/packages/centreon/centreon-test-lib)[ RSS](/packages/centreon-centreon-test-lib/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (9)Versions (33)Used By (0)

Centreon Test Lib
=================

[](#centreon-test-lib)

Rationale
---------

[](#rationale)

Centreon Web uses acceptance tests to ensure its software quality. Testing is done with the help of Behat and this project contains Behat-compliant classes used in many Centreon projects.

With this classes, PHP developers can mimic the interaction between end-users and the application. The layers are a follow and should explain more clearly of classes of Centreon Test Lib heavily differs from standard Centreon classes.

LayerLanguageDescriptionAcceptance TestPHPThis is where acceptance tests are written and where classes from this project comes in handy. These acceptance tests are run by Behat.BehatPHPBehat run acceptance tests and provides reports.PhantomJSC++ but irrelevantPhantomJS is a headless browser, optimal for testing purposes.CentreonPHP (web UI)A classical Centreon interface, with which monitoring is just plain fun.Class naming
------------

[](#class-naming)

There should be one class per Centreon page. That is, as soon as you browse to a new page of Centreon, a new class should be used to manipulate this page. These classes should be named after the intent of the page, not after the menu from which they were accessed. For exemple the service creation/edition page is named ServiceConfigurationPage. The backup configuration page in the Administration menu is named BackupConfigurationPage.

MenuClass nameMonitoring -&gt; Status Details -&gt; Services -&gt; InspectServiceMonitoringDetailsPageMonitoring -&gt; Downtimes -&gt; AddDowntimeConfigurationPageConfiguration -&gt; Hosts -&gt; Hosts -&gt; Add / EditHostConfigurationPageConfiguration -&gt; Hosts -&gt; TemplatesHostTemplateConfigurationListingPageConfiguration -&gt; Hosts -&gt; Templates -&gt; Add / EditHostTemplateConfigurationPageConfiguration -&gt; Services -&gt; Services by hostServiceConfigurationListingPageConfiguration -&gt; Services -&gt; Services by host -&gt; Add / EditServiceConfigurationPageConfiguration -&gt; Services -&gt; TemplatesServiceTemplateConfigurationListingPageConfiguration -&gt; Services -&gt; Templates -&gt; Add / EditServiceTemplateConfigurationPageConfiguration -&gt; Services -&gt; Meta Services -&gt; Add / EditMetaServiceConfigurationPageConfiguration -&gt; Users -&gt; Contacts / UsersContactConfigurationListingPageConfiguration -&gt; Users -&gt; Contacts / Users -&gt; Add / EditContactConfigurationPageConfiguration -&gt; Commands -&gt; ChecksCommandConfigurationListingPageConfiguration -&gt; Commands -&gt; Checks -&gt; Add / EditCommandConfigurationPageConfiguration -&gt; Commands -&gt; NotificationsCommandConfigurationListingPageConfiguration -&gt; Commands -&gt; Notifications -&gt; Add / EditCommandConfigurationPageConfiguration -&gt; Commands -&gt; DiscoveryCommandConfigurationListingPageConfiguration -&gt; Commands -&gt; Discovery -&gt; Add / EditCommandConfigurationPageConfiguration -&gt; Commands -&gt; MiscellaneousCommandConfigurationListingPageConfiguration -&gt; Commands -&gt; Miscellaneous -&gt; Add / EditCommandConfigurationPageConfiguration -&gt; Pollers -&gt; PollersPollerConfigurationListingPageConfiguration -&gt; Pollers -&gt; Pollers -&gt; Add / EditPollerConfigurationPageConfiguration -&gt; Pollers -&gt; Export configurationPollerConfigurationExportPageAdministration -&gt; Parameters -&gt; BackupBackupConfigurationPageClass methods
-------------

[](#class-methods)

As a rule of thumb methods should be kept short and perform as few actions as possible. It is always possible to add helper functions that perform more heavy processing but they should be *really* helpful.

### Constructor

[](#constructor)

The constructor of a page must let users choose whether they wish to navigate to the requested page or not. The rationale behind this is that the same class should be used when navigating directly to a specific page or when instantiating the class after the page was already loaded (link clicked in another page for example).

In most simple cases, navigation will be controlled by a single boolean argument. For example here is the constructor of the BackupConfigurationPage.

```
public function __construct($context, $visit = true)
```

When pages are more specific (they apply to a single service for example), the constructor should allow navigation to the page anyway. Here is the constructor of the ServiceMonitoringDetailsPage.

```
public function __construct($context, $host = '', $service = '')
```

In all cases, the constructor should check for page validity by using isPageValid(). It should throw if the page is not valid.

### isPageValid()

[](#ispagevalid)

This method should check for the validity of the current page relative to the class. It should return a boolean indicating whether or not the current page can be manipulated by this class.

Common interfaces
-----------------

[](#common-interfaces)

### Page

[](#page)

```
interface Page
{
    public function isPageValid();
}
```

### ConfigurationPage

[](#configurationpage)

```
interface ConfigurationPage extends Page
{
    public function getProperties();
    public function setProperties($properties);
    public function save();
}
```

### ListingPage

[](#listingpage)

```
interface ListingPage extends Page
{
    public function getEntries();
}
```

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance92

Actively maintained with recent releases

Popularity44

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~169 days

Recently: every ~89 days

Total

14

Last Release

82d ago

Major Versions

21.10.x-dev → 22.04.x-dev2023-12-12

22.04.x-dev → 23.04.x-dev2025-03-25

22.10.x-dev → 24.04.x-dev2025-04-07

23.10.x-dev → 24.10.x-dev2026-02-03

24.10.x-dev → 25.10.x-dev2026-03-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e498c0f91e5c7ae428761f068668e251f158ad53cac6e5f044439f48cf8e13d?d=identicon)[kduret](/maintainers/kduret)

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

![](https://www.gravatar.com/avatar/7ea704cfd9c032a425412167edb9c08e41bafebf64c983f235eb51e77b797ced?d=identicon)[Drago37](/maintainers/Drago37)

---

Top Contributors

[![kduret](https://avatars.githubusercontent.com/u/11978823?v=4)](https://github.com/kduret "kduret (239 commits)")[![loiclau](https://avatars.githubusercontent.com/u/2759315?v=4)](https://github.com/loiclau "loiclau (88 commits)")[![mariegallardo](https://avatars.githubusercontent.com/u/22538764?v=4)](https://github.com/mariegallardo "mariegallardo (65 commits)")[![sc979](https://avatars.githubusercontent.com/u/34628915?v=4)](https://github.com/sc979 "sc979 (19 commits)")[![MatthieuMan](https://avatars.githubusercontent.com/u/22558434?v=4)](https://github.com/MatthieuMan "MatthieuMan (13 commits)")[![leoncx](https://avatars.githubusercontent.com/u/3930276?v=4)](https://github.com/leoncx "leoncx (11 commits)")[![vhr](https://avatars.githubusercontent.com/u/365020?v=4)](https://github.com/vhr "vhr (10 commits)")[![callapa](https://avatars.githubusercontent.com/u/1265083?v=4)](https://github.com/callapa "callapa (9 commits)")[![dmyios](https://avatars.githubusercontent.com/u/108675430?v=4)](https://github.com/dmyios "dmyios (7 commits)")[![Dacchi](https://avatars.githubusercontent.com/u/3994845?v=4)](https://github.com/Dacchi "Dacchi (7 commits)")[![adr-mo](https://avatars.githubusercontent.com/u/31647811?v=4)](https://github.com/adr-mo "adr-mo (6 commits)")[![jeremyjaouen](https://avatars.githubusercontent.com/u/61694165?v=4)](https://github.com/jeremyjaouen "jeremyjaouen (5 commits)")[![centreon-opentofu[bot]](https://avatars.githubusercontent.com/in/2808433?v=4)](https://github.com/centreon-opentofu[bot] "centreon-opentofu[bot] (5 commits)")[![Drago37](https://avatars.githubusercontent.com/u/15056033?v=4)](https://github.com/Drago37 "Drago37 (4 commits)")[![victorvassilev](https://avatars.githubusercontent.com/u/19683390?v=4)](https://github.com/victorvassilev "victorvassilev (4 commits)")[![a-launois](https://avatars.githubusercontent.com/u/88387848?v=4)](https://github.com/a-launois "a-launois (3 commits)")[![selfakiri](https://avatars.githubusercontent.com/u/178811149?v=4)](https://github.com/selfakiri "selfakiri (2 commits)")[![hyahiaoui-ext](https://avatars.githubusercontent.com/u/97593234?v=4)](https://github.com/hyahiaoui-ext "hyahiaoui-ext (2 commits)")[![tuntoja](https://avatars.githubusercontent.com/u/58987095?v=4)](https://github.com/tuntoja "tuntoja (1 commits)")[![mtoufik](https://avatars.githubusercontent.com/u/11309826?v=4)](https://github.com/mtoufik "mtoufik (1 commits)")

---

Tags

Behat

### Embed Badge

![Health badge](/badges/centreon-centreon-test-lib/health.svg)

```
[![Health](https://phpackages.com/badges/centreon-centreon-test-lib/health.svg)](https://phpackages.com/packages/centreon-centreon-test-lib)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M710](/packages/sylius-sylius)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M195](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)

PHPackages © 2026

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