Questo documento descrive il sistema di marker utilizzato per categorizzare i test backend in base alle loro dipendenze e per determinare quali possono essere eseguiti in GitHub Actions.
I marker sono commenti PHPDoc e non fanno parte dello standard PHPUnit.
Indica che il test è completamente eseguibile in GitHub Actions.
- Non richiede database Oracle
- Non richiede servizi esterni reali
- Può utilizzare mock (
Http::fake(),Storage::fake(),Mockery) - L’utente
enrico.oliva@uniurb.itviene creato tramitephp artisan migrate --seed
testInsegamentiRelation– Test sulle relazioni tra modellitestReadStoreAttachment– Test su storage e gestione allegatitestStatoCivile– Test su liste di stato civiletestValidazioneSamlResponse– Test validazione XML SAMLtestQueryPrecontr– Test sulle query (richiede utente creato dal seeder)
testModelliCreazioneAttrsAndStore– Creazione modello SignatureRequest con AttrstestModelliCreazioneAttrsAndStore1– Creazione modello con Attrs annidatitestCreateDossierMocked– Creazione dossier (mock HTTP)testGetDossierMocked– Recupero dossier (mock HTTP)testGetSignerIdMocked– Recupero ID firmatario (mock HTTP)testValidateDocumentRequestMocked– Validazione documento (mock HTTP)testCreateSignatureRequestMocked– Creazione richiesta firma (mock HTTP)testUploadURLMocked– Download URL caricamento (mock HTTP)testUploadFirmaIOMocked– Caricamento file su FirmaIO (mock HTTP)testGetSignatureRequestMocked– Recupero richiesta firma (mock HTTP)testPubblicazioneRichiestaMocked– Pubblicazione richiesta (mock HTTP)testSendNotificationMocked– Invio notifica (mock HTTP)testDownloadSignedDocumentMocked– Download documento firmato (mock HTTP)
testUploadUSIGNMocked– Caricamento documento USIGN (mockery)testUploadFinishedUSIGNMocked– Conferma upload USIGN (mockery)testOtpTypeUSIGNMocked– Tipo OTP USIGN (mockery)testSendOtpUSIGNMocked– Invio OTP USIGN (mockery)
Il test richiede accesso al database MySQL.
Il test richiede accesso a database Oracle (UGOV).
testCalcoloNumeroRinnovi– Calcolo numero rinnovitestUgovCompensi– Lettura compensi da UGOVtestUgovPagamentoCompensi– Pagamento compensi UGOVtest_ContrUgovExportCSV– Export CSV da dati UGOVtest_InseganmentiConSegmentiUgov– Insegnamenti con segmenti UGOV
Il test richiede autenticazione con un utente specifico.
Esempio:
@requires-user enrico.oliva@uniurb.it
Indica che il test richiede un servizio esterno.
Servizi comuni:
- PDF – Generazione PDF
- Email – Invio email
- Titulus – Integrazione Titulus
- FirmaIO – Firma digitale FirmaIO
- USIGN – Firma digitale USIGN
Esempio comando CI:
./vendor/bin/phpunit --testsuite Unit --filter "testInsegamentiRelation|testReadStoreAttachment|testStatoCivile|testValidazioneSamlResponse|testQueryPrecontr|testCreateDossierMocked|testUploadUSIGNMocked"La whitelist completa dipende dal workflow presente in .github/workflows/.
La CI deve rimanere:
- deterministica
- veloce
- indipendente da sistemi esterni
Le integrazioni reali devono essere testate separatamente.