SlideShare a Scribd company logo
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

PPTX
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
PDF
UI Testing Best Practices - An Expected Journey
PPTX
Better Page Object Handling with Loadable Component Pattern
PPTX
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
PPTX
Getting Started with XCTest and XCUITest for iOS App Testing
PDF
Testing Web Applications
PDF
Front-End Testing: Demystified
PDF
Join the darkside: Selenium testing with Nightwatch.js
ATAGTR2017 Upgrading a mobile tester's weapons with advanced debugging
UI Testing Best Practices - An Expected Journey
Better Page Object Handling with Loadable Component Pattern
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
Getting Started with XCTest and XCUITest for iOS App Testing
Testing Web Applications
Front-End Testing: Demystified
Join the darkside: Selenium testing with Nightwatch.js

What's hot (20)

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

Viewers also liked (17)

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

Similar to Test automation introduction training at Polteq (20)

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

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation theory and applications.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
A Presentation on Artificial Intelligence
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
cuic standard and advanced reporting.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation theory and applications.pdf
Modernizing your data center with Dell and AMD
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Reach Out and Touch Someone: Haptics and Empathic Computing
A Presentation on Artificial Intelligence
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Network Security Unit 5.pdf for BCA BBA.
cuic standard and advanced reporting.pdf
20250228 LYD VKU AI Blended-Learning.pptx
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf

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

  • #10: #tooling#opensource#commercieel#driver#engine#GUI#abstractie