In questo repository trovate il codice della demo che ho presentato durante la mia sessione End-to-End Javascript Testing all'evento DevOps@Work 2017.
Questa demo utilizza Selenium e Protractor per automatizzare i test end-to-end di un'applicazione ASP.NET Core.
- Sulla branch master trovare l'applicazione sotto test.
- Sulla branch withoutPageObjects trovate l'implementazione dei test senza usare il pattern Page Objects.
- Sulla branch withPageObjects trovate l'implementazione dei test usando il pattern Page Objects.
Per eseguire i test è necessario:
- installare NodeJS sul proprio PC scaricando il setup appropriato dal sito di Node;
- installare Proctrator usando NPM per mezzo del comando
npm install -g protractor
da un qualsiasi prompt dei comandi; - aggiornare il WebDriver di Selenium per mezzo del comando
webdriver-manager update
da un qualsiasi prompt dei comandi; - aprire un prompt dei comandi nella cartella Tests che si trova all'interno del progetto ed eseguire il comando
protractor config.js
.
Questa demo utilizza direttamente il driver per Chrome. Se volete cambiare questa impostazione potete andare nel file
config.js
e modifica l'impostazione come previsto dalla configurazione di Protractor.