SlideShare uma empresa Scribd logo
1 de 102
Baixar para ler offline
The Art of Unit Testing
The Circle of Purity
Check out my ‘Clean Code – The Next Episode’
Deep Dive at Devoxx BE 2019 for more context
victor.rentea@gmail.com ♦ ♦ @victorrentea ♦ VictorRentea.ro
Are you Agile ?
Victor Rentea
Clean Code Evangelist
VictorRentea.ro/#playlist
best talks on:
Lead Architect
Internal Coach
Software Craftsman
Pair Programming, Refactoring, TDD
Java Champion
Founder
C#
VictorRentea.ro @victorrentea victor.rentea@gmail.com
Independent
Technical Trainer & Coach
HibernateSpring Java 8
Architecture, DDDDesign Patterns
Clean Code Unit Testing, TDD
Java Performance more…Scala
240+ days1500 devs6 years
VictorRentea.rovictor.rentea@gmail.com
30 companies
Posting daily on
+Live-Trainingon
30K 3K 2K
13 VictorRentea.ro
▪Arrange: setup the test fixture
▪Act: call the production code
▪Assert the outcomes
▪Annihilate[opt]: clean up
Terms
14 VictorRentea.ro
Why do we
Write Tests ?
16 VictorRentea.ro
To Read-the-Spec™
(before we finish the implem☺)
FEAR
Executable
Specification
always up-to-date
Why do we Write Tests ?
17 VictorRentea.ro
Medical Screening
18 VictorRentea.ro
Sensitive
Specific
Fast
Few
Clinical Tests
19 VictorRentea.ro
Sensitive
High Coverage %
Correct Tests
Specific
Expressive
Isolated & Robust
Low overlap
Fast
Few
Small, DRY tests
Test Design Goals
= Maintainable
fail for any bug
precise failures
20 VictorRentea.ro
Test code >> Prod code
Not Maintainable?
Under pressure, developers will:
@Ignore
delete test
// comment test
// @Test
delete asserts
invert asserts
EVIL
21 VictorRentea.ro
22 VictorRentea.ro
▪Code that you fear 😱
▪A distant corner in the logic
▪A bug (before fixing it) 🏆
▪for/if/while ⚙
▪Thrown exception
▪A method that just calls two others
▪Trivial code
▪Legacy code with 0 bugs, 0 changes
(over the last year)
Testing Priorities
PRIORITY
a.setName(b.getName());
*in case you're not 100% TDD
hard to understand
takes 3 mins of UI clicks to reproduce
+0.01%
23 VictorRentea.ro
Cost of Unit Tests
Cost
Coverage%
100%80% 90%60%
tradeoff
ROI=?
24 VictorRentea.ro
What do you do when you find a bug?
Takes guts to stop and think: “WHY?”
Then Unit Test.
You run to cover it.
25 VictorRentea.ro
Tests are green.
You implement a huge Change Request.
Tests are green.
Evergreen Tests
We ❤ Green Tests!
26 VictorRentea.ro
Evergreen Tests
27 VictorRentea.ro
Evergreen Tests
Coverage% = ?
28 VictorRentea.ro
Can you
TrustSuch Tests?
29 VictorRentea.ro
How can you check
that a test really covers
what it claims?
32 VictorRentea.ro
Mutation Testing
You break the
Production code
You get a "mutant" code
The tests should squash
the mutant by turning red
You run the Tests You undo the change
There are frameworks that play like this with your code,
but their results might be depressing
Tests fail ֞ Production code is altered
How can you check
that a test really covers
what it claims?
33 VictorRentea.ro
Always see your test failing
at least once
Tests, like laws, are meant to be broken
34 VictorRentea.ro
▪Regression Bug
- Yeehaaa! ➔ fix it
▪Deep Change Request
- Double Check ➔ Update/Delete the test?
▪Iso-functional changes
- Superficial API Changes ➔ adjust the test
- Refactoring internals ➔ test is too tightly coupled
▪A Bug in a Test
- Usually discovered via debugging
Why can a Test Fail ?
the usual suspect = production code
https://www.monkeyuser.com/
35 VictorRentea.ro
A Bug in a Test
36 VictorRentea.ro
A Bug in a Test
37 VictorRentea.ro
38 VictorRentea.ro
You want
Simple Tests !
Explicit
39 VictorRentea.ro
SimpleTests!
A bit of logic in a test
assertEquals("Greetings" + name, logic.getGreetings(name));
it's missing a " "!
Why? The same Dev wrote both prod and test code! ☺ CPP
➔ Prefer literals 
assertEquals("Greetings John", logic.getGreetings("John"));
Can you find the bug?
45 VictorRentea.ro
for loop
Testing a set of input-output pairs?
➔ Parameterized Unit Tests 
➔ .feature files 
WHY?!
SimpleTests!
47 VictorRentea.ro
Can be signed directly by Biz guys !
.feature files
48 VictorRentea.ro
49 VictorRentea.ro
Bridge the Gap
53 VictorRentea.ro
random
Testing to find errors?
➔ replay real calls from production 
(Even more: Golden Master Technique)
SimpleTests!
https://adrianbolboaca.ro/2014/05/golden-master/
54 VictorRentea.ro
callProd(…)
dependencies
TimeMachine.setTestTime(time);
actual = callProd(…);
assertEquals(new Date(), actual);
assertEquals(time, actual);
TimeMachine.clearTestTime(); // *
fails/passes randomly!
return TimeMachine.now();
return new Date();
return LocalDateTime.now();
+1ms?
asserting time
your custom class
Let's truncate! :D
draconian PowerMock?
* See here my auto-cleaning JUnit4 Time @Rule
,now
55 VictorRentea.ro
Tests Can
Control the Time
58 VictorRentea.ro
databases
files
queues
external web services
These are Integration Tests
SimpleTests!
59 VictorRentea.ro
GREEN
ZONE
Integration vs Unit Tests
Deep Testing
through many layers
Fragile
(depends on DB, files, other systems)
Such a failed test ⇒ a bug
Super-Fast
100 tests/sec
(some can be slower)
Slow
starts-up
the container
In-mem DB
62 VictorRentea.ro
Sensitive
High Coverage %
Correct Tests
Specific
Expressive
Isolated & Robust
Low overlap
Fast
Few
Small, DRY tests
Test Design Goals
63 VictorRentea.ro
Minimize Duplication
public void myTestRaw() {
Order o = new Order();
o.setDate(new Date());
o.setLines(new ArrayList<OrderLine>());
OrderLine ol1 = new OrderLine();
ol1.setProduct("P1");
ol1.setItems(3);
o.getLines().add(ol1);
OrderLine ol2 = new OrderLine();
ol2.setProduct("P2");
ol2.setItems(null);
o.getLines().add(ol2);
target.process(o);
}
Data Initialization
64 VictorRentea.ro
Fluent Builder Pattern
68 VictorRentea.ro
public void myTestWithBuildersAndObjectMother() {
Order o = anOrderWithOneLine()
.with(anOrderLine().withItem(anItem()))
.build();
target.process(o);
} Object Mother®
Fluent Builder®
Any use of ® in my talks is anecdotal
69 VictorRentea.ro
▪Fluent Builder®
▪Factory methods
- Object Mother shared between tests ?
▪Wrap production API
- In a more testable DSL
▪Keep common stuff in fields
▪Shared @Before
DRY Tests
Safe
Each @Test runs on a
fresh instance of the Test class
All use of ® in my talks is anecdotal
71 VictorRentea.ro
You want to shrink a large test
Abusing @Before
==Practical Guide☺==
Other tests do the same:
Time passes by
When you read a test:
▪ Arrange = method + @Before
▪ What part of it ?
You move some code in the @Before
▪ Mocks▪ Data Init ▪ Infra setup: DB, ..
72 VictorRentea.ro
SingleTestClass ATest
BTest
Fixture-Based Test Breakdown
@Before
Nested Test Fixtures in JUnit5: https://junit.org/junit5/docs/current/user-guide/#writing-tests-nested
@Test
@Test
@Test
sharedA
@Test
@Test
@Test
@Test
@Test
@Before
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Before
sharedB
73 VictorRentea.ro
Start with one Test class/Prod class
- If it grows (>300 lines?) or
- If many tests share a fixture
Split it
RecordRepositoryTest
RecordRepositorySearchForVersionTest
Maybe also split
the prod code ?
1DESIGN INSIGHT
74 VictorRentea.ro
5-10 lines
Descriptive names
Test Methods
public void givenAnInactiveCustomer_whenHePlacesAnOrder_itIsActivated()
public void getRecordDeltasForVersionWithDeletedRecord()
public void givenAProgramLinkedTo2Records_whenUpdated_2AuditsAreInserted()
RecordRowValidatorTest.invalidRecordStartDateFormat()
75 VictorRentea.ro
AnInactiveCustomerShould
.beActivatedWhenHePlacesAnOrder()
Another Naming Convention
"Given" = the class name
~ @Before
Fluent
"Then" part
(the expectations)
https://codurance.com/2014/12/13/naming-test-classes-and-methods/
76 VictorRentea.ro
Expressive Tests
Superb Failures
77 VictorRentea.ro
Suggestive Literals
@Test
public void customerEmailIsUpdated() {
Long customerId = createCustomer(new Customer("oldPhone"));
updateCustomerPhone(customerId, "newPhone");
Customer updatedCustomer = getCustomer(customerId);
assertEquals("newPhone", updatedCustomer.getPhone());
}
78 VictorRentea.ro
Assert a collection
Expressive Failures
(example)
assertEquals(1, names.size());
assertEquals("name", names.iterator().next());
assertEquals(Collections.singleton("name"), names);
vs
79 VictorRentea.ro
Assertions.*
assertThat(list).containsExactlyInAnyOrder(1,2,3);
assertThat(list).anyMatch(e -> e.getX() == 1);
assertThat(score).isEqualTo("Game won")
81 VictorRentea.ro
Sensitive
High Coverage %
Correct Tests
Specific
Expressive
Isolated & Robust
Low overlap
Fast
Few
Small, DRY tests
Test Design Goals
82 VictorRentea.ro
Should Tests Respect
Encapsulation?
83 VictorRentea.ro
FreshCodeLegacyCode
Encapsulated
Garbage
Covering Legacy
Code With Tests
vs
ShouldTestsRespect
Encapsulation?
YES
Test through the public API
Tests won't break when implementation changes
Practices the API
NO
Breaking encapsulation
is a key technique
Temporarily use package/public protection
84 VictorRentea.ro
Encapsulated
Garbage
Covering Legacy
Code With Tests
vs
85 VictorRentea.ro
You run your test suite
Test #13 is RED
To debug it, you run that test:
Test #13 goes GREEN
??!!!?!
Yet Another Happy Day#2…
86 VictorRentea.ro
You run your test suite
It’s all GREEN
You add Test #43
Test #13 turns RED
(untouched!)
You delete Test #43
Test #13 goes back GREEN
Yet Another Happy Day#3…
??!!!?!
87 VictorRentea.ro
@Before
▪In-memory Objects
▪COMMITs to a DB
▪External files/systems
Hidden Test Dependencies
- Static fields, singletons
- PowerMocks
- Thread Locals
- Container shared by tests [Spring]
- In-memory
- External (real)
Reset them in @After
➔ @DirtiesContext
➔ Isolated tests ran in Tx rolled back after the test
Intermediate
Commits
88 VictorRentea.ro
JUnit runs tests in unexpected order
To Ensure Independency
(DON'T DO THIS)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
Surprise me!
91 VictorRentea.ro
▪Test Design Principles
▪TDD
▪Mocks
▪Databases
▪Legacy Code
Agenda
92 VictorRentea.ro
A discipline
in which you grow software
in small increments
for which you write
the tests before the implementation
Test-Driven Development
Credited to Kent Beck, 2003
93 VictorRentea.ro
1. Write prod code only to fix a failing test
- Although we often foresee the implementation
2. Write 1 test for a feature not yet implemented
- It must fail with grace
3. Write just enough prod code
to pass the test
The 3 Rules of TDD--Uncle Bob
Code Golf
Fewest keystrokes
to make it pass
few
94 VictorRentea.ro
Red-Green-Refactor
With Grace
fail
KISS, YAGNI, Golf:
Write as little prod code,
don’t mind about quality
You can't break anything
•Start with the simplest cases
•Start with the ☺ flows
If you get stuck or
other tests break
=> revert and retry
DRY, Clean Code
Write prod code to
Make It Pass
Write a Failing Test
for a new feature
Refactor
prod XOR tests
pass
fail
Run
Tests
Run
Tests
Run
Tests
1-10 min
Incorrect? –
Overlapping? –
(could keep for documenting)
95 VictorRentea.ro
Rules of Simple Design
https://martinfowler.com/bliki/BeckDesignRules.html
2. Reveals Intention
3. No Duplication
4. Fewest Elements
1. Passes the Tests
96 VictorRentea.ro
TDD Schools of Thought
TDDasifyoumeantit
A comparative example:
Uncle Bob (Chicago School) vs Sandro Mancuso (London School): git has two branches.
https://gist.github.com/xpepper/2e3519d2cb8568a0b13739d9ae497f21
aka Chicago school aka London school
101 VictorRentea.ro
Invest any effort necessary to
create Unit Tests
for any tough problem you face
One of the best way
tests save you time!
102 VictorRentea.ro
Test-Driven Development
Design
Testable Design ?
https://martinfowler.com/articles/is-tdd-dead/
¿ messy thoroughly unit-tested code ?
∄
105 VictorRentea.ro
Should we TDD Everything ?
NO - Martin Fowler
https://martinfowler.com/articles/is-tdd-dead/
106 VictorRentea.ro
▪Test Design Principles
▪TDD
▪Mocks
▪Databases
▪Legacy Code
Agenda
107 VictorRentea.ro
108 VictorRentea.ro
Fake Objects
Fast
DB ☺
Repeatable
Isolation from external systems
Mentally Simpler
To test a layer, fake the layer bellow:
WHY?!
Cheating?
James Coplien: https://rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste.pdf
109 VictorRentea.ro
110 VictorRentea.ro
Fake
Mock
Verify a method call
verify(repo).save(…);
Stub
Respond to method calls
when(mock.method())
.thenReturn(…);
112 VictorRentea.ro
113 VictorRentea.ro
Side-effects
1) On external systems:
2) On in-memory objects
➔ assert their state after
What can a Unit Test check?
Input OutputFeature
(prod function)
Data from
dependencies
Input+Deps → Output
(real or stubbed)
a) Real: SELECT
b) Mocked: verify repo.save() was called
Input → Output
Simple and Elegant Tests
Pure Function: 𝑓 𝑥 = 𝑥2
Simplify design:
purify logic
Philosophic Slide
“Interaction Testing”
114 VictorRentea.ro
Extract Method
mock
stub
115 VictorRentea.ro
= Pure Function
visibility=? parameter count++
116 VictorRentea.ro
Free the Mocks!
Mock-free Tests!
117 VictorRentea.ro
The Circle of Purity
Professional Unit Testing – Mocking
118 VictorRentea.ro
infrastructure
domain
side effects
pure logic
2
134 VictorRentea.ro
It may be wiser to build
a testing infrastructure (DSL)
On the medium-long term
Than Mocking It:
150 VictorRentea.ro
▪Test Design Principles
▪TDD
▪Mocks
▪Databases
▪Legacy Code
Agenda
151 VictorRentea.ro
Legacy and Inheritance
Developers are the only persons on Earth

about
152 VictorRentea.ro
Goal: Survive
The First 3 Unit Tests
Test no.
difficulty
Writing Tests on Old Code
153 VictorRentea.ro
Testing Legacy Code: Feeling
https://www.youtube.com/watch?v=_gQ84-vWNGU
156 VictorRentea.ro
157 VictorRentea.ro157
158 VictorRentea.ro158
159 VictorRentea.ro159
160 VictorRentea.ro
163 VictorRentea.ro
▪Extract-'n-test
- Then mock it out
▪IDE Refactoring
- When not guarded by tests; mob refactoring
▪Frequent Commits
▪Break encapsulation
- Expose internal state
- Spy internal methods
▪Hack statics
- PowerMock methods (still, avoid…)
- Control global state
▪Copy, don’t Cut
- Make old code useless while still compiling
▪Look for Seams
- Decoupling places
▪Exploratory refactoring
- 30 mins that you always throw away at the end
- Seek how to make the design testable
▪Temporary ugly tests
▪Unit Test + Refactoring
- Go together
Legacy Testing Techniques
More on: http://blog.adrianbolboaca.ro/2015/02/unit-testing-on-legacy-code/
The one slide with
164 VictorRentea.ro
167 VictorRentea.ro
▪ Clean Code + Clean Coders Videos [CCEp#] http://www.cleancoders.com/
Robert C. Martin (Uncle Bob)
▪ (London-Style TDD): Growing Object-Oriented Software, Guided by Tests
Steve Freeman, Nat Pryce, 2009
▪ (Classic-Style TDD): Test-Driven Development, by example
Kent Beck, 2000
▪ The Art of Unit Testing
Roy Osherove, 2009
▪ Coding Dojo Handbook
Emily Bache, 2009
▪ https://springtestdbunit.github.io/spring-test-dbunit/faq.html
▪ Professional TDD with C#: Developing Real World Apps with TDD
James Bender, Jeff McWherter, 2011
▪ Agile in a Flash: https://pragprog.com/book/olag/agile-in-a-flash
▪ "Is TDD Dead?" - on You Tube
▪ Introducing BDD: http://dannorth.net/introducing-bdd/
Dan North
▪ Refactoring 2nd ed
Martin Fowler, 2018
Reading
168 VictorRentea.ro
▪Test where the Fear is
▪Correct Tests fail  Prod mutates
▪Explicit, Simple Tests
▪TODO: Try TDD!
▪Purify the heavy logic
▪Listen to Tests: Testable Design
Key Points
169 VictorRentea.ro
Why Should I
Write Tests ?
171 VictorRentea.ro171
¡¡ PLEASE !!
Hunt me down for questions!
172 VictorRentea.ro
Thank You!
VictorRentea.ro
Trainings, talks, goodies
@VictorRentea
Follow me for quality posts:
victorrentea.ro/community
Speaking Romanian? join me
A SCALABILITY PROBLEM:
OUT OF STICKERS
AND KEY CHEAT-SHEETS¡¡ PLEASE !!
Hunt me down for questions!
YOU CAN DOWNLOAD AND PRINT THEM
YOURSELF FROM VICTORRENTEA.RO

Mais conteúdo relacionado

Mais procurados

Software Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdfSoftware Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdfVictor Rentea
 
The Art of Clean code
The Art of Clean codeThe Art of Clean code
The Art of Clean codeVictor Rentea
 
Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8Victor Rentea
 
Extreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipExtreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipVictor Rentea
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the DomainVictor Rentea
 
Functional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User GroupFunctional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User GroupVictor Rentea
 
Clean Code I - Best Practices
Clean Code I - Best PracticesClean Code I - Best Practices
Clean Code I - Best PracticesTheo Jungeblut
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteClean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteVictor Rentea
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)David Ehringer
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net coreSam Nasr, MCSA, MVP
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean ArchitectureRoc Boronat
 
