SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
Automated Testing in Pipelines
Integrating Tools and Concepts
Layla Franke, Vlad Ilie, Alina Ionescu
dev.haufe.com
github.com/Haufe-Lexware
@HaufeDev
-Lexware
Scope of this Talk
• Coded UI for UI, Postman + Newman for API (LicenseManager – Layla)
• Testing Framework for Web UI in Java with Selenium (Umantis – Vlad)
• Framework in Java for API testing, Soap UI for API testing (Foundational Services – Alina)
1 LicenseManager - Layla
Coded UI for UI, Postman + Newman for API
License Manager
• C# Web Application
• Inhouse Tool for Management of Serial Numbers
• Existing Continuous Delivery Pipeline in Go.CD
GUI Tests
Coded UI Tests in Visual Studio:
• Recording via Internet Explorer and built-in recorder
• Execution of tests from Commandline with MSTest
• Playback of Tests in various browsers
Build Pipeline
Compile
Deploy Application
Coded UI Test
Internet Explorer
View Test Reports
Do other stuff
Pulish App
QualityDev
Coded UI Tests – Pipeline integration
• Compile your code normally
• Deploy you application on test machine
• Start Coded UI Tests
You can use MSTest.exe on Go Agents
• Use parameterized URL and Browser
Define environment variables in GoCD
• Test Replay runs on Go Agent
• Coded UI Tests Finished
View HTML Test Reports and Coverage Report in Pipeline
Coded UI Test
Chrome
Coded UI Test
Firefox
Go Agent
Go Agent
Go Agent
Coded UI Test Reports - Overview
Coded UI Test Report - Failed
Coded UI Test Report - Passed
Create REST API Tests using Postman
Use Postman to create REST API Tests:
• Export Tests as a „Postman Collection“
• Have a variable URL using a „ Postman Environment”
Newman – Pipeline integration
• Deploy application on App Server
• Execute Newman Tests
Newman is a command line tool used for
automatic execution of tests created with
Postman
• View Test Results in Pipeline
Build Pipeline Go Agent
Newman Test
QualityDev
Pulish App
App Server
View Result
Compile
Deploy App to Server
CD pipeline integration
How to integrate in CD Pipeline?
Visual Studio Coded UI Tests
• Test DLL is created in Compile Job
• Tests run after deployment on test environment in stage QualityDev
• Tests for different browsers can be executed in parallel
Newman REST API Tests
• Can be executed after deployment on test environment
2 Umantis - Vlad
Testing Framework for Web UI in Java with Selenium
About Umantis
• Web project (perl)
• 3 applications
(with stable and beta customers)
• Bugfix release every 2 weeks
• Feature release every 3 months
• Prio1 releases
Test Project Structure
• Java project
• Built using maven
• Selenium web driver
• Page Objects
• testNG
• Git/gerrit
• Jenkins
1 LicenseManager - Layla
Coded UI for UI, Postman + Newman for API
1 LicenseManager - Layla
Coded UI for UI, Postman + Newman for API
Page Objects
• Keep UI elements private
(don’t expose them to tests)
• Expose user actions
• Use data structures instead
of multiple parameters
public class JobApplicationExternalFormPage extends PageBase {
@FindBy(id = "value_153712")
WebElement dataReleaseRadioButtonGroup;
..............................
@FindBy(id = "Button_1161113")
private WebElement submitFinalApplicationButton;
@FindBy(id = "Button_112465")
private WebElement continueButton;
@FindBy(id = "errorcollectionlabel_3606")
private WebElement errorMessage;
.............................
private void fillJobApplicationForm(User applicant) {
UIActions.waitForElement(titleRadioButtonGroup);
UIActions.setValue(new RadioButtonGroup(titleRadioButtonGroup),
applicant.getTitleAsValue());
UIActions.setValue(firstNameEditBox, applicant.getFirstName());
......................................................................
UIActions.setValue(letterOfApplication, applicant.getLetterPath());
UIActions.setValue(resume, applicant.getCvPath());
UIActions.setValue(document1, applicant.getDoc1Path());
try {
UIActions.setValue(new RadioButtonGroup(dataReleaseRadioButtonGroup),
RadioButtonValue.DATA_NOT_AGREE.getValue());
} catch (NoSuchElementException ignored) {
}
UIActions.click(iAgreeCheckBox);
}
.............................
Page Objects - examples
• PageBase.java
• CreateNewEmployeePage.java
• AddPartialEventPage
UIActions
• Static Class
• Entry point for all ui actions
• setValue() and checkValue() for
different types of controls
Test Execution
• Jenkins – a job for each product and branch
• Local – using intelliJ
• On each commit (continuous integration) using gerrit and jenkins
• Maven
• Command line (can be used with any CI or CD tool):
java –jar umantis_test.jar ...
Test Environment
• Selenium Grid using docker containers
• Build test project container (based on maven image)
• Test execution container (based on jdk image)
• Selenium grid (based on hub and node selenium images)
Test Results - overview
Test Results – Detail
• Test failure with history
• Exception with stack trace
• URL, screenshot and html
where the failure occured
License Manager
• C# Web Application
• Inhouse Tool for Management of Serial Numbers
• Existing Continuous Delivery Pipeline in Go.CD
What we started from:
•Atlantic – the monolith
15 + clients…
Splitting the testing:
• 1. DEV Tests – Junit tests
• 2. System Tests - Junit tests
• 3. SOAP UI tests
• 4. Security Tests
• 5. Load Tests
• 6. Rollout (Docker) tests
• 7. UI Automated tests
• 8. Exploratory (manual)
The Testing Framework
Junit Test Framework
Atlantic
Code
Clients
Helpers
Tests
SoapUI Tests
DEV
Unit Tests
Security Tests
Load Tests
Rollout
Docker Tests
Atlantic
Client
Atlantic
Client
Atlantic
Client
HP ALM
UI Tests
Manual
Tests
All the endpoints:
Tests examples:
@Test
public void get_userWithUserId() {
UserDto user1 = UserClient.createNewPendingActiveUser();
Map<String, String> queryParams = new HashMap();
queryParams.put("userid", user1.getUserID().toString());
com.haufe.atlantic.old.usermanagement.rest.dtos.UserDto result =
RestUtilForOldResources.get(com.haufe.atlantic.old.usermanagement.rest.dtos.UserDto.class, headers,
queryParams, PathsHelper.umPaths().users());
assertUserValues(user1, result, true);
Where are they triggered from:
• After deployment, from GoCD there are triggered 2 Docker compose files:
• 1 with Maven for the Junit tests
• 1 with SoapUI for the SoapUI tests
They run in parallel.
Results in Rocket.Chat:
Things we learned
• Achieve “good enough” coverage
• Prioritize
• Take/create shortcuts if you can
• Bypass Logins if possible
• Write small “straight to target” tests (no end-to-end anymore)
• Use more code and API less UI
• Communication is key to good collaboration
Goal?
Faster, more reliable releases.
GUI Tests
Coded UI Tests in Visual Studio:
• Recording via Internet Explorer and built-in recorder
• Execution of tests from Commandline with MSTest
• Playback of Tests in various browsers

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Design & Prototype an API
Design & Prototype an APIDesign & Prototype an API
Design & Prototype an API
 
Serverless Delivery
Serverless DeliveryServerless Delivery
Serverless Delivery
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev ops
 
Using Postman to Automate API On-Boarding
Using Postman to Automate API On-BoardingUsing Postman to Automate API On-Boarding
Using Postman to Automate API On-Boarding
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CD
 
Top10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome AppsTop10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome Apps
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortalSpeed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
 
Continuous Testing using Shippable and Docker
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 
Api360 Summit The Automated Monolith
Api360 Summit  The Automated MonolithApi360 Summit  The Automated Monolith
Api360 Summit The Automated Monolith
 
Continuous delivery of your legacy application
Continuous delivery of your legacy applicationContinuous delivery of your legacy application
Continuous delivery of your legacy application
 
Alm with tfs 2013
Alm with tfs 2013Alm with tfs 2013
Alm with tfs 2013
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
Automation Testing Approach for Responsive Web Design
Automation Testing Approach for Responsive Web DesignAutomation Testing Approach for Responsive Web Design
Automation Testing Approach for Responsive Web Design
 
Continuous Quality with Postman
Continuous Quality with PostmanContinuous Quality with Postman
Continuous Quality with Postman
 
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
 
Taking your version control to a next level with TFS and Git
Taking your version control to a next level with TFS and GitTaking your version control to a next level with TFS and Git
Taking your version control to a next level with TFS and Git
 

Destacado

2015 05-06-karsten gaebert-akademie-etrainings
2015 05-06-karsten gaebert-akademie-etrainings2015 05-06-karsten gaebert-akademie-etrainings
2015 05-06-karsten gaebert-akademie-etrainings
Haufe-Lexware GmbH & Co KG
 
Automate Your Software Development Life Cycle Using the Right Tools
Automate Your Software Development Life Cycle Using the Right ToolsAutomate Your Software Development Life Cycle Using the Right Tools
Automate Your Software Development Life Cycle Using the Right Tools
Info-Tech Research Group
 
Webservices testing using SoapUI
Webservices testing using SoapUIWebservices testing using SoapUI
Webservices testing using SoapUI
Testing World
 

Destacado (20)

Actor model: an approach to concurrency
Actor model: an approach to concurrencyActor model: an approach to concurrency
Actor model: an approach to concurrency
 
2015 05-06-karsten gaebert-akademie-etrainings
2015 05-06-karsten gaebert-akademie-etrainings2015 05-06-karsten gaebert-akademie-etrainings
2015 05-06-karsten gaebert-akademie-etrainings
 
BTEXX Creation: Projektarten, Leistungen, Angebote
BTEXX Creation: Projektarten, Leistungen, AngeboteBTEXX Creation: Projektarten, Leistungen, Angebote
BTEXX Creation: Projektarten, Leistungen, Angebote
 
Haufe's Tech Strategy In Practice
Haufe's Tech Strategy In PracticeHaufe's Tech Strategy In Practice
Haufe's Tech Strategy In Practice
 
Using Pattern Lab at SmashingConf Freiburg 2016
Using Pattern Lab at SmashingConf Freiburg 2016Using Pattern Lab at SmashingConf Freiburg 2016
Using Pattern Lab at SmashingConf Freiburg 2016
 
Do not automate GUI testing
Do not automate GUI testingDo not automate GUI testing
Do not automate GUI testing
 
DevOps Meetup Freiburg - DevOps in Practice
DevOps Meetup Freiburg - DevOps in PracticeDevOps Meetup Freiburg - DevOps in Practice
DevOps Meetup Freiburg - DevOps in Practice
 
Infra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automationInfra / Cont delivery - 3rd party automation
Infra / Cont delivery - 3rd party automation
 
API Management @ Haufe
API Management @ HaufeAPI Management @ Haufe
API Management @ Haufe
 
Achieving Continuous Delivery: An Automation Story
Achieving Continuous Delivery: An Automation StoryAchieving Continuous Delivery: An Automation Story
Achieving Continuous Delivery: An Automation Story
 
Automate Your Software Development Life Cycle Using the Right Tools
Automate Your Software Development Life Cycle Using the Right ToolsAutomate Your Software Development Life Cycle Using the Right Tools
Automate Your Software Development Life Cycle Using the Right Tools
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkins
 
Refactoring: Improving the design of existing code. Chapter 6.
Refactoring: Improving the design of existing code. Chapter 6.Refactoring: Improving the design of existing code. Chapter 6.
Refactoring: Improving the design of existing code. Chapter 6.
 
Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)
 
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
 
Continuos Delivery
Continuos DeliveryContinuos Delivery
Continuos Delivery
 
Webservices testing using SoapUI
Webservices testing using SoapUIWebservices testing using SoapUI
Webservices testing using SoapUI
 
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa ClaraAdobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
 

Similar a Automated Testing in DevOps

automation framework
automation frameworkautomation framework
automation framework
ANSHU GOYAL
 
Deepak_Resume_Automation
Deepak_Resume_AutomationDeepak_Resume_Automation
Deepak_Resume_Automation
Deepak Pandey
 

Similar a Automated Testing in DevOps (20)

Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
automation framework
automation frameworkautomation framework
automation framework
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
 
Automated Testing – Web, Mobile, Desktop - Challenges and Successes
Automated Testing – Web, Mobile, Desktop - Challenges and SuccessesAutomated Testing – Web, Mobile, Desktop - Challenges and Successes
Automated Testing – Web, Mobile, Desktop - Challenges and Successes
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Selenium
SeleniumSelenium
Selenium
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver Faster
 
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
 
Appmotives - Software Testing As Service
Appmotives - Software Testing As ServiceAppmotives - Software Testing As Service
Appmotives - Software Testing As Service
 
Cloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak KoyuncuCloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak Koyuncu
 
Deepak_Resume_Automation
Deepak_Resume_AutomationDeepak_Resume_Automation
Deepak_Resume_Automation
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Selenium – Web Browser Automation
Selenium – Web Browser AutomationSelenium – Web Browser Automation
Selenium – Web Browser Automation
 
Sampat Kumar Ch
Sampat Kumar ChSampat Kumar Ch
Sampat Kumar Ch
 
Dev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps worldDev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps world
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 

Más de Haufe-Lexware GmbH & Co KG

Más de Haufe-Lexware GmbH & Co KG (20)

Tech stackhaufegroup
Tech stackhaufegroupTech stackhaufegroup
Tech stackhaufegroup
 
X-celerate 2019: Iterating fast with the MERN Stack
X-celerate 2019: Iterating fast with the MERN StackX-celerate 2019: Iterating fast with the MERN Stack
X-celerate 2019: Iterating fast with the MERN Stack
 
Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019
 
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
 
Cloud Journey: Lifting a Major Product to Kubernetes
Cloud Journey: Lifting a Major Product to KubernetesCloud Journey: Lifting a Major Product to Kubernetes
Cloud Journey: Lifting a Major Product to Kubernetes
 
ONA ( organizational network analysis ) to enable individuals to impact their...
ONA ( organizational network analysis ) to enable individuals to impact their...ONA ( organizational network analysis ) to enable individuals to impact their...
ONA ( organizational network analysis ) to enable individuals to impact their...
 
ONA ( organizational network analysis ) enabling individuals to impact their ...
ONA ( organizational network analysis ) enabling individuals to impact their ...ONA ( organizational network analysis ) enabling individuals to impact their ...
ONA ( organizational network analysis ) enabling individuals to impact their ...
 
Using word vectors to enable better search in our legal products
Using word vectors to enable better search in our legal productsUsing word vectors to enable better search in our legal products
Using word vectors to enable better search in our legal products
 
Identifying customer potentials through unsupervised learning
Identifying customer potentials through unsupervised learningIdentifying customer potentials through unsupervised learning
Identifying customer potentials through unsupervised learning
 
Field report: Rapid application development
Field report: Rapid application developmentField report: Rapid application development
Field report: Rapid application development
 
Behavior-Driven Development with JGiven
Behavior-Driven Development with JGivenBehavior-Driven Development with JGiven
Behavior-Driven Development with JGiven
 
Externalized Spring Boot App Configuration
Externalized  Spring Boot App ConfigurationExternalized  Spring Boot App Configuration
Externalized Spring Boot App Configuration
 
Managing short lived Kubernetes (Production) deployments
Managing short lived Kubernetes (Production) deploymentsManaging short lived Kubernetes (Production) deployments
Managing short lived Kubernetes (Production) deployments
 
Docker in Production at the Aurora Team
Docker in Production at the Aurora TeamDocker in Production at the Aurora Team
Docker in Production at the Aurora Team
 
DevOps Journey of Foundational Services at Haufe
DevOps Journey of Foundational Services at HaufeDevOps Journey of Foundational Services at Haufe
DevOps Journey of Foundational Services at Haufe
 
New Serverless World - Cloud Native Apps
New Serverless World - Cloud Native AppsNew Serverless World - Cloud Native Apps
New Serverless World - Cloud Native Apps
 
Microservice Transformation of the Haufe Publishing System
Microservice Transformation of the Haufe Publishing SystemMicroservice Transformation of the Haufe Publishing System
Microservice Transformation of the Haufe Publishing System
 
Haufe API Strategy
Haufe API StrategyHaufe API Strategy
Haufe API Strategy
 
Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev
 
API Management with wicked.haufe.io
API Management with wicked.haufe.ioAPI Management with wicked.haufe.io
API Management with wicked.haufe.io
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Último (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 

Automated Testing in DevOps

  • 1. Automated Testing in Pipelines Integrating Tools and Concepts Layla Franke, Vlad Ilie, Alina Ionescu dev.haufe.com github.com/Haufe-Lexware @HaufeDev -Lexware
  • 2. Scope of this Talk • Coded UI for UI, Postman + Newman for API (LicenseManager – Layla) • Testing Framework for Web UI in Java with Selenium (Umantis – Vlad) • Framework in Java for API testing, Soap UI for API testing (Foundational Services – Alina)
  • 3. 1 LicenseManager - Layla Coded UI for UI, Postman + Newman for API
  • 4. License Manager • C# Web Application • Inhouse Tool for Management of Serial Numbers • Existing Continuous Delivery Pipeline in Go.CD
  • 5. GUI Tests Coded UI Tests in Visual Studio: • Recording via Internet Explorer and built-in recorder • Execution of tests from Commandline with MSTest • Playback of Tests in various browsers
  • 6. Build Pipeline Compile Deploy Application Coded UI Test Internet Explorer View Test Reports Do other stuff Pulish App QualityDev Coded UI Tests – Pipeline integration • Compile your code normally • Deploy you application on test machine • Start Coded UI Tests You can use MSTest.exe on Go Agents • Use parameterized URL and Browser Define environment variables in GoCD • Test Replay runs on Go Agent • Coded UI Tests Finished View HTML Test Reports and Coverage Report in Pipeline Coded UI Test Chrome Coded UI Test Firefox Go Agent Go Agent Go Agent
  • 7. Coded UI Test Reports - Overview
  • 8. Coded UI Test Report - Failed
  • 9. Coded UI Test Report - Passed
  • 10. Create REST API Tests using Postman Use Postman to create REST API Tests: • Export Tests as a „Postman Collection“ • Have a variable URL using a „ Postman Environment”
  • 11. Newman – Pipeline integration • Deploy application on App Server • Execute Newman Tests Newman is a command line tool used for automatic execution of tests created with Postman • View Test Results in Pipeline Build Pipeline Go Agent Newman Test QualityDev Pulish App App Server View Result Compile Deploy App to Server
  • 12. CD pipeline integration How to integrate in CD Pipeline? Visual Studio Coded UI Tests • Test DLL is created in Compile Job • Tests run after deployment on test environment in stage QualityDev • Tests for different browsers can be executed in parallel Newman REST API Tests • Can be executed after deployment on test environment
  • 13. 2 Umantis - Vlad Testing Framework for Web UI in Java with Selenium
  • 14. About Umantis • Web project (perl) • 3 applications (with stable and beta customers) • Bugfix release every 2 weeks • Feature release every 3 months • Prio1 releases
  • 15. Test Project Structure • Java project • Built using maven • Selenium web driver • Page Objects • testNG • Git/gerrit • Jenkins
  • 16. 1 LicenseManager - Layla Coded UI for UI, Postman + Newman for API
  • 17. 1 LicenseManager - Layla Coded UI for UI, Postman + Newman for API
  • 18. Page Objects • Keep UI elements private (don’t expose them to tests) • Expose user actions • Use data structures instead of multiple parameters public class JobApplicationExternalFormPage extends PageBase { @FindBy(id = "value_153712") WebElement dataReleaseRadioButtonGroup; .............................. @FindBy(id = "Button_1161113") private WebElement submitFinalApplicationButton; @FindBy(id = "Button_112465") private WebElement continueButton; @FindBy(id = "errorcollectionlabel_3606") private WebElement errorMessage; ............................. private void fillJobApplicationForm(User applicant) { UIActions.waitForElement(titleRadioButtonGroup); UIActions.setValue(new RadioButtonGroup(titleRadioButtonGroup), applicant.getTitleAsValue()); UIActions.setValue(firstNameEditBox, applicant.getFirstName()); ...................................................................... UIActions.setValue(letterOfApplication, applicant.getLetterPath()); UIActions.setValue(resume, applicant.getCvPath()); UIActions.setValue(document1, applicant.getDoc1Path()); try { UIActions.setValue(new RadioButtonGroup(dataReleaseRadioButtonGroup), RadioButtonValue.DATA_NOT_AGREE.getValue()); } catch (NoSuchElementException ignored) { } UIActions.click(iAgreeCheckBox); } .............................
  • 19. Page Objects - examples • PageBase.java • CreateNewEmployeePage.java • AddPartialEventPage
  • 20. UIActions • Static Class • Entry point for all ui actions • setValue() and checkValue() for different types of controls
  • 21. Test Execution • Jenkins – a job for each product and branch • Local – using intelliJ • On each commit (continuous integration) using gerrit and jenkins • Maven • Command line (can be used with any CI or CD tool): java –jar umantis_test.jar ...
  • 22. Test Environment • Selenium Grid using docker containers • Build test project container (based on maven image) • Test execution container (based on jdk image) • Selenium grid (based on hub and node selenium images)
  • 23. Test Results - overview
  • 24. Test Results – Detail • Test failure with history • Exception with stack trace • URL, screenshot and html where the failure occured
  • 25. License Manager • C# Web Application • Inhouse Tool for Management of Serial Numbers • Existing Continuous Delivery Pipeline in Go.CD
  • 26. What we started from: •Atlantic – the monolith 15 + clients…
  • 27. Splitting the testing: • 1. DEV Tests – Junit tests • 2. System Tests - Junit tests • 3. SOAP UI tests • 4. Security Tests • 5. Load Tests • 6. Rollout (Docker) tests • 7. UI Automated tests • 8. Exploratory (manual)
  • 28. The Testing Framework Junit Test Framework Atlantic Code Clients Helpers Tests SoapUI Tests DEV Unit Tests Security Tests Load Tests Rollout Docker Tests Atlantic Client Atlantic Client Atlantic Client HP ALM UI Tests Manual Tests
  • 30. Tests examples: @Test public void get_userWithUserId() { UserDto user1 = UserClient.createNewPendingActiveUser(); Map<String, String> queryParams = new HashMap(); queryParams.put("userid", user1.getUserID().toString()); com.haufe.atlantic.old.usermanagement.rest.dtos.UserDto result = RestUtilForOldResources.get(com.haufe.atlantic.old.usermanagement.rest.dtos.UserDto.class, headers, queryParams, PathsHelper.umPaths().users()); assertUserValues(user1, result, true);
  • 31. Where are they triggered from: • After deployment, from GoCD there are triggered 2 Docker compose files: • 1 with Maven for the Junit tests • 1 with SoapUI for the SoapUI tests They run in parallel.
  • 33. Things we learned • Achieve “good enough” coverage • Prioritize • Take/create shortcuts if you can • Bypass Logins if possible • Write small “straight to target” tests (no end-to-end anymore) • Use more code and API less UI • Communication is key to good collaboration
  • 35. GUI Tests Coded UI Tests in Visual Studio: • Recording via Internet Explorer and built-in recorder • Execution of tests from Commandline with MSTest • Playback of Tests in various browsers