SlideShare a Scribd company logo
1 of 21
Download to read offline
basistechnologies.com
A Basis Technologies white paperA Basis Technologies white paper
basistechnologies.com
Unit test automation:
The prerequisite for
continuous delivery in
SAP environments
basistechnologies.com
Digital changes everything
A seismic shift in the way companies operate and
engage with customers is occurring. It’s being driven by
a perfect storm of technological development. And it’s
changing everything.
In our previous e-book – 8 steps to daily SAP releases
– we saw that born digital companies are setting
the pace when it comes to updating their customer
engagement systems. And traditional companies
must transform themselves if they are to compete
successfully.
The same e-book also demonstrated how DevOps – a
software development and deployment methodology
that emphasizes collaboration, communication, mixed
discipline teams and, very importantly, automation
– can be successfully applied to SAP environments
where stability and availability have traditionally been
prized above everything else. As a result, organizations
can deliver frequent, safe SAP releases and level the
playing field with their born-digital competitors. Download ebook >
Testfirst,
codelaterfor
greateragility
andspeed
A Basis Technologies white paper
basistechnologies.com
The DevOps methodology is based on
three core components…
Continuous
integration
Continuous
delivery
Continuous
deployment
Continuous integration
automatically executes
tests every time the
software is changed in order
to verify its quality
Continuous delivery
automates the build
process that delivers
deployable software to
operations updates
Continuous deployment
automates the delivery of
new functionality to users
basistechnologies.com
basistechnologies.com
A Basis Technologies white paper
Automated unit testing is imperative for DevOps
Underpinning these components is automated testing, which is where significant
gains can be made both in terms of accelerating development and reducing costs.
And these gains not only apply to companies that are using DevOps, they are equally
applicable to organizations using more traditional methods.
Automating testing ensures quality delivery at speed. Manual testing never
did keep up with the pace of delivery, and the problem gets worse when
delivery speed increases. Automated testing, built into the CI process and
driven principally off APIs, gives developers the fast feedback they need
to improve quality. By the time the application is deployed it is thoroughly
tested, making release decisions simple.”
Kurt Bittner, Forrester
“ Source: Forget Two-Speed IT; DevOps
Enables Faster Delivery Across The Board
Vision: The Modern Application Delivery
Playbook by Kurt Bittner, Forrester,
November 6, 2015.
basistechnologies.com
A Basis Technologies white paper
The importance of testing
For many years it has been known that the true cost (and time) of fixing software defects increases
exponentially as a project progresses. For example, a defect discovered once software is put into production is
reckoned to cost one hundred times more to fix than one discovered in the development phase.
It is also true that integration testing and end-to-end testing carried out in the quality assurance (QA) phase of
a project is more time-consuming and expensive than testing during the development process.
Hence adequate unit testing must be carried out before anything is submitted to QA, to ensure that
software changes operate properly and without errors. The goal is to identify problems and bugs early in the
development lifecycle, but the process of unit testing can be very time consuming, not to mention tedious.
The answer? Automation. Automated unit testing not only saves time, it also ensures that
effects on other parts of the application are revealed and can be fully checked.
time
cost $
basistechnologies.com
A Basis Technologies white paper
Shifting testing as far left as possible not only reduces costs massively, it accelerates
development significantly. The message is clear: whether or not organizations are
following a DevOps methodology, automated unit testing allows them to deliver
quality code faster and more frequently. In fact, in a true DevOps process automated
unit tests are a prerequisite for continuous integration.
In their quest to maximise speed and agility, many organizations have even gone
one step further with the adoption of test-driven development, which encourages
simpler designs and better overall code.
Shift left
cost $
time
A Basis Technologies white paper
basistechnologies.com
There are some key principles that need to be considered when writing unit tests, in order to
deliver a successful outcome.
	 Independence – when multiple instances of the same test are run in parallel they should
deliver the same results. To make sure that one failing unit test doesn’t affect others, you
must make sure that each can be run independently. The power of unit tests is that they will
clearly indicate the source of any errors and even tell you how to fix them.
	Consistency – a test should deliver the same results when it is re-run (all other things being
equal). Results should not depend on the environment or external data.
	 A single unit of work – it’s important to test small parts of code that have distinct
functions. The narrower the test scope, the easier it will be to identify and resolve issues.
Unit testing
and test-driven
development go
hand-in-hand
A Basis Technologies white paper
basistechnologies.com
	 A single unit of work – it’s important to test small parts of code that have distinct
functions. The narrower the test scope, the easier it will be to identify and resolve
issues.
	Good code coverage – the test needs to ensure that all the code is executed,
including exceptions.
	 Run fast – if the test fails the developer needs to know quickly so that it can be fixed
or backed out of a release.
Test-driven development goes hand-in-hand with unit testing, and in doing so turns
the typical development process on its head. It’s a robust way of designing software
components, or units, interactively so that their behaviour is specified through unit tests.
Unit testing
and test-driven
development go
hand-in-hand
basistechnologies.com
A Basis Technologies white paper
Unit testing is the plankton of SAP
change – without it everything
else falls apart”
Darren Thorpe, Chief Technology Officer, Basis Technologies
“
basistechnologies.com
basistechnologies.com
A Basis Technologies white paper
Before any code is written a unit test must be defined.
Crucially, in order to do this the a developer must
clearly understand any new features, specifications and
requirements.
Once the unit test has been created, existing code is run
against it. The test should fail because the new application
code hasn’t been written yet.
The aim at this stage is to simply write the minimum code
required to pass the unit test, and no more. When this has
been achieved, the new code is run against the new test and
all previous tests. The goal is to ensure that not only does
the code pass the new test, but that it also doesn’t adversely
impact any existing features.
If all tests are passed the project moves to the final stage –
peer review – before all tests are run again. Only when this has
been completed is the code passed to quality assurance or
pre-production.
peer
review
quality
control
write
unit testbrief
write
code
FAIL
PASSrun
unit test
basistechnologies.com
A Basis Technologies white paper
Based on SOLID programming
Many organizations struggle to implement automated unit testing and test-driven development
effectively. This is often because the traditional design and development processes they use
don’t deliver the required outcomes.
An object-oriented methodology will ensure that applications are easier to maintain and extend
over time but there are some key concepts that need to be considered when adopting this type
of approach.
In our experience at Basis Technologies, successful unit testing and test-driven development
programmes are based on the five core principles of SOLID. In particular, principles 1 and 5 –
Segregation of Responsibility and Dependency Injection – are crucially important
S O L I DSegregationof
Responsibility
Open
Closed
Principle
Liskov
Substitution
Principle
Interface
Segregation
Dependency
Injection
basistechnologies.com
A Basis Technologies white paper
Segregation of
Responsibility
The new code being
developed should only
do one thing
	
