Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.www.php > #22175 > unrolled thread

entrypoint per eseguire tutti i test di un progetto

Started byFlavix <imeil@a.a>
First post2018-08-09 10:42 +0200
Last post2018-08-10 10:20 +0100
Articles 4 — 2 participants

Back to article view | Back to it.comp.www.php


Contents

  entrypoint per eseguire tutti i test di un progetto Flavix <imeil@a.a> - 2018-08-09 10:42 +0200
    Re: entrypoint per eseguire tutti i test di un progetto Alessandro Pellizzari <shuriken@amiran.it> - 2018-08-09 11:19 +0100
      Re: entrypoint per eseguire tutti i test di un progetto Flavix <imeil@a.a> - 2018-08-09 13:19 +0200
        Re: entrypoint per eseguire tutti i test di un progetto Alessandro Pellizzari <shuriken@amiran.it> - 2018-08-10 10:20 +0100

#22175 — entrypoint per eseguire tutti i test di un progetto

FromFlavix <imeil@a.a>
Date2018-08-09 10:42 +0200
Subjectentrypoint per eseguire tutti i test di un progetto
Message-ID<pkgupd$kp4$1@gioia.aioe.org>
#!/usr/bin/env bash
set -ue
# cd "$(dirname "$0")"

phpunit tests # test unitari
./test-functional.sh # test funzionali
# eventuali altri test particolari



Questo script come posso chiamarlo (all-tests, test-entrypoint, 
run-tests, ecc.)?

Dove lo metto?
Nella directory principale del progetto, o in una sotto-directory (bin/, 
tests/bin/, ecc.)?

Insomma esiste uno standard per nominare il punto centrale da cui far 
partire *tutti* i test, in modo che chiunque utente posso identificarlo 
facilmente?

[toc] | [next] | [standalone]


#22176

FromAlessandro Pellizzari <shuriken@amiran.it>
Date2018-08-09 11:19 +0100
Message-ID<ft2iq1F3350U1@mid.individual.net>
In reply to#22175
On 09/08/2018 09:42, Flavix wrote:

> #!/usr/bin/env bash
> set -ue
> # cd "$(dirname "$0")"
> 
> phpunit tests # test unitari
> ./test-functional.sh # test funzionali
> # eventuali altri test particolari
> 
> Questo script come posso chiamarlo (all-tests, test-entrypoint, 
> run-tests, ecc.)?

Se usi composer non ti serve uno script. Puoi definire un comando e poi 
chiamare

composer run test

Bye.

[toc] | [prev] | [next] | [standalone]


#22178

FromFlavix <imeil@a.a>
Date2018-08-09 13:19 +0200
Message-ID<pkh804$16d5$1@gioia.aioe.org>
In reply to#22176
Il 09/08/2018 12:19, Alessandro Pellizzari ha scritto:
> 
> Se usi composer non ti serve uno script. Puoi definire un comando e poi 
> chiamare
> 
> composer run test

Ecco il comando che vorrei eseguire

$ docker run -it --rm --volumes-from test_wordpress_1 --network 
container:test_wordpress_1 wordpress:cli plugin activate myplugin
Success: Plugin activated.

Ed ecco i soliti capricci:

$ cat composer.json
{
     "scripts": {
         "test": "docker run -it --rm --volumes-from test_wordpress_1 
--network container:test_wordpress_1 wordpress:cli plugin activate myplugin"
     }
}

$ composer run-script test
 > docker run ... the input device is not a TTY
Script docker run ... handling the test event returned with an error


   [RuntimeException]
   Error Output: the input device is not a TTY


run-script [--timeout TIMEOUT] [--dev] [--no-dev] [-l|--list] [--] 
[<script>] [<args>]...


Sembra tutto bello, tutto facile, tutto scontato, sembra...

[toc] | [prev] | [next] | [standalone]


#22185

FromAlessandro Pellizzari <shuriken@amiran.it>
Date2018-08-10 10:20 +0100
Message-ID<ft53mqFkleuU1@mid.individual.net>
In reply to#22178
On 09/08/2018 12:19, Flavix wrote:

> Il 09/08/2018 12:19, Alessandro Pellizzari ha scritto:
>>
>> Se usi composer non ti serve uno script. Puoi definire un comando e 
>> poi chiamare
>>
>> composer run test
> 
> Ecco il comando che vorrei eseguire

Hai cambiato le specifiche del problema! :P

> $ docker run -it --rm --volumes-from test_wordpress_1 --network 
 > ...
>  > docker run ... the input device is not a TTY

L'opzione -it di Docker attiva una sessione interattiva (tastiera e 
schermo). Lanciandolo come script non puoi prendere il controllo della 
tastiera, da cui l'errore: The input device (la tastiera) is not a TTY 
(non รจ interattiva)

Bye.

[toc] | [prev] | [standalone]


Back to top | Article view | it.comp.www.php


csiph-web