Clean architecture
Clean architectureClean architecture
Clean architectureLieven Doclo
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing ArchitecturesVictor Rentea
 
Clean architecture
Clean architectureClean architecture
Clean architecture.NET Crowd
 

Mais procurados (20)

Software Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdfSoftware Craftsmanship @Code Camp Festival 2022.pdf
Software Craftsmanship @Code Camp Festival 2022.pdf
 
The Art of Clean code
The Art of Clean codeThe Art of Clean code
The Art of Clean code
 
Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8Clean Lambdas & Streams in Java8
Clean Lambdas & Streams in Java8
 
Extreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipExtreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software Craftsmanship
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the Domain
 
Functional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User GroupFunctional Patterns with Java8 @Bucharest Java User Group
Functional Patterns with Java8 @Bucharest Java User Group
 
Clean Code
Clean CodeClean Code
Clean Code
 
Clean Code I - Best Practices
Clean Code I - Best PracticesClean Code I - Best Practices
Clean Code I - Best Practices
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Clean code
Clean codeClean code
Clean code
 
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening KeynoteClean Code @Voxxed Days Cluj 2023 - opening Keynote
Clean Code @Voxxed Days Cluj 2023 - opening Keynote
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Clean code: SOLID
Clean code: SOLIDClean code: SOLID
Clean code: SOLID
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Vertical Slicing Architectures
Vertical Slicing ArchitecturesVertical Slicing Architectures
Vertical Slicing Architectures
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Clean Code
Clean CodeClean Code
Clean Code
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 

