PHPackages                             profpaul001/php-test-framework - 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. profpaul001/php-test-framework

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

profpaul001/php-test-framework
==============================

Un framework di test generico per applicazioni PHP/MySQL

00PHP

Since Apr 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/profpaul001/php-test-framework)[ Packagist](https://packagist.org/packages/profpaul001/php-test-framework)[ RSS](/packages/profpaul001-php-test-framework/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Test Framework
==================

[](#php-test-framework)

Un framework di test generico per applicazioni PHP/MySQL che permette di eseguire facilmente test comuni senza dover scrivere codice di test da zero.

[![Versione](https://camo.githubusercontent.com/a9291d3cc536b316c5a8c21ccfbc9bfa1f1a55580aa7583886447e918936ba1f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e652d302e312e302d626c7565)](https://camo.githubusercontent.com/a9291d3cc536b316c5a8c21ccfbc9bfa1f1a55580aa7583886447e918936ba1f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e652d302e312e302d626c7565)[![PHP](https://camo.githubusercontent.com/304648072498203eded0cde1e7eafda467ffe7fb625aaa0c39ce7192ba7db96b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342532422d707572706c65)](https://camo.githubusercontent.com/304648072498203eded0cde1e7eafda467ffe7fb625aaa0c39ce7192ba7db96b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342532422d707572706c65)[![Licenza](https://camo.githubusercontent.com/f17af6dee82953bd9746fe7330fca75fbf504a0f7186a62a47b8e9d2485f0554/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e7a612d4d49542d677265656e)](https://camo.githubusercontent.com/f17af6dee82953bd9746fe7330fca75fbf504a0f7186a62a47b8e9d2485f0554/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e7a612d4d49542d677265656e)

🌟 Panoramica
------------

[](#-panoramica)

PHP Test Framework è un sistema modulare che offre test predefiniti e pronti all'uso per verificare componenti comuni nelle applicazioni PHP/MySQL:

- ✅ Connessioni al database
- ✅ Struttura e integrità delle tabelle
- ✅ Pagine web e risposte HTTP
- ✅ Form e input utente

Questa è la **versione 0.1.0** - una prima implementazione stabile che sarà arricchita con nuove funzionalità nei prossimi aggiornamenti.

🚀 Installazione
---------------

[](#-installazione)

### Via Composer

[](#via-composer)

```
composer require profpaul001/php-test-framework
Clonazione dal Repository
git clone https://github.com/profpaul001/php-test-framework.git
cd php-test-framework
composer install

📋 Utilizzo Base

 [
        'host' => 'localhost',
        'username' => 'user',
        'password' => 'password',
        'database' => 'testdb'
    ],
    'urls' => [
        'home' => 'https://miosito.com',
        'login' => 'https://miosito.com/login.php'
    ],
    'forms' => [
        'login' => [
            'url' => 'https://miosito.com/login.php',
            'fields' => [
                'username' => 'test',
                'password' => 'test123'
            ],
            'success' => 'Login successful'
        ]
    ]
];

// Inizializza il test runner
$runner = new TestRunner($config);

// Esegui diversi test
echo "Esecuzione test database...\n";
$result = $runner->runTest(DatabaseTests::class, 'testConnection', [$config['database']]);
echo ($result['success'] ? "✓" : "✗") . " " . $result['message'] . "\n";

echo "\nEsecuzione test HTTP...\n";
$result = $runner->runTest(HTTPTests::class, 'testStatusCode', [$config['urls']['home']]);
echo ($result['success'] ? "✓" : "✗") . " " . $result['message'] . "\n";

// Genera un report HTML
$htmlReport = $runner->generateReport();
file_put_contents('report.html', $htmlReport);
echo "\nReport HTML generato in report.html\n";

📊 Funzionalità
Test Database

// Verifica connessione
$result = $runner->runTest(DatabaseTests::class, 'testConnection', [$config['database']]);

// Verifica esistenza tabella
$result = $runner->runTest(DatabaseTests::class, 'testTableExists', [$config['database'], 'users']);

// Esegui una query di test
$result = $runner->runTest(DatabaseTests::class, 'testQuery', [
    $config['database'],
    "SELECT COUNT(*) FROM users"
]);

Test HTTP

// Verifica codice risposta
$result = $runner->runTest(HTTPTests::class, 'testStatusCode', [$config['urls']['home']]);

// Verifica contenuto pagina
$result = $runner->runTest(HTTPTests::class, 'testPageContent', [
    $config['urls']['home'],
    'Benvenuto nel mio sito'
]);

// Verifica tempo di risposta
$result = $runner->runTest(HTTPTests::class, 'testResponseTime', [
    $config['urls']['home'],
    1.5 // timeout in secondi
]);

// Verifica HTTPS
$result = $runner->runTest(HTTPTests::class, 'testHTTPS', [$config['urls']['home']]);

Test Form

// Verifica invio form
$result = $runner->runTest(FormTests::class, 'testFormSubmit', [
    $config['forms']['login']['url'],
    $config['forms']['login']['fields'],
    $config['forms']['login']['success']
]);

// Verifica validazione
$result = $runner->runTest(FormTests::class, 'testFormValidation', [
    $config['forms']['login']['url'],
    ['username' => '', 'password' => ''],
    'Il campo username è obbligatorio'
]);

💻 Interfaccia Web
Il framework include anche una semplice interfaccia web per eseguire i test attraverso il browser. Basta accedere al file index.php nella directory principale.

🛣️ Roadmap
Questa è solo la prima versione del framework. In futuro, prevediamo di aggiungere:

 Test di sicurezza (XSS, SQL Injection, CSRF)
 Test di prestazioni e carico
 Test di integrità dei dati
 Supporto per API REST
 Generazione automatica di test basati sulla struttura del database
 Integrazione con sistemi CI/CD
 Supporto per framework PHP popolari (Laravel, Symfony, etc.)

🤝 Contribuire
I contributi sono benvenuti! Se desideri contribuire:

Fai un fork del repository
Crea un branch per la tua feature (git checkout -b feature/AmazingFeature)
Committa le tue modifiche (git commit -m 'Add some AmazingFeature')
Pusha al branch (git push origin feature/AmazingFeature)
Apri una Pull Request

📜 Licenza
Questo progetto è distribuito con licenza MIT. Vedi il file LICENSE per maggiori informazioni.
👨‍💻 Autore

ProfPaul - GitHub

⭐️ Se questo progetto ti è utile, considera di aggiungergli una stella su GitHub! ⭐️
```

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/162866316?v=4)[profpaul001](/maintainers/profpaul001)[@profpaul001](https://github.com/profpaul001)

---

Top Contributors

[![profpaul001](https://avatars.githubusercontent.com/u/162866316?v=4)](https://github.com/profpaul001 "profpaul001 (5 commits)")

### Embed Badge

![Health badge](/badges/profpaul001-php-test-framework/health.svg)

```
[![Health](https://phpackages.com/badges/profpaul001-php-test-framework/health.svg)](https://phpackages.com/packages/profpaul001-php-test-framework)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M360](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

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