Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS CompTIA Security+ AWS Certified Developer - Associate
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Personal Development Mindfulness Personal Transformation Meditation Life Purpose Coaching Emotional Intelligence
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Analysis Data Modeling Data Cleaning
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Freelancing Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee

This course includes:

  • 6 hours on-demand video
  • 4 articles
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
Development Programming Languages Unit Testing

Testy jednostkowe - JUnit 5, Mockito 2, TDD

Poznaj od podstaw jak tworzyć dobre testy jednostkowe w języku Java i metodyce Test Driven Development
Rating: 4.6 out of 54.6 (202 ratings)
1,258 students
Created by Dawid Nowak, Paweł Ćwik
Last updated 11/2020
Polish
30-Day Money-Back Guarantee

What you'll learn

  • Jak tworzyć dobre testy jednostkowe.
  • Jak korzystać z asercji i pracować z frameworkiem JUnit 5.
  • Jak korzystać z mocków i pracować z frameworkiem Mockito 2.
  • Jak stosować zasady FIRST oraz CORRECT.
  • Jak pracować w metodyce Test Driven Development.
  • Jak używać metryki Code Coverage.

Course content

8 sections • 54 lectures • 6h 13m total length

  • Preview02:30
  • Jak korzystać z kursu?
    01:57
  • Instalacja narzędzi
    05:26
  • Utworzenie projektu
    04:40

  • Wstęp
    00:48
  • Preview06:32
  • Preview03:04
  • Framework JUnit
    04:50
  • Pierwszy test
    09:45
  • Uruchamianie testów
    07:22
  • Struktura testu
    04:14
  • Nazywanie metod testowych
    03:25

  • Wstęp do JUnita 5
    02:31
  • Testowanie równości wartości i obiektów
    12:29
  • Testowanie wartości null
    07:27
  • Matchery - Hamcrest i assertJ
    12:24
  • Testowanie kolekcji
    14:47
  • Testowanie wyjątków
    04:23
  • Adnotacje @BeforeEach i @AfterEach
    04:44
  • Adnotacje @BeforeAll i @AfterAll
    09:37
  • Testowanie wydajności - timeout
    06:19
  • Adnotacje @Disabled i @DisplayName
    03:44
  • Matchery do łączenia asercji
    10:05
  • Assumptions i adnotacja @RepeatedTest
    05:12
  • Testy parametryzowane
    17:56
  • Preview10:01
  • Testy dynamiczne
    09:11
  • Oznaczanie testów - adnotacja @Tag
    04:49
  • Migracja z JUnita 4 i podsumowanie
    06:12
  • Zadanie praktyczne
    01:34

  • Jak pisać dobre testy?
    00:59
  • Zasady FIRST
    02:53
  • Zasady CORRECT
    16:02
  • Test Coverage
    06:21
  • Antywzorce testowe
    05:59

  • Czym jest Mockito?
    04:00
  • Stuby - definicja i zastosowanie
    13:05
  • Mocki - definicja i zastosowanie
    10:17
  • Weryfikacja wywołań metod
    15:41
  • ArgumentMatchers i wyjątki
    13:14
  • ArgumentCaptor
    07:26
  • Specjalistyczne metody
    18:53
  • Adnotacje i ustawienia restrykcyjności
    10:49
  • Preview08:46
  • Migracja z Mockito 1 i podsumowanie
    06:11
  • Zadanie praktyczne
    01:59

  • Zasady Test Driven Development
    02:01
  • TDD w praktyce - część 1
    10:27
  • TDD w praktyce - część 2
    10:57
  • TDD w praktyce - część 3
    05:53
  • TDD - podsumowanie
    02:29
  • Zadanie praktyczne
    00:28

  • Podsumowanie
    00:39

  • BONUS: Nasze pozostałe kursy + inne materiały!
    00:17

Requirements

  • Podstawowa znajomość języka Java.
  • Podstawowa znajomość programowania obiektowego.

Description

