dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
dbx\dbxSelfTest\dbxSelfTestRunner Class Reference

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

Public Member Functions

 __construct (?string $baseDir=null, ?string $logDir=null)
 baseDir ()
 logDir ()
 catalog (string $profile='full')
 Liefert den vollstaendigen oder auf ein Profil reduzierten Testkatalog.
 catalogById ()
 startRun (string $profile='full', array $testIds=array(), string $mode='complete')
 Startet einen protokollierten Lauf.
 executeRunTest (string $runId, string $testId)
 Fuehrt genau einen zum Lauf gehoerenden Test aus und protokolliert ihn.
 recordBrowserTestResult (string $runId, string $testId, array $payload)
 Uebernimmt das Ergebnis eines im Admin-Browser isoliert ausgefuehrten JavaScript-Tests.
 finishRun (string $runId, bool $aborted=false)
 runProfile (string $profile='full', array $testIds=array(), ?callable $onResult=null)
 Synchroner Einstieg fuer CLI und CI.
 loadRun (string $runId)
 history (int $limit=20)
 runLogPath (string $runId)

Public Attributes

const LOG_VERSION = 1

Detailed Description

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

Der Runner entdeckt die vorhandenen Tests, fuehrt jeden Test in einem separaten Prozess aus und protokolliert komplette sowie einzelne Laeufe als JSON unter files/sys/selftest. Test-IDs werden ausschliesslich aus dem serverseitig ermittelten Katalog aufgeloest; Request-Werte gelangen nie in eine Shell-Kommandozeile.

Definition at line 13 of file dbxSelfTestRunner.class.php.

Constructor & Destructor Documentation

◆ __construct()

dbx\dbxSelfTest\dbxSelfTestRunner::__construct ( ?string $baseDir = null,
?string $logDir = null )

Definition at line 24 of file dbxSelfTestRunner.class.php.

References $root, baseDir(), and logDir().

Member Function Documentation

◆ baseDir()

dbx\dbxSelfTest\dbxSelfTestRunner::baseDir ( )

Definition at line 33 of file dbxSelfTestRunner.class.php.

Referenced by __construct().

◆ catalog()

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

Liefert den vollstaendigen oder auf ein Profil reduzierten Testkatalog.

Definition at line 46 of file dbxSelfTestRunner.class.php.

References $profile.

Referenced by catalogById(), and startRun().

◆ catalogById()

dbx\dbxSelfTest\dbxSelfTestRunner::catalogById ( )

Definition at line 68 of file dbxSelfTestRunner.class.php.

References $out, and catalog().

Referenced by executeRunTest(), recordBrowserTestResult(), and startRun().

◆ executeRunTest()

dbx\dbxSelfTest\dbxSelfTestRunner::executeRunTest ( string $runId,
string $testId )

Fuehrt genau einen zum Lauf gehoerenden Test aus und protokolliert ihn.

Definition at line 128 of file dbxSelfTestRunner.class.php.

References $catalog, $result, $run, $testId, catalogById(), and loadRun().

Referenced by runProfile().

◆ finishRun()

dbx\dbxSelfTest\dbxSelfTestRunner::finishRun ( string $runId,
bool $aborted = false )

Definition at line 217 of file dbxSelfTestRunner.class.php.

References $run, and loadRun().

Referenced by runProfile().

◆ history()

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

Definition at line 274 of file dbxSelfTestRunner.class.php.

References $file, $files, $items, $run, loadRun(), and logDir().

◆ loadRun()

dbx\dbxSelfTest\dbxSelfTestRunner::loadRun ( string $runId)

Definition at line 253 of file dbxSelfTestRunner.class.php.

References $json.

Referenced by executeRunTest(), finishRun(), history(), recordBrowserTestResult(), and runProfile().

◆ logDir()

dbx\dbxSelfTest\dbxSelfTestRunner::logDir ( )

Definition at line 38 of file dbxSelfTestRunner.class.php.

References $logDir.

Referenced by __construct(), and history().

◆ recordBrowserTestResult()

dbx\dbxSelfTest\dbxSelfTestRunner::recordBrowserTestResult ( string $runId,
string $testId,
array $payload )

Uebernimmt das Ergebnis eines im Admin-Browser isoliert ausgefuehrten JavaScript-Tests.

Testmetadaten und Laufzuordnung bleiben serverseitig.

Definition at line 169 of file dbxSelfTestRunner.class.php.

References $catalog, $now, $result, $run, $testId, catalogById(), and loadRun().

◆ runLogPath()

dbx\dbxSelfTest\dbxSelfTestRunner::runLogPath ( string $runId)

Definition at line 295 of file dbxSelfTestRunner.class.php.

◆ runProfile()

dbx\dbxSelfTest\dbxSelfTestRunner::runProfile ( string $profile = 'full',
array $testIds = array(),
?callable $onResult = null )

Synchroner Einstieg fuer CLI und CI.

Definition at line 241 of file dbxSelfTestRunner.class.php.

References $profile, $result, $run, executeRunTest(), finishRun(), loadRun(), and startRun().

◆ startRun()

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

Startet einen protokollierten Lauf.

Ohne IDs wird das Profil verwendet.

Definition at line 80 of file dbxSelfTestRunner.class.php.

References $_SERVER, $catalog, $mode, $now, $profile, $run, catalog(), and catalogById().

Referenced by runProfile().

Member Data Documentation

◆ LOG_VERSION

const dbx\dbxSelfTest\dbxSelfTestRunner::LOG_VERSION = 1

Definition at line 15 of file dbxSelfTestRunner.class.php.


The documentation for this class was generated from the following file: