SlideShare a Scribd company logo
Gorilla Logic Proprietary and Confidential
Improving Automated Tests with Fluent
Assertions Jorge Vega Citalan
jorge.vega.citalan@gmail.com
Gorilla Logic Proprietary and Confidential
Agenda
Introduction
Supported Frameworks and Platforms
Common Asserts
Assertions Scope
Asserts with JSON
Java, Python & JavaScript?
2
1
3
4
5
6
2
Gorilla Logic Proprietary and ConfidentialGorilla Logic Proprietary and Confidential
Introduction
Gorilla Logic Proprietary and Confidential
Introduction
❏ Improve readability of test source code.
4
Gorilla Logic Proprietary and Confidential
Introduction
❏ Clearer explanations about why a test
failed.
5
Gorilla Logic Proprietary and ConfidentialGorilla Logic Proprietary and Confidential
Supported Frameworks and Platforms
Gorilla Logic Proprietary and Confidential
Supported Frameworks
❏ Fluent Assertions supports the following unit
test frameworks:
■ MSTest (Visual Studio 2010, 2012 Update 2, 2013
and 2015)
■ MSTest2 (Visual Studio 2017, Visual Studio 2019)
■ NUnit
■ XUnit
■ XUnit2
■ MBUnit
■ Gallio
■ NSpec
■ MSpec
7
Gorilla Logic Proprietary and Confidential
Supported Platforms
❏ Fluent Assertions supports the following
minimum platforms:
■ .NET Core 1.0 and 2.0
■ .NET Framework 4.5
■ Mono, Xamarin.iOS 10.0, Xamarin.Mac 3.0 and
Xamarin.Android 7.0
■ Universal Windows Platform
8
Gorilla Logic Proprietary and ConfidentialGorilla Logic Proprietary and Confidential
Common Asserts
Gorilla Logic Proprietary and Confidential
Strings
❏ Null, empty or contains whitespace only.
10
Gorilla Logic Proprietary and Confidential
Strings
❏ Common assertions.
11
Gorilla Logic Proprietary and Confidential
Strings
❏ Contain certain values.
12
Gorilla Logic Proprietary and Confidential
Strings
❏ Wildcards and Regular Expressions.
13
Gorilla Logic Proprietary and Confidential
Numerical and IComparable<T>
❏ Common assertions.
14
Gorilla Logic Proprietary and Confidential
Numerical
❏ Doubles and Floats.
15
Gorilla Logic Proprietary and Confidential
Numerical
❏ Assertions against a list of values.
16
Gorilla Logic Proprietary and Confidential
Dates
❏ Common assertions.
17
Gorilla Logic Proprietary and Confidential
Dates
❏ Date details.
18
Gorilla Logic Proprietary and Confidential
Dates
❏ Ranges.
19
Gorilla Logic Proprietary and Confidential
Nullable
❏ Common assertions.
20
Gorilla Logic Proprietary and Confidential
Collections
❏ Common asserts.
21
Gorilla Logic Proprietary and Confidential
Collections
❏ Individual assertions on all elements of a
collection.
22
Gorilla Logic Proprietary and Confidential
Dictionaries
❏ Common asserts.
23
Gorilla Logic Proprietary and Confidential
Dictionaries
❏ Common asserts.
24
Gorilla Logic Proprietary and ConfidentialGorilla Logic Proprietary and Confidential
Assertions Scope
Gorilla Logic Proprietary and Confidential
Assertions Scope
❏ Batch multiple assertions into an AssertionScope
so that FluentAssertions throws one exception
at the end of the scope with all failures.
26
Gorilla Logic Proprietary and ConfidentialGorilla Logic Proprietary and Confidential
Asserts with JSON
Gorilla Logic Proprietary and Confidential
JSON
❏ Assertions allowed:
■ BeEquivalentTo()
■ ContainSingleElement()
■ ContainSubtree()
■ HaveCount()
■ HaveElement()
■ HaveValue()
■ MatchRegex()
■ NotBeEquivalentTo()
■ NotHaveElement()
■ NotHaveValue()
■ NotMatchRegex()
28
Gorilla Logic Proprietary and Confidential
JSON
❏ Be sure to include using FluentAssertions.Json;
otherwise false positives may occur.
29
Gorilla Logic Proprietary and ConfidentialGorilla Logic Proprietary and Confidential
Java, Python & JavaScript?
Gorilla Logic Proprietary and Confidential
Java
❏ AssertJ (https://joel-costigliola.github.io/assertj/)
31
Gorilla Logic Proprietary and Confidential
Python
❏ Fluentcheck (https://github.com/csparpa/fluentcheck)
32
Gorilla Logic Proprietary and Confidential
Python
❏ Assertpj (https://pypi.org/project/assertpy/)
33
Gorilla Logic Proprietary and Confidential
JavaScript
❏ Chai (https://www.chaijs.com/guide/styles/#should)
34
Gorilla Logic Proprietary and ConfidentialGorilla Logic Proprietary and Confidential
Demo
Gorilla Logic Proprietary and Confidential
Q&A
"With Fluent Assertions, the assertions look
beautiful, natural and most importantly, extremely
readable" Garish

More Related Content

What's hot (20)

PPTX
Java Method, Static Block
Infoviaan Technologies
 
PPTX
ITN_Module_2.pptx
MarcoToruo
 
PPTX
Java swing
ssuser3a47cb
 
PDF
Catalog Biến tần Frenic 5000g11 Fuji Electric
Beeteco
 
PPTX
STLC-ppt-1.pptx
sahithisammeta
 
PPTX
Java programming course for beginners
Eduonix Learning Solutions
 
PPTX
ISTQB Test level, Test type
HoangThiHien1
 
PPTX
Selenium
Rakshitha Raviprakash
 
PDF
ISTQB CTAL - Test Analyst
Samer Desouky
 
PDF
Functional Testing vs Non-Functional Testing | Edureka
Edureka!
 
PDF
Functional Tests Automation with Robot Framework
laurent bristiel
 
PDF
ISTQB Foundation Level Basic
Erol Selitektay
 
PDF
Course 101: Lecture 5: Linux & GNU
Ahmed El-Arabawy
 
PDF
ISO 26262 Approval of Automotive Software Components
Real-Time Innovations (RTI)
 
ODP
Unit testing with Qt test
Davide Coppola
 
PPSX
Unit Test Presentation
Sayedur Rahman
 
PPT
Lec13 14 багатопоточнiсть
cit-cit
 
PPTX
Hello, QML
Jack Yang
 
PPTX
UI Programming with Qt-Quick and QML
Emertxe Information Technologies Pvt Ltd
 
PPTX
JUnit- A Unit Testing Framework
Onkar Deshpande
 
Java Method, Static Block
Infoviaan Technologies
 
ITN_Module_2.pptx
MarcoToruo
 
Java swing
ssuser3a47cb
 
Catalog Biến tần Frenic 5000g11 Fuji Electric
Beeteco
 
STLC-ppt-1.pptx
sahithisammeta
 
Java programming course for beginners
Eduonix Learning Solutions
 
ISTQB Test level, Test type
HoangThiHien1
 
ISTQB CTAL - Test Analyst
Samer Desouky
 
Functional Testing vs Non-Functional Testing | Edureka
Edureka!
 
Functional Tests Automation with Robot Framework
laurent bristiel
 
ISTQB Foundation Level Basic
Erol Selitektay
 
Course 101: Lecture 5: Linux & GNU
Ahmed El-Arabawy
 
ISO 26262 Approval of Automotive Software Components
Real-Time Innovations (RTI)
 
Unit testing with Qt test
Davide Coppola
 
Unit Test Presentation
Sayedur Rahman
 
Lec13 14 багатопоточнiсть
cit-cit
 
Hello, QML
Jack Yang
 
UI Programming with Qt-Quick and QML
Emertxe Information Technologies Pvt Ltd
 
JUnit- A Unit Testing Framework
Onkar Deshpande
 

Similar to Improving Automated Tests with Fluent Assertions (20)

PPTX
Generic Test Automation Architecture
TestingCR
 
PDF
Hardening
Diego Pacheco
 
PDF
Judge: Identifying, Understanding, and Evaluating Sources of Unsoundness in C...
Michael Reif
 
PDF
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
PDF
Embracing Disruption: Adding a Bit of Chaos to Help You Grow
Paul Balogh
 
PDF
16 things a developer should know about testing
WolfSchlegel
 
PDF
[FullStack NYC 2019] Effective Unit Tests for JavaScript
Hazem Saleh
 
PDF
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Thomas Wuerthinger
 
PDF
effective java
tdc-globalcode
 
PDF
Scraping metrics for fun and profit
Bram Vogelaar
 
PDF
Make it test-driven with CDI!
rafaelliu
 
PDF
the grinder testing certification
Vskills
 
PDF
Pair Development from the Trenches
Dawn Code
 
PDF
Evolving The Java Language
QConLondon2008
 
PDF
Production-ready GraphQL with Caliban
Pierre Ricadat
 
PDF
What Code Is Deliberately Excluded from Test Coverage and Why? (MSR 2021)
Andre Hora
 
PDF
Compliance Superpowers - Ben Blair, Chicago
AWS Chicago
 
KEY
Cascalog at Strange Loop
nathanmarz
 
PPTX
Introduction to GraphQL
Bhargav Anadkat
 
PDF
Entregando Bons Resultados com BDD
Adiel Cristo
 
Generic Test Automation Architecture
TestingCR
 
Hardening
Diego Pacheco
 
Judge: Identifying, Understanding, and Evaluating Sources of Unsoundness in C...
Michael Reif
 
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
Embracing Disruption: Adding a Bit of Chaos to Help You Grow
Paul Balogh
 
16 things a developer should know about testing
WolfSchlegel
 
[FullStack NYC 2019] Effective Unit Tests for JavaScript
Hazem Saleh
 
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Thomas Wuerthinger
 
effective java
tdc-globalcode
 
Scraping metrics for fun and profit
Bram Vogelaar
 
Make it test-driven with CDI!
rafaelliu
 
the grinder testing certification
Vskills
 
Pair Development from the Trenches
Dawn Code
 
Evolving The Java Language
QConLondon2008
 
Production-ready GraphQL with Caliban
Pierre Ricadat
 
What Code Is Deliberately Excluded from Test Coverage and Why? (MSR 2021)
Andre Hora
 
Compliance Superpowers - Ben Blair, Chicago
AWS Chicago
 
Cascalog at Strange Loop
nathanmarz
 
Introduction to GraphQL
Bhargav Anadkat
 
Entregando Bons Resultados com BDD
Adiel Cristo
 
Ad

More from TestingCR (14)

PDF
Webinar - Scrum for Beginners! impartida por Melissa Leyva
TestingCR
 
PDF
WEBINAR: Mejora Continua en equipos de Testing por Nadia Cavalleri
TestingCR
 
PDF
Patrones de diseño en la automatización, PageObject o ScreenPlay
TestingCR
 
PDF
How can we start in the QA World?
TestingCR
 
PPTX
Mobile Automation Basic Concepts / Demo
TestingCR
 
PDF
UX/UI: QA Approved
TestingCR
 
PPTX
El papel del liderazgo femenino en el campo tecnológico y su balance con la v...
TestingCR
 
PPTX
Pruebas De Seguridad Aplicadas a QA
TestingCR
 
PDF
Choosing the correct test case manager
TestingCR
 
PPTX
Puro Jmeter, Pura Vida! - Base de Datos y Webservices desde Jmeter
TestingCR
 
PDF
Webinar: Los mil millones de usuarios que debes considerar en tus pruebas
TestingCR
 
PDF
WEBINAR: Testing Exploratorio y Mind Maps por Claudia Badell
TestingCR
 
PDF
Estado del testing 2019
TestingCR
 
PPTX
Automation Image Comparison Testing
TestingCR
 
Webinar - Scrum for Beginners! impartida por Melissa Leyva
TestingCR
 
WEBINAR: Mejora Continua en equipos de Testing por Nadia Cavalleri
TestingCR
 
Patrones de diseño en la automatización, PageObject o ScreenPlay
TestingCR
 
How can we start in the QA World?
TestingCR
 
Mobile Automation Basic Concepts / Demo
TestingCR
 
UX/UI: QA Approved
TestingCR
 
El papel del liderazgo femenino en el campo tecnológico y su balance con la v...
TestingCR
 
Pruebas De Seguridad Aplicadas a QA
TestingCR
 
Choosing the correct test case manager
TestingCR
 
Puro Jmeter, Pura Vida! - Base de Datos y Webservices desde Jmeter
TestingCR
 
Webinar: Los mil millones de usuarios que debes considerar en tus pruebas
TestingCR
 
WEBINAR: Testing Exploratorio y Mind Maps por Claudia Badell
TestingCR
 
Estado del testing 2019
TestingCR
 
Automation Image Comparison Testing
TestingCR
 
Ad

Recently uploaded (20)

PDF
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
PPTX
MODULE 04 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
PPTX
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PPT
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPT
Testing and final inspection of a solar PV system
MuhammadSanni2
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PDF
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
PPTX
OCS353 DATA SCIENCE FUNDAMENTALS- Unit 1 Introduction to Data Science
A R SIVANESH M.E., (Ph.D)
 
PDF
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PDF
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
PPTX
Knowledge Representation : Semantic Networks
Amity University, Patna
 
PPTX
MODULE 03 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
MODULE 04 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
Design Thinking basics for Engineers.pdf
CMR University
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
Testing and final inspection of a solar PV system
MuhammadSanni2
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
OCS353 DATA SCIENCE FUNDAMENTALS- Unit 1 Introduction to Data Science
A R SIVANESH M.E., (Ph.D)
 
3rd International Conference on Machine Learning and IoT (MLIoT 2025)
ClaraZara1
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
Knowledge Representation : Semantic Networks
Amity University, Patna
 
MODULE 03 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 

Improving Automated Tests with Fluent Assertions