Il 0% ha trovato utile questo documento (0 voti)
502 visualizzazioni

Selenium Web Test Tool - Training

Caricato da

Jan Liwski
Copyright
© Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
Il 0% ha trovato utile questo documento (0 voti)
502 visualizzazioni

Selenium Web Test Tool - Training

Caricato da

Jan Liwski
Copyright
© Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
Sei sulla pagina 1/ 47

Kube Partners Presents:

Selenium Web Test Tool Training


Discover the automating power of Selenium

Milano, 26Discover the automating power of Selenium Aprile 2010


Copyright 2009-2010 by KP

Speakers:

Mario Manzoni
[email protected]

Silvia Zamperlin
[email protected]

Discover the automating power of Selenium


Copyright 2009-2010 by KP

Dettagli del Corso

Discover the automating power of Selenium


Copyright 2009-2010 by KP

Contenuti del corso

FOSS Selenium Overview Introduzione a Selenium IDE Installare Selenium IDE Come Eseguire un Semplice Test Tools Utili per Scrivere e Controllare i Tests Creare Selenium Test Suites Quick Tour di Selenium IDE Features Semplici Quick Tour di Selenium IDE Features Avanzate
Discover the automating power of Selenium
Copyright 2009-2010 by KP

Contenuti del corso

Selenium Test Runner Principali Concetti di Selenium Principali Comandi di Selenium Comandi di Selenium, Continuiamo Usare Espressioni Regolari in Selenium IDE Utilizzo Avanzato di Selenium IDE

Selenium IDE Extensions Utilizzo di JavaScript


Discover the automating power of Selenium
Copyright 2009-2010 by KP

Contenuti del corso

Come Installare Selenium RC Selenium RC Overview Come Usare Selenium RC Eseguire Test Cases con Selenium RC Scenari evoluti con Selenium RC:

Ruby e MySql Data Driven Testing e CSV

Quiz e Prova su Strada


Discover the automating power of Selenium
Copyright 2009-2010 by KP

Goals

Essere in Grado di Considerare lImplementazione di Test Automatizzati per Applicazioni Web su Diverse Piattaforme Software e con Differenti Browsers Considerare Lutilizzo di Selenium, a Vari Livelli, per lImplementazione dei Test

Discover the automating power of Selenium


Copyright 2009-2010 by KP

Skills e Pre-requisiti

HTML Xpath Expressions JavaScript, incluso DOM (Document Object Model) Regular Expressions Ruby o Altri Linguaggi di Scripting/Programmazione

Discover the automating power of Selenium


Copyright 2009-2010 by KP

FOSS (Free and Open Source Software) in QA

LIMPORTANZA DEL QA:

La Complessit Crescente dei Prodotti/Servizi Web System (Application) Bugs Quality Assurance con il Testing Difficolt del testing Manuale

Discover the automating power of Selenium


Copyright 2009-2010 by KP

FOSS (Free and Open Source Software) in QA

SOFTWARE DEVELOPERS E QA:

Le (cattive) Abitudini dei SW Engineers Ignorare il Ciclo di QA Riluttanza ad Accettare i Bugs nel Proprio Codice Nascondere i Bugs Le Dispute tra il Development Team e il QA Team

Discover the automating power of Selenium


Copyright 2009-2010 by KP

10

FOSS (Free and Open Source Software) in QA

UN COMPITO NOIOSO E RIPETITIVO (MA IMPORTANTE):

Quando Iniziare/Finire il Testing Testare Ogni Use Case ad Ogni Bug/Fix Testing Continuativo e Ripetuto Noia e Frustrazione Una Possibile Soluzione: Testing Automatizzato

Discover the automating power of Selenium


Copyright 2009-2010 by KP

11

FOSS (Free and Open Source Software) in QA

INIZIATIVE FOSS PER IL QA:

OpenQA Open Source Testing Selenium come FOSS tool per lAutomazione QA

SIDE Selenium RC Selenium User-Extensions Selenium Community

Discover the automating power of Selenium


Copyright 2009-2010 by KP

12

FOSS (Free and Open Source Software) in QA

ESTENDIBILIT E SUPPORTO:

Selenium un Tool Molto Potente Ma, non Pu Supportare Tutte le Possibili Esigenze User Extensions Contributed User Extensions nel Wiki Community

Forums, Wiki, JIRA (Bug Tracking)

Discover the automating power of Selenium


Copyright 2009-2010 by KP

13

FOSS (Free and Open Source Software) in QA

CONCLUSIONI:

Le Soluzioni open Source Guidano lIndustria SW FOSS Risponde al Software QA Pi Velocemente Questa una Buona Opportunit da Esplorare

Discover the automating power of Selenium


Copyright 2009-2010 by KP

14

I Primi Passi Con Selenium

IMPARARE A:

Creare Tests in Selenium IDE (SIDE) Eseguire i Tests SIDE Eseguire i Tests con differenti Browsers/Piattaforme usando Selenium RC (Remote Control) Server Scrivere Tests Selenium in Uno dei Tanti Linguaggi Supportati Usando i Drivers di Selenium RC

Discover the automating power of Selenium


Copyright 2009-2010 by KP

15

La Storia di Selenium

Inventato nel 2004 da Jason Huggins e il Suo Team Il Nome Originale Era JavaScript Functional Tester (JSFT) Open Source Integration Test Framework Browser Based Costruito Originariamente da ThoughtWorks 100% Javascript e HTML Disegnato per Rendere Semplice la Scrittura di Test Capacit di Eseguire Suite di Tests o Singoli Tests Capacit di Eseguire Passo Passo i Singoli Tests Cross Browser IE 6+, Firefox 1+, Opera, Safari 2+
Discover the automating power of Selenium
Copyright 2009-2010 by KP

16

La Storia di Selenium

Sviluppato da ThoughtWorks per Testare il Loro Nuovo Sistema di Timesheets e Rimborso Spese

Cos iniziata la necessita di usare Seleniun.

Discover the automating power of Selenium


Copyright 2009-2010 by KP

17

La Storia di Selenium

Selenium un Elemento Chimico con Numero Atomico 34, Rappresentato dal Simbolo Se. E un Se Non-metallo Chimicamente Vicino allo Zolfo.

Selenium.

Selenium di Norma Utilizzato Contro lAvvelenamento da Mercurio (Mercury)


Discover the automating power of Selenium
Copyright 2009-2010 by KP

18

La Storia di Selenium

Mercury Quality Center (MQC) Sviluppato da Mercury Interactive Corp. (Ora di propriet di HP)

Mercury

Utilizzati dalle Aziende: MQC, QTP, LoadRunner, WinRunner e TestDirector Gli Utenti di Selenium di Solito Conoscono Almeno Uno dei Prodotti Mercury
Discover the automating power of Selenium
Copyright 2009-2010 by KP

19

Cos Selenium?

Selenium un Software Testing Framework Portabile per Applicazioni Web I Tests Possono Essere Scritti Come Tabelle HTML o Codificati in Uno dei Tanti Linguaggi Supportati e Possono Essere Direttamente Eseguiti in Molti dei Moderni browsers Selenium Pu Essere Installato su MS Windows, Linux e Macintosh Selenium Utilizzato in Particolare per lEsecuzione di UAT (User Acceptance Test)

Discover the automating power of Selenium


Copyright 2009-2010 by KP

20

Selenium Overview

SELENIUM CONSISTE DI:

Selenium IDE (SIDE) Selenium Core Selenium RC Server Selenium RC Drivers Selenium Grid Selenium On Rails Selenium User Extensions

Discover the automating power of Selenium


Copyright 2009-2010 by KP

21

Selenium Overview

Discover the automating power of Selenium


Copyright 2009-2010 by KP

22

Selenium Overview

Discover the automating power of Selenium


Copyright 2009-2010 by KP

23

Selenium Overview

Discover the automating power of Selenium


Copyright 2009-2010 by KP

24

Selenium IDE (SIDE)

SIDE un Completo IDE (Integrated Development Environment) per lo Sviluppo di Tests Selenium (Prima Noto col Nome di Selenium Recorder) E unEstensione (Add-on) per Firefox che Permette la Registrazione e la Modifica dei Tests Permette di Creare Tests Molto Facilmente Pu Generare Codice Ruby e per Altri Linguaggi Pronto da Eseguire Attraverso le API di Selenium RC

Discover the automating power of Selenium


Copyright 2009-2010 by KP

25

Selenium IDE Features

Record e Playback La Sua Intelligente Selezione dei Campi Pu Usare IDs, Names, o XPath in Funzione delle Necessit Auto-completamento per Tutti i Pi Comuni Comandi Esegue Intere Test Suites o Singoli Test Cases Debug e Breakpoints Salva i Tests come HTML, Ruby Scripts e Altri Formati Supporta i Files user-extensions.js di Selenium Opzione di Assert Automatico del Titolo Pagina e Supporto delle Espressioni Regolari
Discover the automating power of Selenium
Copyright 2009-2010 by KP

26

Selenium IDE License

Selenium Stato Sviluppato dal Team di Sviluppatori e Testers di ThoughtWorks Selenium un Tool FOSS, Rilasciato Sotto Licenza Apache 2.0 e Pu Essere Liberamente Scaricato e Utilizzato Free-charge

Discover the automating power of Selenium


Copyright 2009-2010 by KP

27

Installare Selenium IDE

*1

*2

Controlla se Selenium IDE gi installato

Discover the automating power of Selenium


Copyright 2009-2010 by KP

28

Installare Selenium IDE

*1

Click download

*2

Non eseguire con IE browser

Click Link

Discover the automating power of Selenium


Copyright 2009-2010 by KP

29

Installare Selenium IDE

*1

*2

Restart Firefox per rendere utilizzabile il Selenium Plug-in

Discover the automating power of Selenium


Copyright 2009-2010 by KP

30

Bringing Up Selenium IDE

Discover the automating power of Selenium


Copyright 2009-2010 by KP

31

Esempio: Link-Checking

1. 2.

Naviga con Firefox allIndirizzo


http://www.deanza.edu/directory/dir-az.html

Click Sul Pulsante Rosso Record Per Iniziare la Registrazione Se Necessario ( Gi Attivato di Default Quando SIDE Attivato la Prima Volta)

3.

Click sulla Finestra del Browser per Darle il Focus

Discover the automating power of Selenium


Copyright 2009-2010 by KP

32

Esempio: Link-Checking

4. 5. 6.

Click sulla Lettera T dalla Barra di Navigazione Orizzontale Seleziona il Link Technical Writing e Aspetta il Caricamento della Nuova Pagina Seleziona Verifytitle Technical Writing dal Men di Contesto

Discover the automating power of Selenium


Copyright 2009-2010 by KP

33

Esempio: Link-Checking

Controlla sempre qui se il comando Selenium voluto non presente

Discover the automating power of Selenium


Copyright 2009-2010 by KP

34

Esempio: Link-Checking

7. 8. 9.

Seleziona il Pulsante Indietro (Back) del Browser Ripeti gli Ultimi Due Passi per il Link Transcript Click sul Pulsante Rosso Record per Chiudere la Registrazione

Discover the automating power of Selenium


Copyright 2009-2010 by KP

35

Esempio: Link-Checking

Codice HTML Registrato

Discover the automating power of Selenium


Copyright 2009-2010 by KP

36

Esempio: Link-Checking

A Questo Punto Tutte le Azioni Utente, Eccetto il Click sul Pulsante Back del Browser, Sono State Registrate Per Considerare Anche Questo Click, Necessario Aggiungere la Chiamata al Comando GoBackAndWait

Discover the automating power of Selenium


Copyright 2009-2010 by KP

37

Inserire Comandi in Selenese Dalla Table View

Seleziona il Tab Table di SIDE Seleziona il terzo Click/clickAndWait Fai Apparire il Men di Contesto di SIDE e Seleziona la Voce Insert New Command

Discover the automating power of Selenium


Copyright 2009-2010 by KP

38

Inserire Comandi in Selenese Dalla Table View

Punto di inserimento

Men di contesto

Arg-1

Arg-2

Discover the automating power of Selenium


Copyright 2009-2010 by KP

39

Inserire Comandi in Selenese Dalla Table View

Digita g nel Campo Command Seleziona GoBackAndWait dal Men dei Comandi

Discover the automating power of Selenium


Copyright 2009-2010 by KP

40

Inserire Comandi in Selenese Dalla Table View

Men dei comandi

Discover the automating power of Selenium


Copyright 2009-2010 by KP

41

Replaying: il Test alla Moviola

1. 2. 3.

Seleziona File=>Save Test Case As per Salvare il Test Sposta lo Slider della Velocit a Slow Seleziona la Seconda Freccia Verde (Play Current Test Case o Start Point)

Discover the automating power of Selenium


Copyright 2009-2010 by KP

42

Replaying: il Test alla Moviola


Speed slider

Playback glyph Comando in esecuzione

Risultato

Pulisci il log

Discover the automating power of Selenium


Copyright 2009-2010 by KP

43

Analizzare i Risultati: Selenium Log

1. 2.

Dalla Vista Table Osservare le Linee Verdi rispetto a quelle Rosse (se Presenti) Dalla Vista Table o Source Selezionare il Tab Log e Guardare ai Possibili Errori (Font Rosso Bold)

Discover the automating power of Selenium


Copyright 2009-2010 by KP

44

Replaying: il Test alla Moviola

Verifiche superate

Nessun errore

Discover the automating power of Selenium


Copyright 2009-2010 by KP

45

References

http://seleniumhq.org http://seleniumhq.org/projects/ide http://seleniumhq.org/projects/core http://seleniumhq.org/projects/remote-control http://selenium-client.rubyforge.org http://selenium-grid.seleniumhq.org http://wiki.openqa.org/dashboard.action

Discover the automating power of Selenium


Copyright 2009-2010 by KP

46

Kube Partners

Kube Partners UK Dowgate Hill House,14-16 Dowgate Hill,LondonEC4R 2SU Telephone: +44 (0) 203 167 4799 Kube Partners Italy Via Zucchi, 7 Monza 20052 (Milan) Tel: +39 039 388 965 [email protected]
Discover the automating power of Selenium
Copyright 2009-2010 by KP

47

Potrebbero piacerti anche