Testy jednostkowe są jedną z najważniejszych technik, które powinien znać każdy programista, niezależnie od języka w którym tworzy.

Kurs zaczynamy od wytłumaczenia czym są testy jednostkowe i dlaczego są takie ważne.

Następnie przedstawiamy szczegółowo dwa najważniejsze i najpopularniejsze frameworki Javowe używane w tworzeniu testów jednostkowych:

  • JUnit 5 - bardzo znany i popularny framework do uruchamiania testów oraz tworzenia asercji,

  • Mockito 2 - równie popularny framework, służący głównie do tworzenia mocków - obiektów imitujących zachowanie zewnętrznych zależności testowanych klas.

Centralną częścią kursu jest dokładne przedstawienie poszczególnych właściwości oraz funkcjonalności JUnita 5 oraz Mockito 2.

Przy okazji przedstawiania danej funkcjonalności, omawiamy również różnice w implementacji danego rozwiązania między poprzednimi i aktualnymi wersjami tych frameworków.

Bardzo ważnym działem jest wprowadzenie do tematyki TDD - Test Driven Development - czyli techniki tworzenia kodu, w której zaczyna się od napisania testów jednostkowych, a dopiero potem przechodzi do implementacji danej funkcjonalności w kodzie.

Z pomocą tego kursu poznasz także zestaw konwencji oraz dobrych praktyk programistycznych: dowiesz się jak tworzyć dobre testy jednostkowe korzystając z akronimów FIRST oraz CORRECT i skonfigurujesz bibliotekę JaCoCo, by tworzyć raport pokrycia kodu testami jednostkowymi przy każdym uruchomieniu testów.

Wszystkie zagadnienia są dokładnie omawiane na praktycznym przykładzie aplikacji rozwijanej w trakcie trwania kursu.

Ponadto czekają na Ciebie zadania, które pomogą ci ugruntować nowo zdobytą wiedzę, a kod do każdego wykładu oraz zadania będzie umieszczony na platformie GitHub.

Who this course is for:

  • Jeśli chcesz dowiedzieć się:
  • Jak tworzyć dobre testy jednostkowe,
  • Jak korzystać z frameworka JUnit 5 i Mockito 2,
  • Jak tworzyć testy jednostkowe w metodyce Test Driven Development,
  • Jak tworzyć testy zgodnie z najlepszymi praktykami i konwencjami,
  • Na czym polegają zasady FIRST oraz CORRECT,
  • Czym jest Code Coverage,
  • Jak korzystać z biblioteki JaCoCo,
  • ... to ten kurs jest właśnie dla CIEBIE!

Instructors

Dawid Nowak
Software developer
Dawid Nowak
  • 4.6 Instructor Rating
  • 502 Reviews
  • 3,371 Students
  • 4 Courses

I have been working in the IT industry for quite a while, but it was a little bit more than three years ago when I decided to finally direct myself towards a specific goal: to grow as a Java programmer.


In my day to day work I focus mostly on backend technologies. My go to tech stack is Java with Spring and Hibernate. I also like to keep myself up to date with the current trends and news from the IT world.


Recently I have become very interested in online courses and in spreading my knowledge to those who are passionate about IT and are eager to learn. :)


Other than that I am a fan of fantasy and science fiction genres. I am also interested in astronomy and the video game industry.

Paweł Ćwik
Fullstack developer
Paweł Ćwik
  • 4.5 Instructor Rating
  • 655 Reviews
  • 4,258 Students
  • 8 Courses

I started my programming career around seven years ago as a Java back-end developer. Over time, I was moving towards system integration and communication, with a strong emphasis put on the REST, JMS and the Spring framework. Then I focused on the front-end development and now I work with the React JavaScript library and the technologies related to JavaScript itself. That's all when it comes to my professional experience. 

 

Besides that three years ago my adventure with teaching programming began and it's been continuing since then. It gives me a lot of satisfaction, to the point where it has almost become my second, constantly developing, career.

 

Privately, I have a wonderful wife, and I am the father of two kids, who make sure that I do not focus solely on my work.

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.