Open Closed
Principle
Classes should be
open for extension
and closed for
modification. Instead
of modifying a class
that does not quite
fit the needs, a new
class that inherits the
features of the original
class and adds new
features should be
declared
Liskov Substitution
Principle
Derived classes
must be completely
substitutable for their
base classes. Although
base class functionality
can be overridden it
should only be done
with great care, as it
can create confusion
Interface
Segregation
Classes should not
be forced to rely on
interfaces that they
don’t need. The fact
is that it’s better to
have many specific
interfaces than it is
to have one large
interface.
Dependency
Injection
A strategy for
decoupling software
and simplifying unit
tests. Creating mock
dependencies that
mimic the behavior
of real objects in
controlled ways
enables all the external
dependencies of a
software unit under
test to be controlled.
core principles
of SOLID
51 2 3 4 5
basistechnologies.com
A Basis Technologies white paper
basistechnologies.com
steps to a successful
culture shift
The concepts can be difficult for programmers steeped in traditional software creation
techniques to assimilate, as they apparently turn the whole process on its head. Yet getting
developer buy-in is essential to making automated unit testing and test-driven development
work, and benefitting from the resultant gains. Consequently, it is essential to put a robust
change management programme in place.
Following these five steps will ensure a smooth transition…
5
! !
!
!
!
! !
basistechnologies.com
A Basis Technologies white paper
basistechnologies.com
Once developers are trained, particularly in the principles of
SOLID, and start to see how effective the process is, they
will become advocates and win over their less enthusiastic
colleagues. In our experience, once programmers start using
these concepts they become more committed and have a
greater sense of ownership about the code they create. Their
work becomes more enjoyable and provides greater value.
Enlist volunteers
1
basistechnologies.com
A Basis Technologies white paper
Create a sense
of urgency
! !
!
!
!
! !
Start to request and implement
changes to functionality on a more
frequent basis rather than storing
everything up for major releases.
Make a decision that the next new
development or project will be done
with automated unit testing from the
start and ensure that nothing leaves
development unless this is done.
2
basistechnologies.com
basistechnologies.com
A Basis Technologies white paper
Investigate tools
like ABAP Unit
This is available as a standard SAP tool, allowing
unit tests to be built and executed for ABAP
code. When using the techniques described
in this document (particularly object-oriented
principles like SOLID) the unit testing of classes
will become much simpler. There are several
resources available to show how this is done - the
following is useful, for example: http://zevolving.
com/category/abapobjects/abap-unit-test/
3
basistechnologies.com
basistechnologies.com
A Basis Technologies white paper
Establish an environment in which people
can make mistakes without fear of criticism.
This is a major change and it will take time for
developers to adapt to the new techniques and
tools. Introducing peer reviews of code and
unit tests will help to share knowledge and get
people up to speed.
Establish the right
environment
4
basistechnologies.com
basistechnologies.com
A Basis Technologies white paper
Point out the career-enhancing benefits and the
positive effect on employees’ CVs. As the pace
of digitalization hots up, and SAP reinvents its
software portfolio for the digital economy, the
requirement for fast, accurate releases will only
increase. As a result, developers that have the
necessary skills to support agile development will
be in great demand.
Point out the career-
enhancing benefits
5
basistechnologies.com
A Basis Technologies white paper
basistechnologies.com
Delivering faster doesn’t require
organizations to cut quality corners or drive
people to unsustainable overwork. It does
require ADD leaders to fundamentally
change the way their teams organize, staff,
collaborate, and automate. Delivering
software applications faster, yet with higher
quality, requires more than simply doing
the same things faster; it requires nothing
short of complete reinvention.”
Kurt Bittner, Forrester
“
Source: Forget Two-Speed IT; DevOps Enables Faster Delivery Across The
Board Vision: The Modern Application Delivery Playbook by Kurt Bittner,
Forrester, November 6, 2015.
A Basis Technologies white paper
The real benefit of faster application delivery
is being able to try new ideas faster, to gather
customer and user feedback faster, and to be
able to act on that feedback faster. Doing so
improves business performance by attracting
new customers and retaining the ones you
already have.”
Kurt Bittner, Forresterr
“
Source: Forget Two-Speed IT; DevOps Enables Faster Delivery Across The
Board Vision: The Modern Application Delivery Playbook by Kurt Bittner,
Forrester, November 6, 2015.
basistechnologies.com
basistechnologies.com
A Basis Technologies white paper
Automated unit testing and test-driven development offer organizations the opportunity to shift-left quality
control and address defect fixes at the development stage. Whether combined with a DevOps approach or more
traditional project methodologies, it enables organizations to dramatically reduce the cost of software defects,
accelerate the development of code, and deliver new functionality faster.
But that’s not all. Though this kind of cultural shift may require significant amounts of persuasion and effort
up-front, the positive impact is not only seen during the development of new features. IT organizations
typically spend 70-80% of their budget on ‘keeping the lights on’, and improving existing products and services.
Integration of automated unit testing into the development process ensures that future maintenance will become
cheaper, less time consuming and a lot less risky. That means scarce IT resources can be allocated to work that
can deliver more value, more quickly.
As a result, companies can adapt their systems of engagement faster to take advantage of changing consumer
expectations, new technology-driven opportunities, and dynamic market, economic, and business conditions.
Unit testing…
increases product quality
increases agility
improves digital transformation
A Basis Technologies white paper
©BasisTechnologiesInternational
Ltd.,2015.Allrightsreserved.This
documentisnon-contractual.
eoe.5513_Unit_Testing_0116
Canada
+1 703 476 4565
Germany
+49 30 300 11 4606
USA
+1 703 476 4565
UK
+44 20 7958 9025
In the digital economy, agility is fundamental. We focus on continuous
delivery – helping our customers align IT closer to the business.
At Basis Technologies we create automation tools that allow companies
to deliver enterprise application changes at the speed of business. By
harnessing the agility of our DevOps suite, thousands of IT professionals
worldwide are able to deliver high-quality SAP releases at pace capitalizing
on their current infrastructure and remaining relevant to future business
strategy. The results produce faster time-to-market, longer production
uptime, and lower operational costs.
Email	 info@basistechnologies.com	
Follow	
Discover how we can
help you can move to a
test-driven development
environment 
basistechnologies.com

More Related Content

Recently uploaded

Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 

Recently uploaded (20)

Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

A step towards Agile Delivery and DevOps in SAP - Unit Test Automation

  • 1. basistechnologies.com A Basis Technologies white paperA Basis Technologies white paper basistechnologies.com Unit test automation: The prerequisite for continuous delivery in SAP environments basistechnologies.com Digital changes everything A seismic shift in the way companies operate and engage with customers is occurring. It’s being driven by a perfect storm of technological development. And it’s changing everything. In our previous e-book – 8 steps to daily SAP releases – we saw that born digital companies are setting the pace when it comes to updating their customer engagement systems. And traditional companies must transform themselves if they are to compete successfully. The same e-book also demonstrated how DevOps – a software development and deployment methodology that emphasizes collaboration, communication, mixed discipline teams and, very importantly, automation – can be successfully applied to SAP environments where stability and availability have traditionally been prized above everything else. As a result, organizations can deliver frequent, safe SAP releases and level the playing field with their born-digital competitors. Download ebook > Testfirst, codelaterfor greateragility andspeed
  • 2. A Basis Technologies white paper basistechnologies.com The DevOps methodology is based on three core components… Continuous integration Continuous delivery Continuous deployment Continuous integration automatically executes tests every time the software is changed in order to verify its quality Continuous delivery automates the build process that delivers deployable software to operations updates Continuous deployment automates the delivery of new functionality to users basistechnologies.com
  • 3. basistechnologies.com A Basis Technologies white paper Automated unit testing is imperative for DevOps Underpinning these components is automated testing, which is where significant gains can be made both in terms of accelerating development and reducing costs. And these gains not only apply to companies that are using DevOps, they are equally applicable to organizations using more traditional methods. Automating testing ensures quality delivery at speed. Manual testing never did keep up with the pace of delivery, and the problem gets worse when delivery speed increases. Automated testing, built into the CI process and driven principally off APIs, gives developers the fast feedback they need to improve quality. By the time the application is deployed it is thoroughly tested, making release decisions simple.” Kurt Bittner, Forrester “ Source: Forget Two-Speed IT; DevOps Enables Faster Delivery Across The Board Vision: The Modern Application Delivery Playbook by Kurt Bittner, Forrester, November 6, 2015.
  • 4. basistechnologies.com A Basis Technologies white paper The importance of testing For many years it has been known that the true cost (and time) of fixing software defects increases exponentially as a project progresses. For example, a defect discovered once software is put into production is reckoned to cost one hundred times more to fix than one discovered in the development phase. It is also true that integration testing and end-to-end testing carried out in the quality assurance (QA) phase of a project is more time-consuming and expensive than testing during the development process. Hence adequate unit testing must be carried out before anything is submitted to QA, to ensure that software changes operate properly and without errors. The goal is to identify problems and bugs early in the development lifecycle, but the process of unit testing can be very time consuming, not to mention tedious. The answer? Automation. Automated unit testing not only saves time, it also ensures that effects on other parts of the application are revealed and can be fully checked. time cost $
  • 5. basistechnologies.com A Basis Technologies white paper Shifting testing as far left as possible not only reduces costs massively, it accelerates development significantly. The message is clear: whether or not organizations are following a DevOps methodology, automated unit testing allows them to deliver quality code faster and more frequently. In fact, in a true DevOps process automated unit tests are a prerequisite for continuous integration. In their quest to maximise speed and agility, many organizations have even gone one step further with the adoption of test-driven development, which encourages simpler designs and better overall code. Shift left cost $ time
  • 6. A Basis Technologies white paper basistechnologies.com There are some key principles that need to be considered when writing unit tests, in order to deliver a successful outcome. Independence – when multiple instances of the same test are run in parallel they should deliver the same results. To make sure that one failing unit test doesn’t affect others, you must make sure that each can be run independently. The power of unit tests is that they will clearly indicate the source of any errors and even tell you how to fix them. Consistency – a test should deliver the same results when it is re-run (all other things being equal). Results should not depend on the environment or external data. A single unit of work – it’s important to test small parts of code that have distinct functions. The narrower the test scope, the easier it will be to identify and resolve issues. Unit testing and test-driven development go hand-in-hand
  • 7. A Basis Technologies white paper basistechnologies.com A single unit of work – it’s important to test small parts of code that have distinct functions. The narrower the test scope, the easier it will be to identify and resolve issues. Good code coverage – the test needs to ensure that all the code is executed, including exceptions. Run fast – if the test fails the developer needs to know quickly so that it can be fixed or backed out of a release. Test-driven development goes hand-in-hand with unit testing, and in doing so turns the typical development process on its head. It’s a robust way of designing software components, or units, interactively so that their behaviour is specified through unit tests. Unit testing and test-driven development go hand-in-hand
  • 8. basistechnologies.com A Basis Technologies white paper Unit testing is the plankton of SAP change – without it everything else falls apart” Darren Thorpe, Chief Technology Officer, Basis Technologies “ basistechnologies.com
  • 9. basistechnologies.com A Basis Technologies white paper Before any code is written a unit test must be defined. Crucially, in order to do this the a developer must clearly understand any new features, specifications and requirements. Once the unit test has been created, existing code is run against it. The test should fail because the new application code hasn’t been written yet. The aim at this stage is to simply write the minimum code required to pass the unit test, and no more. When this has been achieved, the new code is run against the new test and all previous tests. The goal is to ensure that not only does the code pass the new test, but that it also doesn’t adversely impact any existing features. If all tests are passed the project moves to the final stage – peer review – before all tests are run again. Only when this has been completed is the code passed to quality assurance or pre-production. peer review quality control write unit testbrief write code FAIL PASSrun unit test
  • 10. basistechnologies.com A Basis Technologies white paper Based on SOLID programming Many organizations struggle to implement automated unit testing and test-driven development effectively. This is often because the traditional design and development processes they use don’t deliver the required outcomes. An object-oriented methodology will ensure that applications are easier to maintain and extend over time but there are some key concepts that need to be considered when adopting this type of approach. In our experience at Basis Technologies, successful unit testing and test-driven development programmes are based on the five core principles of SOLID. In particular, principles 1 and 5 – Segregation of Responsibility and Dependency Injection – are crucially important S O L I DSegregationof Responsibility Open Closed Principle Liskov Substitution Principle Interface Segregation Dependency Injection
  • 11. basistechnologies.com A Basis Technologies white paper Segregation of Responsibility The new code being developed should only do one thing Open Closed Principle Classes should be open for extension and closed for modification. Instead of modifying a class that does not quite fit the needs, a new class that inherits the features of the original class and adds new features should be declared Liskov Substitution Principle Derived classes must be completely substitutable for their base classes. Although base class functionality can be overridden it should only be done with great care, as it can create confusion Interface Segregation Classes should not be forced to rely on interfaces that they don’t need. The fact is that it’s better to have many specific interfaces than it is to have one large interface. Dependency Injection A strategy for decoupling software and simplifying unit tests. Creating mock dependencies that mimic the behavior of real objects in controlled ways enables all the external dependencies of a software unit under test to be controlled. core principles of SOLID 51 2 3 4 5
  • 12. basistechnologies.com A Basis Technologies white paper basistechnologies.com steps to a successful culture shift The concepts can be difficult for programmers steeped in traditional software creation techniques to assimilate, as they apparently turn the whole process on its head. Yet getting developer buy-in is essential to making automated unit testing and test-driven development work, and benefitting from the resultant gains. Consequently, it is essential to put a robust change management programme in place. Following these five steps will ensure a smooth transition… 5 ! ! ! ! ! ! !
  • 13. basistechnologies.com A Basis Technologies white paper basistechnologies.com Once developers are trained, particularly in the principles of SOLID, and start to see how effective the process is, they will become advocates and win over their less enthusiastic colleagues. In our experience, once programmers start using these concepts they become more committed and have a greater sense of ownership about the code they create. Their work becomes more enjoyable and provides greater value. Enlist volunteers 1
  • 14. basistechnologies.com A Basis Technologies white paper Create a sense of urgency ! ! ! ! ! ! ! Start to request and implement changes to functionality on a more frequent basis rather than storing everything up for major releases. Make a decision that the next new development or project will be done with automated unit testing from the start and ensure that nothing leaves development unless this is done. 2 basistechnologies.com
  • 15. basistechnologies.com A Basis Technologies white paper Investigate tools like ABAP Unit This is available as a standard SAP tool, allowing unit tests to be built and executed for ABAP code. When using the techniques described in this document (particularly object-oriented principles like SOLID) the unit testing of classes will become much simpler. There are several resources available to show how this is done - the following is useful, for example: http://zevolving. com/category/abapobjects/abap-unit-test/ 3 basistechnologies.com
  • 16. basistechnologies.com A Basis Technologies white paper Establish an environment in which people can make mistakes without fear of criticism. This is a major change and it will take time for developers to adapt to the new techniques and tools. Introducing peer reviews of code and unit tests will help to share knowledge and get people up to speed. Establish the right environment 4 basistechnologies.com
  • 17. basistechnologies.com A Basis Technologies white paper Point out the career-enhancing benefits and the positive effect on employees’ CVs. As the pace of digitalization hots up, and SAP reinvents its software portfolio for the digital economy, the requirement for fast, accurate releases will only increase. As a result, developers that have the necessary skills to support agile development will be in great demand. Point out the career- enhancing benefits 5 basistechnologies.com
  • 18. A Basis Technologies white paper basistechnologies.com Delivering faster doesn’t require organizations to cut quality corners or drive people to unsustainable overwork. It does require ADD leaders to fundamentally change the way their teams organize, staff, collaborate, and automate. Delivering software applications faster, yet with higher quality, requires more than simply doing the same things faster; it requires nothing short of complete reinvention.” Kurt Bittner, Forrester “ Source: Forget Two-Speed IT; DevOps Enables Faster Delivery Across The Board Vision: The Modern Application Delivery Playbook by Kurt Bittner, Forrester, November 6, 2015.
  • 19. A Basis Technologies white paper The real benefit of faster application delivery is being able to try new ideas faster, to gather customer and user feedback faster, and to be able to act on that feedback faster. Doing so improves business performance by attracting new customers and retaining the ones you already have.” Kurt Bittner, Forresterr “ Source: Forget Two-Speed IT; DevOps Enables Faster Delivery Across The Board Vision: The Modern Application Delivery Playbook by Kurt Bittner, Forrester, November 6, 2015. basistechnologies.com
  • 20. basistechnologies.com A Basis Technologies white paper Automated unit testing and test-driven development offer organizations the opportunity to shift-left quality control and address defect fixes at the development stage. Whether combined with a DevOps approach or more traditional project methodologies, it enables organizations to dramatically reduce the cost of software defects, accelerate the development of code, and deliver new functionality faster. But that’s not all. Though this kind of cultural shift may require significant amounts of persuasion and effort up-front, the positive impact is not only seen during the development of new features. IT organizations typically spend 70-80% of their budget on ‘keeping the lights on’, and improving existing products and services. Integration of automated unit testing into the development process ensures that future maintenance will become cheaper, less time consuming and a lot less risky. That means scarce IT resources can be allocated to work that can deliver more value, more quickly. As a result, companies can adapt their systems of engagement faster to take advantage of changing consumer expectations, new technology-driven opportunities, and dynamic market, economic, and business conditions. Unit testing… increases product quality increases agility improves digital transformation
  • 21. A Basis Technologies white paper ©BasisTechnologiesInternational Ltd.,2015.Allrightsreserved.This documentisnon-contractual. eoe.5513_Unit_Testing_0116 Canada +1 703 476 4565 Germany +49 30 300 11 4606 USA +1 703 476 4565 UK +44 20 7958 9025 In the digital economy, agility is fundamental. We focus on continuous delivery – helping our customers align IT closer to the business. At Basis Technologies we create automation tools that allow companies to deliver enterprise application changes at the speed of business. By harnessing the agility of our DevOps suite, thousands of IT professionals worldwide are able to deliver high-quality SAP releases at pace capitalizing on their current infrastructure and remaining relevant to future business strategy. The results produce faster time-to-market, longer production uptime, and lower operational costs. Email info@basistechnologies.com Follow Discover how we can help you can move to a test-driven development environment basistechnologies.com