A Bootcamp Grad’s Intro to Testing

Who is this post for: bootcamp grads who didn’t receive instruction on testing in their course
What does it cover: an overview of the types of testing you should know about, along with links to further resources

Congrats on graduating from your bootcamp! Just when you thought your brain couldn’t get stuffed with any more concepts or ideas, welcome to the wonderful world of TESTING. This blog post should get you started with some fundamentals. Good luck!

Before we dive into testing, there’s a mindset shift you need to make. When you are learning at a bootcamp, you are working at a very small scale. You don’t need to consider things like application load, test performance, pipeline execution time – you just want it to compile and run. But once you get into professional software development, scale is probably the biggest difference: we have over 4000 tests for our backend system alone. Test execution time is something we care about. Once written, an automated test can provide value for years. So part of understanding a good test strategy is understanding the scale and the timeline of an enterprise project. Now on to testing!

What is testing? Testing really means “automated” testing. Manual testing is something we avoid as much as possible because it’s not scalable or reliable (humans make errors). Testing is a critical skill for modern software developers, and most importantly, it’s often the differentiating factor in whether your tech test will pass.

What kinds of testing are there? Broadly speaking, there are 3 main types for you to worry about now. These types are in the testing pyramid below:

Pyramid of Automated Tests

Unit tests are the foundation layer. This is where you practice the famous test-driven development (TDD). We like unit tests because they are fast to run, don’t require complicated setup, drive good code practices, and give quick feedback to the developer. Not sure what to test? Start with normal, boundary, invalid and extreme testing.
Resources:
The Test Pyramid
TDD By Example by Kent Beck
Growing Object-Oriented Software, Guided by Tests by Steve Freeman and Nat Pryce
Secure by Design by all the Dans. This book is highly readable and will help you with design and testing.

Integration tests (also called service tests) test the communication between different parts. You don’t want to check details of logic here because these tests have a more complicated setup and are slower to run.
Resources
– Integrated Tests Are A Scam

Acceptance tests (also called end-to-end or E2E) tests for web apps usually through a browser (sometimes headlessly, sometimes not). They are attractive because you can see the interaction, and they are unattractive because they are SLOW and notoriously unreliable – if your network speed tanks, the test could fail because it looks for a button that hasn’t turned up. Basically you want to avoid these as much as possible, but they do have value.
Resources
Cypress testing framework

Bonus test types
As a junior developer, you probably won’t need to worry about these types of tests, but it’s good to know!

Load testing: how does your application behave when stressed, such as receiving too many requests at once or a request with a payload that’s too large to handle.
Resources
https://www.guru99.com/performance-testing.html

Penetration testing: this is normally done by a 3rd party security expert. They are looking for vulnerabilities in your application.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s