CoursesAI WorkshopCompaniesPricingBlogNewsletter
  • Courses
  • AI Workshop
  • Companies
  • Pricing
  • Blog
  • Newsletter
Subscribe
  • Courses
  • Companies
  • Communities
  • Blog
  • Gift card
  • Newsletter
  • Help
  • Shop
  • ConfAiBot
  • Contact
  • Legal notice
  • General conditions
  • Privacy policy
  • Cookies policy

Course of Testing: Introduction and Best Practices

Standard
Javier FerrerRafa Gómez

By Javier Ferrer y Rafa Gómez – Software Design and Architecture y Methodologies and good practices

Learn what testing brings, how to test, and best practices to prevent maintaining your tests from becoming a nightmare with examples from The Real World™

Go to course

A course with practical and to-the-point examples where you will learn about the different types of tests we use in our daily work, strategies and design patterns that will help us make our tests more maintainable and tolerant to change.

In this course, we will see how to propose a testing strategy where we will define which elements of our application each type of test covers, maximizing the value they provide while minimizing the cost of maintaining them.

In the course, you will learn:

  • Basics of testing, no prior knowledge of tests is required.
    • We will see examples in the following languages:
      • PHP
      • Java
      • JavaScript
      • Scala
    • Introductory concepts such as:
      • What we understand as a unit in our unit tests
      • Test pyramid
      • Should we cover 100% of the code with tests?
  • Advanced and specific aspects such as:
    • Avoiding complex instantiations: ObjectMother
    • How to avoid slow and coupled tests: Fakes, Stubs, and Mocks
    • How to solve tests that randomly fail
    • How to avoid tests that pass but the code fails in production
    • Improving the maintainability and structure of our tests
    • Applying the Single Responsibility Principle of SOLID to our tests
    • Given-When-Then or Arrange-Act-Assert pattern
    • Providing readability and semantics to our tests
    • Team management and development flow
    • Additional test doubles like Dummy and Spy
    • Summary of TDD: Test Driven Development
    • Refactoring: Tips for adding tests to an existing application
    • Dealing with legacy: Opportunities for adding tests

We recommend taking the course on SOLID Principles Applied and Hexagonal Architecture before starting this course to acquire software design fundamentals that will help better leverage the concepts we will explore in this course.

Here’s the first video of the course so you can get an idea of the rhythm and quality of the content:

Videos of the course

  • ❓ What is testing and what does it bring? Why should we test? - Examples from The Real World™️

  • ☝️ Types of tests and example of unit testing: Live coding!
  • 🤝 Integration test - Watch out for Unit of Work!
  • ✅ Example acceptance test
  • Let’s review!
  • To practice! Unit test for obtaining course

  • 🐘 Testing in PHP with PhpUnit
  • ☕ Testing in Java with jUnit
  • 🧬 Testing in Scala with ScalaTest
  • 💫 Testing in JavaScript with Jest
  • Let’s review!
  • To practice! Maximize your testing library

  • 👇 What do we understand as a unit in our unit tests? Subject Under Test (SUT)
  • 🔺 Test pyramid - Proposed strategy for day-to-day
  • Let’s review!
  • To practice! Unit test for obtaining a video

  • 🧶 Avoiding complex instantiations: ObjectMother
  • 🐢 💨 How to avoid slow and coupled tests: Fakes, Stubs and Mocks
  • Let’s review!
  • To practice! Test double for VideoRepository

  • 🔀 How to solve tests that fail randomly
  • 🤯 How to avoid tests that pass but the code fails in production
  • Let’s review!
  • To practice! Forcing deterministic tests

  • 📂 Folder structure
  • 1️⃣ Applying the Single Responsibility Principle of SOLID
  • 🔋 Given-When-Then or Arrange-Act-Assert pattern
  • Let’s review!
  • To practice! Acceptance Tests for CoursesCounter

  • 📖 Bringing readability and semantics to our tests
  • Let’s review!
  • To practice! More semantic test

  • ⚡ Introduction to TDD
  • 👨‍💻 Introduction and example with TCR
  • Let’s review!
  • To practice! TDD flow to create video

  • ☝️ Introduction to ATDD and implementation of the acceptance test
  • 👇 Implementation of the unit test of the use case and closing circles
  • Let’s review!
  • To practice! ATDD flow to create course

  • 📤 Team-Level Conventions: GitHooks
  • 🤝 How we promote testing in our companies
  • Let’s review!

  • 👤 Method Signature Compliance: Dummy
  • 🕵️‍♀️ Spying on Our Own Behavior: Spy
  • Let’s review!
  • To practice! Creating a Dummy

  • Alternative to Acceptance Tests
  • Acceptance Test and the Happy Path
  • Scenarios without `When`

  • 🧟 Other testing paradigms: Mutant and property-based testing
  • 🤟 Automating test execution: Continuous Integration
  • 🙌 Conclusions and next steps
  • 🤔 Feedback for improvement and recommendations
Go to course

Related courses

Standard
Design patterns: Inbox and Outbox

📬 Design patterns: Inbox and Outbox

Javier FerrerRafa Gómez

Learn when to use (and when not to use) the Inbox and Outbox patterns.

See course
Standard
How to Measure Development Team Productivity [Talk]

🔬 How to Measure Development Team Productivity [Talk]

AudienseCodely

A talk where Alfredo Artiles tells us when and how it makes sense to measure the productivity of development teams.

See course
Standard
Event Bus in a Database [Infrastructure Design]

🚏 Event Bus in a Database [Infrastructure Design]

Javier FerrerRafa Gómez

Add scalability by using your own database as an event bus.

See course
See full catalogue

Pay according to your needs

lite (only monthly)

19 €
per month
  • Essential programming courses to build a solid foundation
Popular

standard

24,92 €
Discount vs monthly of 49 €
Annual payment of 299 €
per month
  • Main catalog to master writing maintainable, scalable, and testable code
  • Receive job offers verified by Codely
  • Company invoice
  • Accumulate renewal discounts

premium

41,58 €
Discount vs monthly of 89 €
Annual payment of 499 €
per month
  • Exclusive AI courses to keep you always up to date
  • Early access to new courses
  • Discount on workshops
  • Receive job offers verified by Codely
  • Company invoice
  • Accumulate renewal discounts

We won't increase the price while your subscription is active

SubscribeSign in