Skip to content

Instantly share code, notes, and snippets.

@boluocat
boluocat / Diffrent types of tests.md
Last active December 25, 2024 10:31
Introduction to different types of testing

Manual vs. Automated testing

  • Manual testing is done in person, by clicking through the application or interacting with the software and APIs wit the appropriate tooling.
  • Automated testing is performed by a machine that executes a test script that was written in advance.

There are some automated testing tools introduction: DevOps Software Testing Tutorials | Atlassian

The different types of tests

@boluocat
boluocat / TDD workflow.md
Last active December 19, 2024 12:58
TDD workflow

This is the TDD Workfolw.

  1. Write a test case, run it. If the test is passed, then write a new test case, run it. Until a test case is failed, set it to RED.
  2. Then write code based on this test case, run the test case, if it is passed, then set it to GREEN. Else modify the code and repeat to test it, until it is passed.
  3. After RED and GREEN steps, we can refactor the code to make it better, and don't forget to run the test.

undefined

At first time I saw the workflow of TDD, I was confused. If a test is passed at the beginning, what will happen for this test case.

@boluocat
boluocat / TDD Mantra.md
Created December 19, 2024 11:07
TDD Mantra

TDD Mantra

When learning about test driven development you'll soon cone across the "Red, Green, Refactor" mantra.

  1. Red: We write a test that does not pass. It may not even compile or execute yet.
  2. Green: We quickly write dirty code to make the test pass.
  3. Refactor: We complete and clean the code using all of our test practices.
@boluocat
boluocat / clean_code.md
Created December 19, 2024 09:34 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules