SlideShare a Scribd company logo
1 of 27
Test automatisering in de praktijk
Structuur
• Test automatisering
• Tools
• Doen!

Als iets niet duidelijk is: schrijf het NIET op maar
vraag het direct!!

2
Imagination > Knowledge
Hoe ziet geautomatiseerd testen eruit?
• AutoIt
• Sikuli

4
• Wat is Test automatisering?

5
Wat is Test automatisering
• Test automatisering is het door speciale software laten
uitvoeren van tests (checks) waarvan 100% zeker
automatisch kan worden vastgesteld of er een “pass”
of een “fail” is.
• Test automation is the use of special software
(separate from the software being tested) to control
the execution of tests and the comparison of actual
outcomes to predicted outcomes.
• This is the process of using a computer program to
execute system or user transactions against an IT
system.
6
Wat is Test automatisering?

Programmeren

package org.openqa.selenium.example;
import
import
import
import

org.openqa.selenium.By;
org.openqa.selenium.WebDriver;
org.openqa.selenium.WebElement;
org.openqa.selenium.htmlunit.HtmlUnitDriver;

public class Example {
public static void main(String[] args) {
// Create a new instance of the html unit driver
// Notice that the remainder of the code relies on the interface,
// not the implementation.
WebDriver driver = new HtmlUnitDriver();
// And now use this to visit Google
driver.get("http://www.google.com");
// Find the text input element by its name
WebElement element = driver.findElement(By.name("q"));
// Enter something to search for
element.sendKeys("Cheese!");
// Now submit the form. WebDriver will find the form for us from the element
element.submit();

// Check the title of the page
System.out.println("Page title is: " + driver.getTitle());
}
}
7
8
Test automatisering tooling
Graphical User Interface
Abstractie laag

Test automation driver laag
Mobile
automation

•
•
•
•
•
•
•
•
•

9

Web
automation

Open Source
WebDriver
White
Jersey
Twin
SelenDroid
IOsDriver
UISpec
ODBC
JDBC

API
automation

SAP
automation

•
•
•
•
•
•
•
•
•

Database
automation

Desktop
automation

Commercieel
HP Functional Tester
IBM Rational Functional Tester
Borland Silktest
Telerik TestStudio
SmartBear TestComplete
Tricentis Tosca
Microsoft Visual Studio Test
Professional
Original Software TestDrive
Froglogic Squish
Opensource test tools
• http://www.opensourcetesting.org/

"Als we opensource gebruiken weten we niet
wat 'erin' zit"

10
Commerciele testautomatisering tools
•
•
•
•
•
•
•
•
•
•
•

11

HP Functional Tester
IBM Rational Functional Tester
Borland Silktest
Telerik TestStudio
SmartBear TestComplete
Tricentis Tosca
Microsoft Visual Studio Test Professional
Original Software TestDrive
Froglogic Squish
Ranorex
T-plan
Opensource testautomatisering tools
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
12

WebDriver
White
Jersey
Twin
SelenDroid
IOsDriver
UISpec
ODBC
JDBC
Abbot Java GUI Test Framework
AutoTestFlash
FitNesse
Watir
BadBoy
Cucumber
Jbehave
Jsystem
MadCow
Robotium
RobotFramework
Sikuli
SoapUI
Sikuli
• Visuele test automation
– Image herkenning
– OCR (Optical Character Recognition)

• Library met een losse editor:
– Python script met de Sikuli-IDE

• Integratie met een IDE (Integrated Developer
Enviornment) Sikuli-API

13
Sikuli - Script
def medewerkers():
Log.elog("First going to clean up if needed...")
VerifyHRM()
Log.elog("Opening Medewerker screen")
ScreenTime("Medewerker.png", "QMedewerkers.png", "Algemeen medewerker")
ScreenTime("IEIMedewerke.png","QMedevierks1-1.png" , "Medewerker (in dienst)")
ScreenTime("IEIMedewerke-1.png", Pattern("glMedewerker.png").similar(0.90), "Medewerker (uit
dienst)")
ScreenTime("IMedewerker0.png", "EMedewerkero.png", "Medewerker Organigram")
ScreenTime("MedewerkersJ.png", "EMedewerkers.png", "Medewerkers Jumbo")
wait(1)
click(Pattern("1370420575832.png").exact().targetOffset(-1,5))
hover("1379681877222.png")
type("Bergen, FJM")
type(Key.ENTER)
#CheckSelected("BeruenFJMvan.png")
ScreenTime("JQ2Raadplege.png", "1367928286130.png", "Loonstroken 0verzicht")
ScreenTime("IVerwerktaDe.png", "EVerwerktepe.png", "Verwerkte perioden bij medewerker")
ScreenTime("Qmsusgjaw.png", "1367928286130.png", "Huidig jaar")
click(Pattern("1368016497762.png").similar(0.80))
click(Pattern("1368016497762.png").similar(0.80))
wait(5)
ScreenTime("Medewerker.png", "QMedewerkers.png", "Algemeen medewerker")
wait(1)
click(Pattern("1370420575832.png").targetOffset(-1,5))
hover("1379681877222.png")
type("Bergen, FJM")
type(Key.ENTER)
14
Sikuli - Script

15
AutoIt
• BASIC-achtige script taal
• Voornamelijk voor Windows GUI acties
– Toetsaanslagen
– Windows manipuleren
– Muis manipuleren en bewegen

• Zeer portable te maken  opslaan als executable
• Library met een losse editor:
– SciTe

• User Interface spion: au3info

16
AutoIt - script
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=sap03.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; Setting global variable for sleeping time and logging.
Global $logging = True
Global $wait = 4000
; Setting the logging function
Func _log($message)
If $logging Then
FileWriteLine(@ScriptDir & 'output1.log', @YEAR & "-" & @MON & "-" & @MDAY & " " &
@HOUR & ":" & @MIN & ":" & @SEC & "-" &"--> "& $message)
EndIf
EndFunc

;start SAPgui
Run ("C:Program FilesSAPFrontEndSAPguisapgui.exe xai61001 00 ")
_log('Connecting to xai61001 system 00')
WinActivate("SAP R/3", "")
WinWaitActive("SAP R/3","")
_log('Verifying that SAP R/3 started')
; Login and verify logged in successfully

17
AutoIt – au3info

18
SoapUI
• SOAP interfaces (API) snel automatiseren
• Genereert:
–
–
–
–
–

19

Voorbeeld requests
Test cases
Test suite
Mock services
Basis voor load & performance tests
SOAP v.s. REST v.s. CRUD
• SOAP: Simple Object Access Protocol
– product.Service.GetProduct(“121”)

• REST: Representational State Transfer
– http://someurl.com/products/product/121

• CRUD: Create Read Update Delete
– select name, price, desc from Products where
ProductID=121

20
SoapUI - Interface

21
SoapUI - WSDL

22
SoapUI - Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soapenvelope" xmlns:web="http://www.webserviceX.NET">
<soap:Header/>
<soap:Body>
<web:GetWeather>
<!--Optional:-->
<web:CityName>Amsterdam Airport Schiphol</web:CityName>
<!--Optional:-->
<web:CountryName>Netherlands</web:CountryName>
</web:GetWeather>
</soap:Body>
</soap:Envelope>

23
SoapUI - Response
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetWeatherResponse xmlns="http://www.webserviceX.NET">
<GetWeatherResult><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<CurrentWeather>
<Location>Amsterdam Airport Schiphol, Netherlands (EHAM) 52-18N 004-46E -2M</Location>
<Time>Nov 14, 2013 - 07:55 AM EST / 2013.11.14 1255 UTC</Time>
<Wind> from the W (260 degrees) at 3 MPH (3 KT) (direction variable):0</Wind>
<Visibility> greater than 7 mile(s):0</Visibility>
<SkyConditions> mostly cloudy</SkyConditions>
<Temperature> 48 F (9 C)</Temperature>
<DewPoint> 46 F (8 C)</DewPoint>
<RelativeHumidity> 93%</RelativeHumidity>
<Pressure> 30.00 in. Hg (1016 hPa)</Pressure>
<Status>Success</Status>
</CurrentWeather>]]></GetWeatherResult>
</GetWeatherResponse>
</soap:Body>
</soap:Envelope>

24
Notepad++
• Text editor
• Syntax highlighting
• Automatische formatting van heel veel ontwikkel en
script talen
• Validatie van de diverse talen
• Krachtige find/replace
• Krachtige Regular Expression functionaliteit

25
26
Show me the money!
• Voer met één van de tools op de USB stick de
volgende opdrachten uit:
– Met de rekenmachine (calculator) bereken de wortel van
12033961  AutoIt of Sikuli
– Met excel bereken de wortel van 12033961  AutoIt of
Sikuli
– Creëer een account op
http://selenium.polteq.com/testshop en gooi iets in je
shopping basket ==> Sikuli of Firefox + Selenium IDE
– Haal het weer op van alle steden in Uzbekistan in 1
script  SoapUI
– In de WindowsUpdate.log vind hoe vaak de PC een
herstart heeft gekregen vanwege een update zonder de
file te openen Notepad++
27

More Related Content

What's hot

Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015
Joe Ferguson
 
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
Tobias Schneck
 

What's hot (20)

Java script unit testing
Java script unit testingJava script unit testing
Java script unit testing
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in Yii
 
Automating UI testing
Automating UI testingAutomating UI testing
Automating UI testing
 
Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahi
 
Automated Frontend Testing
Automated Frontend TestingAutomated Frontend Testing
Automated Frontend Testing
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
 
Efficient JavaScript Unit Testing, JavaOne China 2013
Efficient JavaScript Unit Testing, JavaOne China 2013Efficient JavaScript Unit Testing, JavaOne China 2013
Efficient JavaScript Unit Testing, JavaOne China 2013
 
Automated UI testing done right (DDDSydney)
Automated UI testing done right (DDDSydney)Automated UI testing done right (DDDSydney)
Automated UI testing done right (DDDSydney)
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
Tech Talk #5 : Android Automation Test with Espresso - Trần Văn Toàn
Tech Talk #5 : Android Automation Test with Espresso - Trần Văn ToànTech Talk #5 : Android Automation Test with Espresso - Trần Văn Toàn
Tech Talk #5 : Android Automation Test with Espresso - Trần Văn Toàn
 
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
 
Test automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinTest automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubin
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
 
Codeception
CodeceptionCodeception
Codeception
 
Advanced Selenium Workshop
Advanced Selenium WorkshopAdvanced Selenium Workshop
Advanced Selenium Workshop
 
Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics Tutorial
 

Viewers also liked

Agile in de Echte Wereld- Starten met Scrum
Agile in de Echte Wereld- Starten met ScrumAgile in de Echte Wereld- Starten met Scrum
Agile in de Echte Wereld- Starten met Scrum
Derk-Jan de Grood
 
Getting a grip on your agile maturity using the ambition chart
Getting a grip on your agile maturity using the ambition chartGetting a grip on your agile maturity using the ambition chart
Getting a grip on your agile maturity using the ambition chart
Derk-Jan de Grood
 
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverageTesting NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
mlilley
 

Viewers also liked (17)

EuroSTAR webinar: creating Agile Test Strategies for larger Enterprises
EuroSTAR webinar: creating Agile Test Strategies for larger EnterprisesEuroSTAR webinar: creating Agile Test Strategies for larger Enterprises
EuroSTAR webinar: creating Agile Test Strategies for larger Enterprises
 
Agile in de Echte Wereld- Starten met Scrum
Agile in de Echte Wereld- Starten met ScrumAgile in de Echte Wereld- Starten met Scrum
Agile in de Echte Wereld- Starten met Scrum
 
Getting a grip on your agile maturity using the ambition chart
Getting a grip on your agile maturity using the ambition chartGetting a grip on your agile maturity using the ambition chart
Getting a grip on your agile maturity using the ambition chart
 
Sap gui scripting api with guixt
Sap gui scripting api with guixtSap gui scripting api with guixt
Sap gui scripting api with guixt
 
Testing with Express, Mocha & Chai
Testing with Express, Mocha & ChaiTesting with Express, Mocha & Chai
Testing with Express, Mocha & Chai
 
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverageTesting NodeJS with Mocha, Should, Sinon, and JSCoverage
Testing NodeJS with Mocha, Should, Sinon, and JSCoverage
 
Testing Javascript Apps with Mocha and Chai
Testing Javascript Apps with Mocha and ChaiTesting Javascript Apps with Mocha and Chai
Testing Javascript Apps with Mocha and Chai
 
Unit testing with mocha
Unit testing with mochaUnit testing with mocha
Unit testing with mocha
 
Unit Testing TypeScript
Unit Testing TypeScriptUnit Testing TypeScript
Unit Testing TypeScript
 
SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01SAP performance testing & engineering courseware v01
SAP performance testing & engineering courseware v01
 
Agile scrum roles
Agile scrum rolesAgile scrum roles
Agile scrum roles
 
The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)
The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)
The What, Why and How of (Web) Analytics Testing (Web, IoT, Big Data)
 
Appium: Prime Cuts
Appium: Prime CutsAppium: Prime Cuts
Appium: Prime Cuts
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback Loops
 
Alphorm.com Formation TypeScript
Alphorm.com Formation TypeScriptAlphorm.com Formation TypeScript
Alphorm.com Formation TypeScript
 
Mudularity and Unit Testing in TypeScript (for ng-bkk #3)
Mudularity and Unit Testing in TypeScript (for ng-bkk #3)Mudularity and Unit Testing in TypeScript (for ng-bkk #3)
Mudularity and Unit Testing in TypeScript (for ng-bkk #3)
 
Les Aventures d'Alice - la Révolte des Tests
Les Aventures d'Alice - la Révolte des TestsLes Aventures d'Alice - la Révolte des Tests
Les Aventures d'Alice - la Révolte des Tests
 

Similar to Test automation introduction training at Polteq

UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
AgileEngine
 
Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6
Clever Moe
 
automation framework
automation frameworkautomation framework
automation framework
ANSHU GOYAL
 

Similar to Test automation introduction training at Polteq (20)

OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
 
Selenium With Spices
Selenium With SpicesSelenium With Spices
Selenium With Spices
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
 
Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)Lecture #6. automation testing (andrey oleynik)
Lecture #6. automation testing (andrey oleynik)
 
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
Agile Open Source Performance Test Workshop for Developers, Testers, IT OpsAgile Open Source Performance Test Workshop for Developers, Testers, IT Ops
Agile Open Source Performance Test Workshop for Developers, Testers, IT Ops
 
API Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsAPI Virtualization: Mocking on Steroids
API Virtualization: Mocking on Steroids
 
Comprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA ToolsComprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA Tools
 
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
 
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
 
New Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX TestingNew Generation Record/Playback Tools for AJAX Testing
New Generation Record/Playback Tools for AJAX Testing
 
Setting UIAutomation free with Appium
Setting UIAutomation free with AppiumSetting UIAutomation free with Appium
Setting UIAutomation free with Appium
 
Migrating from HP QuickTest Pro QTP to TestMaker Object Designer
Migrating from HP QuickTest Pro QTP to TestMaker Object DesignerMigrating from HP QuickTest Pro QTP to TestMaker Object Designer
Migrating from HP QuickTest Pro QTP to TestMaker Object Designer
 
Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6Migrating From HP QTP To TestMaker 6
Migrating From HP QTP To TestMaker 6
 
Appium solution
Appium solutionAppium solution
Appium solution
 
Top 20 best automation testing tools
Top 20 best automation testing toolsTop 20 best automation testing tools
Top 20 best automation testing tools
 
automation framework
automation frameworkautomation framework
automation framework
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
 
10 Useful Testing Tools for Open Source Projects @ TuxCon 2015
10 Useful Testing Tools for Open Source Projects @ TuxCon 201510 Useful Testing Tools for Open Source Projects @ TuxCon 2015
10 Useful Testing Tools for Open Source Projects @ TuxCon 2015
 
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion MiddlewareAMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
AMIS Oracle OpenWorld 2013 Review Part 3 - Fusion Middleware
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

Test automation introduction training at Polteq

  • 2. Structuur • Test automatisering • Tools • Doen! Als iets niet duidelijk is: schrijf het NIET op maar vraag het direct!! 2
  • 4. Hoe ziet geautomatiseerd testen eruit? • AutoIt • Sikuli 4
  • 5. • Wat is Test automatisering? 5
  • 6. Wat is Test automatisering • Test automatisering is het door speciale software laten uitvoeren van tests (checks) waarvan 100% zeker automatisch kan worden vastgesteld of er een “pass” of een “fail” is. • Test automation is the use of special software (separate from the software being tested) to control the execution of tests and the comparison of actual outcomes to predicted outcomes. • This is the process of using a computer program to execute system or user transactions against an IT system. 6
  • 7. Wat is Test automatisering? Programmeren package org.openqa.selenium.example; import import import import org.openqa.selenium.By; org.openqa.selenium.WebDriver; org.openqa.selenium.WebElement; org.openqa.selenium.htmlunit.HtmlUnitDriver; public class Example { public static void main(String[] args) { // Create a new instance of the html unit driver // Notice that the remainder of the code relies on the interface, // not the implementation. WebDriver driver = new HtmlUnitDriver(); // And now use this to visit Google driver.get("http://www.google.com"); // Find the text input element by its name WebElement element = driver.findElement(By.name("q")); // Enter something to search for element.sendKeys("Cheese!"); // Now submit the form. WebDriver will find the form for us from the element element.submit(); // Check the title of the page System.out.println("Page title is: " + driver.getTitle()); } } 7
  • 8. 8
  • 9. Test automatisering tooling Graphical User Interface Abstractie laag Test automation driver laag Mobile automation • • • • • • • • • 9 Web automation Open Source WebDriver White Jersey Twin SelenDroid IOsDriver UISpec ODBC JDBC API automation SAP automation • • • • • • • • • Database automation Desktop automation Commercieel HP Functional Tester IBM Rational Functional Tester Borland Silktest Telerik TestStudio SmartBear TestComplete Tricentis Tosca Microsoft Visual Studio Test Professional Original Software TestDrive Froglogic Squish
  • 10. Opensource test tools • http://www.opensourcetesting.org/ "Als we opensource gebruiken weten we niet wat 'erin' zit" 10
  • 11. Commerciele testautomatisering tools • • • • • • • • • • • 11 HP Functional Tester IBM Rational Functional Tester Borland Silktest Telerik TestStudio SmartBear TestComplete Tricentis Tosca Microsoft Visual Studio Test Professional Original Software TestDrive Froglogic Squish Ranorex T-plan
  • 12. Opensource testautomatisering tools • • • • • • • • • • • • • • • • • • • • • • 12 WebDriver White Jersey Twin SelenDroid IOsDriver UISpec ODBC JDBC Abbot Java GUI Test Framework AutoTestFlash FitNesse Watir BadBoy Cucumber Jbehave Jsystem MadCow Robotium RobotFramework Sikuli SoapUI
  • 13. Sikuli • Visuele test automation – Image herkenning – OCR (Optical Character Recognition) • Library met een losse editor: – Python script met de Sikuli-IDE • Integratie met een IDE (Integrated Developer Enviornment) Sikuli-API 13
  • 14. Sikuli - Script def medewerkers(): Log.elog("First going to clean up if needed...") VerifyHRM() Log.elog("Opening Medewerker screen") ScreenTime("Medewerker.png", "QMedewerkers.png", "Algemeen medewerker") ScreenTime("IEIMedewerke.png","QMedevierks1-1.png" , "Medewerker (in dienst)") ScreenTime("IEIMedewerke-1.png", Pattern("glMedewerker.png").similar(0.90), "Medewerker (uit dienst)") ScreenTime("IMedewerker0.png", "EMedewerkero.png", "Medewerker Organigram") ScreenTime("MedewerkersJ.png", "EMedewerkers.png", "Medewerkers Jumbo") wait(1) click(Pattern("1370420575832.png").exact().targetOffset(-1,5)) hover("1379681877222.png") type("Bergen, FJM") type(Key.ENTER) #CheckSelected("BeruenFJMvan.png") ScreenTime("JQ2Raadplege.png", "1367928286130.png", "Loonstroken 0verzicht") ScreenTime("IVerwerktaDe.png", "EVerwerktepe.png", "Verwerkte perioden bij medewerker") ScreenTime("Qmsusgjaw.png", "1367928286130.png", "Huidig jaar") click(Pattern("1368016497762.png").similar(0.80)) click(Pattern("1368016497762.png").similar(0.80)) wait(5) ScreenTime("Medewerker.png", "QMedewerkers.png", "Algemeen medewerker") wait(1) click(Pattern("1370420575832.png").targetOffset(-1,5)) hover("1379681877222.png") type("Bergen, FJM") type(Key.ENTER) 14
  • 16. AutoIt • BASIC-achtige script taal • Voornamelijk voor Windows GUI acties – Toetsaanslagen – Windows manipuleren – Muis manipuleren en bewegen • Zeer portable te maken  opslaan als executable • Library met een losse editor: – SciTe • User Interface spion: au3info 16
  • 17. AutoIt - script #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=sap03.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Setting global variable for sleeping time and logging. Global $logging = True Global $wait = 4000 ; Setting the logging function Func _log($message) If $logging Then FileWriteLine(@ScriptDir & 'output1.log', @YEAR & "-" & @MON & "-" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & "-" &"--> "& $message) EndIf EndFunc ;start SAPgui Run ("C:Program FilesSAPFrontEndSAPguisapgui.exe xai61001 00 ") _log('Connecting to xai61001 system 00') WinActivate("SAP R/3", "") WinWaitActive("SAP R/3","") _log('Verifying that SAP R/3 started') ; Login and verify logged in successfully 17
  • 19. SoapUI • SOAP interfaces (API) snel automatiseren • Genereert: – – – – – 19 Voorbeeld requests Test cases Test suite Mock services Basis voor load & performance tests
  • 20. SOAP v.s. REST v.s. CRUD • SOAP: Simple Object Access Protocol – product.Service.GetProduct(“121”) • REST: Representational State Transfer – http://someurl.com/products/product/121 • CRUD: Create Read Update Delete – select name, price, desc from Products where ProductID=121 20
  • 23. SoapUI - Request <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soapenvelope" xmlns:web="http://www.webserviceX.NET"> <soap:Header/> <soap:Body> <web:GetWeather> <!--Optional:--> <web:CityName>Amsterdam Airport Schiphol</web:CityName> <!--Optional:--> <web:CountryName>Netherlands</web:CountryName> </web:GetWeather> </soap:Body> </soap:Envelope> 23
  • 24. SoapUI - Response <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetWeatherResponse xmlns="http://www.webserviceX.NET"> <GetWeatherResult><![CDATA[<?xml version="1.0" encoding="utf-16"?> <CurrentWeather> <Location>Amsterdam Airport Schiphol, Netherlands (EHAM) 52-18N 004-46E -2M</Location> <Time>Nov 14, 2013 - 07:55 AM EST / 2013.11.14 1255 UTC</Time> <Wind> from the W (260 degrees) at 3 MPH (3 KT) (direction variable):0</Wind> <Visibility> greater than 7 mile(s):0</Visibility> <SkyConditions> mostly cloudy</SkyConditions> <Temperature> 48 F (9 C)</Temperature> <DewPoint> 46 F (8 C)</DewPoint> <RelativeHumidity> 93%</RelativeHumidity> <Pressure> 30.00 in. Hg (1016 hPa)</Pressure> <Status>Success</Status> </CurrentWeather>]]></GetWeatherResult> </GetWeatherResponse> </soap:Body> </soap:Envelope> 24
  • 25. Notepad++ • Text editor • Syntax highlighting • Automatische formatting van heel veel ontwikkel en script talen • Validatie van de diverse talen • Krachtige find/replace • Krachtige Regular Expression functionaliteit 25
  • 26. 26
  • 27. Show me the money! • Voer met één van de tools op de USB stick de volgende opdrachten uit: – Met de rekenmachine (calculator) bereken de wortel van 12033961  AutoIt of Sikuli – Met excel bereken de wortel van 12033961  AutoIt of Sikuli – Creëer een account op http://selenium.polteq.com/testshop en gooi iets in je shopping basket ==> Sikuli of Firefox + Selenium IDE – Haal het weer op van alle steden in Uzbekistan in 1 script  SoapUI – In de WindowsUpdate.log vind hoe vaak de PC een herstart heeft gekregen vanwege een update zonder de file te openen Notepad++ 27

Editor's Notes

  1. #tooling#opensource#commercieel#driver#engine#GUI#abstractie