Python TDD Workflow - Unit Testing Code Example for Beginners

In this tutorial we will play the game of unit testing! šŸŽ®šŸŽ®šŸŽ® To do so - we will learn a brand new coding workflow, implementing a set of programming principles known as Test Driven Development. I will introduce you to the Three Laws of TDD (also known as the Three Laws of Uncle Bob) and show how to write a piece of software unit by unit, test by test, 2 minutes at a time! ā±ļø The end result is not only a cool encryption algorithm known as Caesars Cipher - but also a series of unit tests that ensures its accuracy and reliability. In the very end - I also have a šŸ† CHALLANGE šŸ† for you! So make sure you tune in at minute 23:10 to participate and practice your new set of skills! šŸ’Ŗ ⭐ CLONE MY CODE ⭐ ----------------------------------------- https://app.wayscript.com/lairs/45150... Also, please feel free to revise it and reshare your versions with the world! Quick instructions of how to do this via Wayscript at minute 23:50 šŸš€ JUPYTER SYNTAX šŸš€ ----------------------------------------- unittest.main(argv=[''], verbosity=2, exit=False) šŸ“½ļø RELATED TUTORIALS OF MINE šŸ“½ļø ----------------------------------------------------------------- ⭐ Classes and OOP:    • PythonĀ ClassesĀ andĀ ObjectsĀ -Ā OOPĀ forĀ Begin...Ā Ā  ⭐ Inheritance and Private Class Members:    • OOPĀ ClassĀ InheritanceĀ andĀ PrivateĀ ClassĀ Me...Ā Ā  ⭐ If _name_ == "__main__" for Python Developers:    • IfĀ __name__Ā ==Ā "__main__"Ā forĀ PythonĀ Devel...Ā Ā  ⭐ List Comprehension:    • ListĀ ComprehensionĀ -Ā BESTĀ PythonĀ featureĀ !...Ā Ā  ⭐ Software Design and Development Exam Practice Stream:    • SoftwareĀ DesignĀ andĀ DevelopmentĀ -Ā WhatĀ IĀ L...Ā Ā  ā° TIMESTAMPS ā° ----------------------------------------- 00:00 - Intro 01:19 - Three Laws of TDD ----------------------------------------- TEST 1 - Test Data Exists ----------------------------------------- 02:07 - Basic syntax 03:59 - Jupyter Notebook syntax 04:30 - Assertion 06:28 - Production Code 07:32 - 2 minutes ----------------------------------------- 07:54 - Test Input Data Type 09:12 - Test Return Output 10:16 - Test Input and Output Length 11:45 - Test Input different from Output 14:28 - Test Output Data Type 15:46 - Test Caesars Cipher 20:40 - Test More Inputs 23:10 - Challenge for you! 23:50 - How to share your code via Wayscript 25:09 - Thanks for watching! :) šŸ¤ Connect with me šŸ¤ -------------------------------------- šŸ”— Github: https://github.com/mariyasha šŸ”— Discord: Ā Ā /Ā discordĀ Ā  šŸ”— LinkedIn: Ā Ā /Ā mariyasha888Ā Ā  šŸ”— Twitter: Ā Ā /Ā mariyasha888Ā Ā  šŸ”— Blog: https://www.pythonsimplified.org šŸŽÆ Sources šŸŽÆ -------------------------------------- ⭐ Python unittest Documentation: https://docs.python.org/3/library/uni... ⭐ Professionalism and Test-Driven Development by Robert C. Martin: https://ieeexplore.ieee.org/document/... šŸ’³ Credits šŸ’³ ---------------------- ⭐ Beautiful animated graphics by: mixkit.co ⭐ Beautiful icons by: flaticon.com

Please Learn How To Write Tests in Python… • Pytest Tutorial
ā–¶ļøŽ

Please Learn How To Write Tests in Python… • Pytest Tutorial

If __name__ == "__main__" for Python Developers
ā–¶ļøŽ

If __name__ == "__main__" for Python Developers

I Built a Python Packet Sniffer… This Is What Hackers See on Public WiFi šŸ’€šŸ”„
ā–¶ļøŽ

I Built a Python Packet Sniffer… This Is What Hackers See on Public WiFi šŸ’€šŸ”„

Python Software Testing for GUI Apps - What to test? How to test it? Mini Course
ā–¶ļøŽ

Python Software Testing for GUI Apps - What to test? How to test it? Mini Course

OOP Class Inheritance and Private Class Members - Python for Beginners!
ā–¶ļøŽ

OOP Class Inheritance and Private Class Members - Python for Beginners!

TDD: Theme & Variations (Kent Beck)
ā–¶ļøŽ

TDD: Theme & Variations (Kent Beck)

Pytest Tutorial – How to Test Python Code
ā–¶ļøŽ

Pytest Tutorial – How to Test Python Code

Test-Driven Development in Python: Test First Code Later
ā–¶ļøŽ

Test-Driven Development in Python: Test First Code Later

Test-Driven Development In Python // The Power of Red-Green-Refactor
ā–¶ļøŽ

Test-Driven Development In Python // The Power of Red-Green-Refactor

How To Write Unit Tests For Existing Python Code // Part 1 of 2
ā–¶ļøŽ

How To Write Unit Tests For Existing Python Code // Part 1 of 2

Mule 4 - Create MUnit Test Cases using MUnit Test Recorder feature | MUnits for Error Scenarios
ā–¶ļøŽ

Mule 4 - Create MUnit Test Cases using MUnit Test Recorder feature | MUnits for Error Scenarios

Python Tutorial: Unit Testing Your Code with the unittest Module
ā–¶ļøŽ

Python Tutorial: Unit Testing Your Code with the unittest Module

TDD Full Course (Learn Test Driven Development with Python)
ā–¶ļøŽ

TDD Full Course (Learn Test Driven Development with Python)

Microsoft's Greed is Finally Backfiring
ā–¶ļøŽ

Microsoft's Greed is Finally Backfiring

10 Important Python Concepts In 20 Minutes
ā–¶ļøŽ

10 Important Python Concepts In 20 Minutes

Git & GitHub Tutorial | Visualized Git Course for Beginner & Professional Developers in 2024
ā–¶ļøŽ

Git & GitHub Tutorial | Visualized Git Course for Beginner & Professional Developers in 2024

Getting Started with Test-Driven Development
ā–¶ļøŽ

Getting Started with Test-Driven Development

Basic Guide to Pandas! Tricks, Shortcuts, Must Know Commands! Python for Beginners
ā–¶ļøŽ

Basic Guide to Pandas! Tricks, Shortcuts, Must Know Commands! Python for Beginners

Tips for C Programming
ā–¶ļøŽ

Tips for C Programming

A Practical and Short Intro to TDD (Test Driven Development) Using Python
ā–¶ļøŽ

A Practical and Short Intro to TDD (Test Driven Development) Using Python