Skip to content
Episode[14]: Unit Testing 101 episode artwork

EPISODE · Apr 11, 2020 · 1H

Episode[14]: Unit Testing 101

from null++: بالعربي · host Mohamed Luay, Ahmad Alfy

Because of the high complexity and depth of this episode, we will share with you the episode outline and the topics discussed here as a reference. Episode Outline: What is unit testing? test for the smallest possible pieces of your program. كل حاجة فيها سليمة بس لوحدها - سلطان السكري Why Unit Testing Help the developer deeper understand the logic he/she is implementing. Help developer writes more modular, loosely coupled code. Make it faster to develop and debug. (You can fake all the possible scenarios and see how the test is responding to each) Find bugs early. Help with documenting the code you are doing. Help when it comes to refactoring. It helps to automate the development process and decrease deployment-related friction. Unit Testing Best Practices 1- Identifying Units: When it comes to the unit you are testing, you need to answer three questions. a. What is the output of this unit? b. What helper functions that this unit is using to achieve that output? c. Are there any side effects resulting from this unit. (it modifies state variables outside its scope). 2- Naming & Description Why? it makes the test easier to read and hence easier to figure out what went wrong. Describe & It. (This thing / should or does something) - The search function should return an array of strings matching the search keyword. - The search function should return an empty array when a keyword is not matching any. - throw an exception if the keyword is an empty string. 3- Mocking & Stubs - The unit test is 50% mocking and 50% clean code. Check Martin Fowler's article in the for more depth in mocking Check the resources section. References: Martin Fowler's "Mocks Aren't Stubs". 8 Benefits of Unit Testing. The testing introduction I wish I had. Rethinking Unit Test Assertions. Unit Tests: More Readable Describe/It Statements in Protractor/Jasmine. Episode Picks: Alfy: Dokkan Tech. Luay: Rich Dad, Poor Dad Book.

Episode metadata supplied by the publisher feed · Published Apr 11, 2020

Embed this episode

Welcome to the Fourteenth episode from null++ podcast. Today, we will be talking about a very important - underserved- topic which is unit testing. In this episode, we will walk through why unit testing is important, best practices when it comes to testing, the concepts of mocking and stubbing, and code coverage. We hope you enjoy this episode and don't forget to subscribe to the show, leave a review with your feedback and please do share the show if you find the content valuable.

Distinct summary based on available episode metadata or transcript content.

Ready to play

Episode[14]: Unit Testing 101

0:00 1:00:48

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

Frequently Asked Questions

How long is this episode of null++: بالعربي?

This episode is 1 hour and 0 minutes long.

When was this null++: بالعربي episode published?

This episode was published on April 11, 2020.

Can I download this null++: بالعربي episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!