dbxapp 4.5.3
Technische API-Referenz der dbxapp-Plattform
Lade ...
Suche ...
Keine Treffer
dbx\dbxSelfTest\dbxSelfTestRunner Klassenreferenz

Zentraler, auch ohne Web-Kernel nutzbarer Test-Orchestrator. Mehr ...

Öffentliche Methoden

 __construct (?string $base_dir=null, ?string $log_dir=null)
 base_dir ()
 log_dir ()
 catalog (string $profile='full')
 Liefert den vollständigen oder auf ein Profil reduzierten Testkatalog.
 catalog_by_id ()
 start_run (string $profile='full', array $test_ids=array(), string $mode='complete')
 Startet einen protokollierten Lauf.
 execute_run_test (string $run_id, string $test_id)
 Führt genau einen zum Lauf gehörenden Test aus und protokolliert ihn.
 record_browser_test_result (string $run_id, string $test_id, array $payload)
 Übernimmt das Ergebnis eines im Admin-Browser isoliert ausgeführten JavaScript-Tests.
 finish_run (string $run_id, bool $aborted=false)
 run_profile (string $profile='full', array $test_ids=array(), ?callable $on_result=null)
 Synchroner Einstieg für CLI und CI.
 load_run (string $run_id)
 history (int $limit=20)
 clear_history ()
 Löscht alle protokollierten Testläufe.
 run_log_path (string $run_id)

Öffentliche Attribute

const LOG_VERSION = 1

Ausführliche Beschreibung

Zentraler, auch ohne Web-Kernel nutzbarer Test-Orchestrator.

Der Runner entdeckt die vorhandenen Tests, führt jeden Test in einem separaten Prozess aus und protokolliert komplette sowie einzelne Läufe als JSON unter files/sys/selftest. Test-IDs werden ausschließlich aus dem serverseitig ermittelten Katalog aufgelöst; Request-Werte gelangen nie in eine Shell-Kommandozeile.

Beschreibung der Konstruktoren und Destruktoren

◆ __construct()

dbx\dbxSelfTest\dbxSelfTestRunner::__construct ( ?string $base_dir = null,
?string $log_dir = null )

Benutzt $root, base_dir() und log_dir().

Dokumentation der Elementfunktionen

◆ base_dir()

dbx\dbxSelfTest\dbxSelfTestRunner::base_dir ( )

Wird benutzt von __construct().

◆ catalog()

dbx\dbxSelfTest\dbxSelfTestRunner::catalog ( string $profile = 'full')

Liefert den vollständigen oder auf ein Profil reduzierten Testkatalog.

Benutzt $profile.

Wird benutzt von catalog_by_id() und start_run().

◆ catalog_by_id()

dbx\dbxSelfTest\dbxSelfTestRunner::catalog_by_id ( )

◆ clear_history()

dbx\dbxSelfTest\dbxSelfTestRunner::clear_history ( )

Löscht alle protokollierten Testläufe.

Ein gerade aktiv laufender Lauf (Status "running", noch innerhalb der Aktiv-Karenzzeit) bleibt erhalten, damit eine parallel offene Live-Ansicht nicht verwaist.

Rückgabe
int Anzahl der tatsächlich gelöschten Protokolldateien.

Benutzt $run, load_run() und log_dir().

◆ execute_run_test()

dbx\dbxSelfTest\dbxSelfTestRunner::execute_run_test ( string $run_id,
string $test_id )

Führt genau einen zum Lauf gehörenden Test aus und protokolliert ihn.

Benutzt $result, $run, catalog_by_id() und load_run().

Wird benutzt von run_profile().

◆ finish_run()

dbx\dbxSelfTest\dbxSelfTestRunner::finish_run ( string $run_id,
bool $aborted = false )

Benutzt $run und load_run().

Wird benutzt von run_profile().

◆ history()

dbx\dbxSelfTest\dbxSelfTestRunner::history ( int $limit = 20)

Benutzt $run, load_run() und log_dir().

◆ load_run()

dbx\dbxSelfTest\dbxSelfTestRunner::load_run ( string $run_id)

◆ log_dir()

dbx\dbxSelfTest\dbxSelfTestRunner::log_dir ( )

Wird benutzt von __construct(), clear_history() und history().

◆ record_browser_test_result()

dbx\dbxSelfTest\dbxSelfTestRunner::record_browser_test_result ( string $run_id,
string $test_id,
array $payload )

Übernimmt das Ergebnis eines im Admin-Browser isoliert ausgeführten JavaScript-Tests.

Testmetadaten und Laufzuordnung bleiben serverseitig.

Benutzt $result, $run, catalog_by_id() und load_run().

◆ run_log_path()

dbx\dbxSelfTest\dbxSelfTestRunner::run_log_path ( string $run_id)

◆ run_profile()

dbx\dbxSelfTest\dbxSelfTestRunner::run_profile ( string $profile = 'full',
array $test_ids = array(),
?callable $on_result = null )

Synchroner Einstieg für CLI und CI.

Benutzt $id, $profile, $result, $run, execute_run_test(), finish_run(), load_run() und start_run().

◆ start_run()

dbx\dbxSelfTest\dbxSelfTestRunner::start_run ( string $profile = 'full',
array $test_ids = array(),
string $mode = 'complete' )

Startet einen protokollierten Lauf.

Ohne IDs wird das Profil verwendet.

Benutzt $_SERVER, $id, $profile, $run, catalog() und catalog_by_id().

Wird benutzt von run_profile().

Dokumentation der Datenelemente

◆ LOG_VERSION

const dbx\dbxSelfTest\dbxSelfTestRunner::LOG_VERSION = 1

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: