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

More Related Content

What's hot (20)

PDF
Design & Prototype an API
Postman
 
PDF
Serverless Delivery
Casey Lee
 
PDF
Continuous Delivery for Front-End Engineers
Sergey Bolshchikov
 
PPTX
Ice breaker with dev ops
Mukta Aphale
 
PDF
Using Postman to Automate API On-Boarding
Postman
 
PPTX
Developing Infrastructure Code for CI & CD
Ravikanth Chaganti
 
PPTX
Top10 Characteristics of Awesome Apps
Casey Lee
 
PPTX
Operations Validation for Infrastructure As Code - PSConfEU 2016
Ravikanth Chaganti
 
PDF
Using Docker for Testing
Mukta Aphale
 
PPTX
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Danylo Kuvshynov
 
PPTX
Continuous Testing using Shippable and Docker
Mukta Aphale
 
KEY
Make It Cooler: Using Decentralized Version Control
indiver
 
PPTX
Api360 Summit The Automated Monolith
Haufe-Lexware GmbH & Co KG
 
PDF
Continuous delivery of your legacy application
ColdFusionConference
 
PPTX
Alm with tfs 2013
MSDEVMTL
 
PDF
DevOps: Find Solutions, Not More Defects
TechWell
 
PDF
Automation Testing Approach for Responsive Web Design
Agile Testing Alliance
 
PDF
Continuous Quality with Postman
Postman
 
PPTX
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
Gene Kim
 
PPTX
Taking your version control to a next level with TFS and Git
Alexander Vanwynsberghe
 
Design & Prototype an API
Postman
 
Serverless Delivery
Casey Lee
 
Continuous Delivery for Front-End Engineers
Sergey Bolshchikov
 
Ice breaker with dev ops
Mukta Aphale
 
Using Postman to Automate API On-Boarding
Postman
 
Developing Infrastructure Code for CI & CD
Ravikanth Chaganti
 
Top10 Characteristics of Awesome Apps
Casey Lee
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Ravikanth Chaganti
 
Using Docker for Testing
Mukta Aphale
 
Speed up your regression and reduce cost load with Selenoid + K8s + ReportPortal
Danylo Kuvshynov
 
Continuous Testing using Shippable and Docker
Mukta Aphale
 
Make It Cooler: Using Decentralized Version Control
indiver
 
Api360 Summit The Automated Monolith
Haufe-Lexware GmbH & Co KG
 
Continuous delivery of your legacy application
ColdFusionConference
 
Alm with tfs 2013
MSDEVMTL
 
DevOps: Find Solutions, Not More Defects
TechWell
 
Automation Testing Approach for Responsive Web Design
Agile Testing Alliance
 
Continuous Quality with Postman
Postman
 
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
Gene Kim
 
Taking your version control to a next level with TFS and Git
Alexander Vanwynsberghe
 

Viewers also liked (20)

PDF
Actor model: an approach to concurrency
Haufe-Lexware GmbH & Co KG
 
PPTX
2015 05-06-karsten gaebert-akademie-etrainings
Haufe-Lexware GmbH & Co KG
 
PDF
BTEXX Creation: Projektarten, Leistungen, Angebote
BTEXX GmbH
 
PPTX
Haufe's Tech Strategy In Practice
Haufe-Lexware GmbH & Co KG
 
PDF
Using Pattern Lab at SmashingConf Freiburg 2016
Haufe-Lexware GmbH & Co KG
 
PPTX
Do not automate GUI testing
Atila Inovecký
 
PPT
DevOps Meetup Freiburg - DevOps in Practice
Haufe-Lexware GmbH & Co KG
 
PPTX
Infra / Cont delivery - 3rd party automation
Shay Cohen
 
PDF
API Management @ Haufe
Haufe-Lexware GmbH & Co KG
 
PDF
Achieving Continuous Delivery: An Automation Story
jimi-c
 
PPTX
Automate Your Software Development Life Cycle Using the Right Tools
Info-Tech Research Group
 
PDF
Postman tests in jenkins
Alex Galkin
 
PPTX
Refactoring: Improving the design of existing code. Chapter 6.
Andrés Callejas González
 
PPT
Test Automation Best Practices (with SOA test approach)
Leonard Fingerman
 
PPTX
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
Serena Software
 
PPTX
REST API testing with SpecFlow
Aiste Stikliute
 
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
PPTX
Continuos Delivery
Andrés Callejas González
 
PPT
Webservices testing using SoapUI
Testing World
 
PDF
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
dev2ops
 
Actor model: an approach to concurrency
Haufe-Lexware GmbH & Co KG
 
2015 05-06-karsten gaebert-akademie-etrainings
Haufe-Lexware GmbH & Co KG
 
BTEXX Creation: Projektarten, Leistungen, Angebote
BTEXX GmbH
 
Haufe's Tech Strategy In Practice
Haufe-Lexware GmbH & Co KG
 
Using Pattern Lab at SmashingConf Freiburg 2016
Haufe-Lexware GmbH & Co KG
 
Do not automate GUI testing
Atila Inovecký
 
DevOps Meetup Freiburg - DevOps in Practice
Haufe-Lexware GmbH & Co KG
 
Infra / Cont delivery - 3rd party automation
Shay Cohen
 
API Management @ Haufe
Haufe-Lexware GmbH & Co KG
 
Achieving Continuous Delivery: An Automation Story
jimi-c
 
Automate Your Software Development Life Cycle Using the Right Tools
Info-Tech Research Group
 
Postman tests in jenkins
Alex Galkin
 
Refactoring: Improving the design of existing code. Chapter 6.
Andrés Callejas González
 
Test Automation Best Practices (with SOA test approach)
Leonard Fingerman
 
Continuous Delivery: Integrating the Deployment Pipeline Toolchain Through Au...
Serena Software
 
REST API testing with SpecFlow
Aiste Stikliute
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Slawa Giterman
 
Continuos Delivery
Andrés Callejas González
 
Webservices testing using SoapUI
Testing World
 
Adobe Presents Internal Service Delivery Platform at Velocity 13 Santa Clara
dev2ops
 
Ad

Similar to Automated Testing in DevOps (20)

PPTX
Real Testing Scenario Strategy Practical TestOps Presentation
Adam Sandman
 
PPTX
Automate test, tools, advantages, and disadvantages
Majid Hosseini
 
PPTX
Diving into the World of Test Automation The Approach and the Technologies
QASymphony
 
PDF
Automated acceptance test
Bryan Liu
 
PPTX
Testing basics for developers
Anton Udovychenko
 
DOCX
Diversified AT Framework - Initial Version
Yu Tao Zhang
 
PPTX
Real Testing Scenario Strategy - Bringing It All Together For Success
Adam Sandman
 
PPT
Brightcove presentation on Automated Testing
MassTLC
 
PDF
World-Class Testing Development Pipeline for Android
Pedro Vicente Gómez Sánchez
 
PPTX
Automation testing
Tomy Rhymond
 
PDF
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Kevin Brockhoff
 
PDF
Testing Ajax, Mobile Apps the Agile Way
Clever Moe
 
PPTX
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
hemasubbu08
 
PPTX
AUTOMATION TESTING tools extensive application
ssuser94400e
 
PPTX
2014 Joker - Integration Testing from the Trenches
Nicolas Fränkel
 
PPTX
RESTful API Testing using Postman, Newman, and Jenkins
QASymphony
 
PDF
Automated testing
Aiste Stikliute
 
PDF
Integration testing - A&BP CC
JWORKS powered by Ordina
 
PPT
Automated Testing Of Web Applications Using XML
diongillard
 
PPTX
Neev QA Offering
Neev Technologies
 
Real Testing Scenario Strategy Practical TestOps Presentation
Adam Sandman
 
Automate test, tools, advantages, and disadvantages
Majid Hosseini
 
Diving into the World of Test Automation The Approach and the Technologies
QASymphony
 
Automated acceptance test
Bryan Liu
 
Testing basics for developers
Anton Udovychenko
 
Diversified AT Framework - Initial Version
Yu Tao Zhang
 
Real Testing Scenario Strategy - Bringing It All Together For Success
Adam Sandman
 
Brightcove presentation on Automated Testing
MassTLC
 
World-Class Testing Development Pipeline for Android
Pedro Vicente Gómez Sánchez
 
Automation testing
Tomy Rhymond
 
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
Kevin Brockhoff
 
Testing Ajax, Mobile Apps the Agile Way
Clever Moe
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
hemasubbu08
 
AUTOMATION TESTING tools extensive application
ssuser94400e
 
2014 Joker - Integration Testing from the Trenches
Nicolas Fränkel
 
RESTful API Testing using Postman, Newman, and Jenkins
QASymphony
 
Automated testing
Aiste Stikliute
 
Integration testing - A&BP CC
JWORKS powered by Ordina
 
Automated Testing Of Web Applications Using XML
diongillard
 
Neev QA Offering
Neev Technologies
 
Ad

More from Haufe-Lexware GmbH & Co KG (20)

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

Recently uploaded (20)

PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 

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