Semelhante a The Art of Unit Testing - Towards a Testable Design

GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Ukraine
 
Testing Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdfTesting Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdfVictor Rentea
 
Testing the Untestable
Testing the UntestableTesting the Untestable
Testing the UntestableMark Baker
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Fwdays
 
Testing in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita GalkinTesting in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita GalkinSigma Software
 
Advance unittest
Advance unittestAdvance unittest
Advance unittestReza Arbabi
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation ArchitectureErdem YILDIRIM
 
Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Scott Keck-Warren
 
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
Making Your Own Static Analyzer Using Freud DSL. Marat VyshegorodtsevYandex
 
(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and backDavid Rodenas
 
Working Effectively With Legacy Perl Code
Working Effectively With Legacy Perl CodeWorking Effectively With Legacy Perl Code
Working Effectively With Legacy Perl Codeerikmsp
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
Refactoring blockers and code smells @jNation 2021
Refactoring   blockers and code smells @jNation 2021Refactoring   blockers and code smells @jNation 2021
Refactoring blockers and code smells @jNation 2021Victor Rentea
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020Abhijeet Vaikar
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.Matt Eland
 
Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022Mark Niebergall
 
Windmill Testing certification
Windmill Testing certificationWindmill Testing certification
Windmill Testing certificationVskills
 

Semelhante a The Art of Unit Testing - Towards a Testable Design (20)

Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
 
Testing Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdfTesting Microservices @DevoxxBE 23.pdf
Testing Microservices @DevoxxBE 23.pdf
 
Testing the Untestable
Testing the UntestableTesting the Untestable
Testing the Untestable
 
Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"Никита Галкин "Testing in Frontend World"
Никита Галкин "Testing in Frontend World"
 
Testing in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita GalkinTesting in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita Galkin
 
Advance unittest
Advance unittestAdvance unittest
Advance unittest
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 
Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023Getting Started with Test-Driven Development at Longhorn PHP 2023
Getting Started with Test-Driven Development at Longhorn PHP 2023
 
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 
(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back
 
Working Effectively With Legacy Perl Code
Working Effectively With Legacy Perl CodeWorking Effectively With Legacy Perl Code
Working Effectively With Legacy Perl Code
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
Refactoring blockers and code smells @jNation 2021
Refactoring   blockers and code smells @jNation 2021Refactoring   blockers and code smells @jNation 2021
Refactoring blockers and code smells @jNation 2021
 
Getting Started With Testing
Getting Started With TestingGetting Started With Testing
Getting Started With Testing
 
Testing w-mocks
Testing w-mocksTesting w-mocks
Testing w-mocks
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
 
Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022Leveling Up With Unit Testing - LonghornPHP 2022
Leveling Up With Unit Testing - LonghornPHP 2022
 
Windmill Testing certification
Windmill Testing certificationWindmill Testing certification
Windmill Testing certification
 

Mais de Victor Rentea

Microservice Resilience Patterns @VoxxedCern'24
Microservice Resilience Patterns @VoxxedCern'24Microservice Resilience Patterns @VoxxedCern'24
Microservice Resilience Patterns @VoxxedCern'24Victor Rentea
 
Distributed Consistency.pdf
Distributed Consistency.pdfDistributed Consistency.pdf
Distributed Consistency.pdfVictor Rentea
 
From Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptxFrom Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptxVictor Rentea
 
Test-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptxTest-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptxVictor Rentea
 
Profiling your Java Application
Profiling your Java ApplicationProfiling your Java Application
Profiling your Java ApplicationVictor Rentea
 
Unit testing - 9 design hints
Unit testing - 9 design hintsUnit testing - 9 design hints
Unit testing - 9 design hintsVictor Rentea
 
Hibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the MagicHibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the MagicVictor Rentea
 
Integration testing with spring @JAX Mainz
Integration testing with spring @JAX MainzIntegration testing with spring @JAX Mainz
Integration testing with spring @JAX MainzVictor Rentea
 
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021Victor Rentea
 
Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021Victor Rentea
 
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Victor Rentea
 
Pure Functions and Immutable Objects
Pure Functions and Immutable ObjectsPure Functions and Immutable Objects
Pure Functions and Immutable ObjectsVictor Rentea
 
Definitive Guide to Working With Exceptions in Java
Definitive Guide to Working With Exceptions in JavaDefinitive Guide to Working With Exceptions in Java
Definitive Guide to Working With Exceptions in JavaVictor Rentea
 
Extreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipExtreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipVictor Rentea
 
Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...
Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...
Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...Victor Rentea
 

Mais de Victor Rentea (17)

Microservice Resilience Patterns @VoxxedCern'24
Microservice Resilience Patterns @VoxxedCern'24Microservice Resilience Patterns @VoxxedCern'24
Microservice Resilience Patterns @VoxxedCern'24
 
Distributed Consistency.pdf
Distributed Consistency.pdfDistributed Consistency.pdf
Distributed Consistency.pdf
 
From Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptxFrom Web to Flux @DevoxxBE 2023.pptx
From Web to Flux @DevoxxBE 2023.pptx
 
Test-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptxTest-Driven Design Insights@DevoxxBE 2023.pptx
Test-Driven Design Insights@DevoxxBE 2023.pptx
 
Profiling your Java Application
Profiling your Java ApplicationProfiling your Java Application
Profiling your Java Application
 
OAuth in the Wild
OAuth in the WildOAuth in the Wild
OAuth in the Wild
 
Unit testing - 9 design hints
Unit testing - 9 design hintsUnit testing - 9 design hints
Unit testing - 9 design hints
 
Hibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the MagicHibernate and Spring - Unleash the Magic
Hibernate and Spring - Unleash the Magic
 
Integration testing with spring @JAX Mainz
Integration testing with spring @JAX MainzIntegration testing with spring @JAX Mainz
Integration testing with spring @JAX Mainz
 
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
The Proxy Fairy and the Magic of Spring @JAX Mainz 2021
 
Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021Pure functions and immutable objects @dev nexus 2021
Pure functions and immutable objects @dev nexus 2021
 
TDD Mantra
TDD MantraTDD Mantra
TDD Mantra
 
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
Definitive Guide to Working With Exceptions in Java - takj at Java Champions ...
 
Pure Functions and Immutable Objects
Pure Functions and Immutable ObjectsPure Functions and Immutable Objects
Pure Functions and Immutable Objects
 
Definitive Guide to Working With Exceptions in Java
Definitive Guide to Working With Exceptions in JavaDefinitive Guide to Working With Exceptions in Java
Definitive Guide to Working With Exceptions in Java
 
Extreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software CraftsmanshipExtreme Professionalism - Software Craftsmanship
Extreme Professionalism - Software Craftsmanship
 
Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...
Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...
Engaging Isolation - What I've Learned Delivering 250 Webinar Hours during CO...
 

Último

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
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
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
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
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Último (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
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
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
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...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
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...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

The Art of Unit Testing - Towards a Testable Design