Transcript for:
Software Development and Testing Overview

Software. It's not like engineering something easy like a bridge, where you start with a blueprint, build it to spec, then forget about it. Software is dynamic with a lot of moving parts and requirements that evolve over time. Developers build apps on top of a mountain of abstractions and nobody fully understands how every layer works.

That's okay because we just need to make sure that our code matches the requirements of the product. Test-driven development is scientifically proven to reduce defects and improve the maintainability of a codebase, but it does require some additional effort. One option is manual testing, where a human being clicks on every button and fills out every form, then assigns a bunch of Jira tickets so they can be backlogged by the developers.

But that's not very efficient for a large-scale product. A better approach is to use automated testing tools that allow developers to write code for the sole purpose of testing the main application code. In a codebase, you'll often find files that end in.test or.spec. Inside, you'll first find a line of code that describes the feature or thing that's being tested. That's known as a test suite.

and it contains one or more individual tests. An individual test usually starts with it, followed by a description of what is being tested. The idea is to describe the behavior of the code in human-readable terms.

Inside the test, the code will be executed, then one or more expectations or assertions are used to check that the code produces the expected result. If the expectation returns false, then the test fails. If it's true, it passes.

Test runners, like Jest or Karma, can run all your tests automatically in the background, or on a continuous integration server before you deploy. Now, there are many different automated testing strategies that you should be aware of. At the most granular level, we have unit testing, which is designed to test individual functions or methods. Like, does this function return the proper value when given the arguments of A and B? Then we have integration testing to determine how well different components or modules work together.

Like, is the component able to use the database service to get data from the server? At the highest level, we have end-to-end testing, which usually happens in a mock browser or device and simulates actual user behaviors like clicking on buttons and filling out forms it's like having a robot to do all your manual testing for you and that's not all there are many other types like performance and smoke testing which i'll explain in my upcoming test driven development breakdown hit the like button if you want to see more short videos like this thanks for watching and i will see you in the next one