DEV Community

AI_Dosage
AI_Dosage

Posted on

1

Testing

Problems with manual testing:

  1. Difficult to write effectively
  2. Impacts actual program
  3. Very hard to read
  4. Only a temporary fix

Automated tests:

  1. Results displayed in an informative way
  2. Test files are different from source code
  3. Output is easy to read and understand
  4. Guarantees code works as expected
  5. Instantly see if anything has broken when making changes

Unit Tests:
Gurantee an individual piece of code or function work as its supposed to
Integration Tests:
Used when adding new code to already existing code to ensure changes dont break.
End to End Tests:
Timeconsuming , run from start to end for all application functions , methods etc

Behavior Driven environment is like writing a plan before you write your program. You write test before actual code.

Red, Green & Refactor

  • write tests even though they will fail
  • write easiest code to pass the test
  • Go back and improve the code
  • repeat

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs