SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
basistechnologies.com
A Basis Technologies white paperA Basis Technologies white paper
basistechnologies.com
Unit Test Automation
A step towards Agile delivery
and DevOps in SAP
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 Agile development or 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 continuous
integration 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
time
cost $
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
	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
Automated unit testing is the plankton
of change in DevOps - 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
assurance
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 discussed here 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 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
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 especially 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/
2
basistechnologies.com
basistechnologies.com
A Basis Technologies white paper
Create a sense
of urgency
! !
!
!
!
! !
Start to request and implement
functional changes on a more
frequent basis, rather than storing
everything up for major releases.
Make a decision that automated
unit testing will be implemented
from the very  start of the next new
development or project, and ensure
that nothing leaves development
unless unit testing has been
successfully carried out.
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 even
Agile and 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

Contenu connexe

Plus de Basis Technologies

Basis Technologies DevOps and Testing Platform for SAP
Basis Technologies DevOps and Testing Platform for SAP Basis Technologies DevOps and Testing Platform for SAP
Basis Technologies DevOps and Testing Platform for SAP Basis Technologies
 
DevOps Deep Dive Webinar: Building a business case for agile and devops
DevOps Deep Dive Webinar: Building a business case for agile and devopsDevOps Deep Dive Webinar: Building a business case for agile and devops
DevOps Deep Dive Webinar: Building a business case for agile and devopsBasis Technologies
 
8 steps to daily SAP releases
8 steps to daily SAP releases 8 steps to daily SAP releases
8 steps to daily SAP releases Basis Technologies
 
BDEx - The must have tool for Utilities running SAP CR&B
BDEx - The must have tool for Utilities running SAP CR&BBDEx - The must have tool for Utilities running SAP CR&B
BDEx - The must have tool for Utilities running SAP CR&BBasis Technologies
 
Transport expresso-combined-feature-sheets
Transport expresso-combined-feature-sheetsTransport expresso-combined-feature-sheets
Transport expresso-combined-feature-sheetsBasis Technologies
 
RS Components reduce downtime and enable aggressive SAP rollout strategy to s...
RS Components reduce downtime and enable aggressive SAP rollout strategy to s...RS Components reduce downtime and enable aggressive SAP rollout strategy to s...
RS Components reduce downtime and enable aggressive SAP rollout strategy to s...Basis Technologies
 
7 fatal assumptions about SAP agility
7 fatal assumptions about SAP agility7 fatal assumptions about SAP agility
7 fatal assumptions about SAP agilityBasis Technologies
 
The 7 circles of SAP project delivery hell - Why system changes are slow, clu...
The 7 circles of SAP project delivery hell - Why system changes are slow, clu...The 7 circles of SAP project delivery hell - Why system changes are slow, clu...
The 7 circles of SAP project delivery hell - Why system changes are slow, clu...Basis Technologies
 
How CBH Group delivers SAP change that keeps pace with business demands
How CBH Group delivers SAP change that keeps pace with business demandsHow CBH Group delivers SAP change that keeps pace with business demands
How CBH Group delivers SAP change that keeps pace with business demandsBasis Technologies
 
Using the 5 WHYs to determine why your SAP Major Incident really happened
Using the 5 WHYs to determine why your SAP Major Incident really happenedUsing the 5 WHYs to determine why your SAP Major Incident really happened
Using the 5 WHYs to determine why your SAP Major Incident really happenedBasis Technologies
 
Play Tetris in your SAP system
Play Tetris in your SAP systemPlay Tetris in your SAP system
Play Tetris in your SAP systemBasis Technologies
 
6 Kick-Ass Tips to Improve SAP Performance
6 Kick-Ass Tips to Improve SAP Performance6 Kick-Ass Tips to Improve SAP Performance
6 Kick-Ass Tips to Improve SAP PerformanceBasis Technologies
 

Plus de Basis Technologies (12)

Basis Technologies DevOps and Testing Platform for SAP
Basis Technologies DevOps and Testing Platform for SAP Basis Technologies DevOps and Testing Platform for SAP
Basis Technologies DevOps and Testing Platform for SAP
 
DevOps Deep Dive Webinar: Building a business case for agile and devops
DevOps Deep Dive Webinar: Building a business case for agile and devopsDevOps Deep Dive Webinar: Building a business case for agile and devops
DevOps Deep Dive Webinar: Building a business case for agile and devops
 
8 steps to daily SAP releases
8 steps to daily SAP releases 8 steps to daily SAP releases
8 steps to daily SAP releases
 
BDEx - The must have tool for Utilities running SAP CR&B
BDEx - The must have tool for Utilities running SAP CR&BBDEx - The must have tool for Utilities running SAP CR&B
BDEx - The must have tool for Utilities running SAP CR&B
 
Transport expresso-combined-feature-sheets
Transport expresso-combined-feature-sheetsTransport expresso-combined-feature-sheets
Transport expresso-combined-feature-sheets
 
RS Components reduce downtime and enable aggressive SAP rollout strategy to s...
RS Components reduce downtime and enable aggressive SAP rollout strategy to s...RS Components reduce downtime and enable aggressive SAP rollout strategy to s...
RS Components reduce downtime and enable aggressive SAP rollout strategy to s...
 
7 fatal assumptions about SAP agility
7 fatal assumptions about SAP agility7 fatal assumptions about SAP agility
7 fatal assumptions about SAP agility
 
The 7 circles of SAP project delivery hell - Why system changes are slow, clu...
The 7 circles of SAP project delivery hell - Why system changes are slow, clu...The 7 circles of SAP project delivery hell - Why system changes are slow, clu...
The 7 circles of SAP project delivery hell - Why system changes are slow, clu...
 
How CBH Group delivers SAP change that keeps pace with business demands
How CBH Group delivers SAP change that keeps pace with business demandsHow CBH Group delivers SAP change that keeps pace with business demands
How CBH Group delivers SAP change that keeps pace with business demands
 
Using the 5 WHYs to determine why your SAP Major Incident really happened
Using the 5 WHYs to determine why your SAP Major Incident really happenedUsing the 5 WHYs to determine why your SAP Major Incident really happened
Using the 5 WHYs to determine why your SAP Major Incident really happened
 
Play Tetris in your SAP system
Play Tetris in your SAP systemPlay Tetris in your SAP system
Play Tetris in your SAP system
 
6 Kick-Ass Tips to Improve SAP Performance
6 Kick-Ass Tips to Improve SAP Performance6 Kick-Ass Tips to Improve SAP Performance
6 Kick-Ass Tips to Improve SAP Performance
 

Dernier

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 

Dernier (20)

Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
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...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 

Unit Test Automation: The prerequisite for Continuous Delivery in SAP environments

  • 1. basistechnologies.com A Basis Technologies white paperA Basis Technologies white paper basistechnologies.com Unit Test Automation A step towards Agile delivery and DevOps in SAP 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 Agile development or 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 continuous integration 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 time cost $
  • 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 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 Automated unit testing is the plankton of change in DevOps - 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 assurance 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 discussed here 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 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 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 especially 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/ 2 basistechnologies.com
  • 15. basistechnologies.com A Basis Technologies white paper Create a sense of urgency ! ! ! ! ! ! ! Start to request and implement functional changes on a more frequent basis, rather than storing everything up for major releases. Make a decision that automated unit testing will be implemented from the very  start of the next new development or project, and ensure that nothing leaves development unless unit testing has been successfully carried out. 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 even Agile and 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