GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.fullstackpython.com — Unit Testing Unit TestingUnit testing is a method of determining the correctness of a single function isolated from a larger codebase. The idea is that if all the atomic units of an application work as intended in isolation, then integrating them together as intended is much easier. Why is unit testing important?Unit testing is just one form of testing that works in combination with other testing approaches to wring out the bugs from a piece of software being developed. When several functions and classes are put together it's often difficult to determine the source of a problem if several bugs are occurring at the same time. Unit testing helps eliminate as many of the individual bugs as possible so when the application comes together as a whole the separate parts work as correct as possible. Then when issues arise they can often be tracked down as unintended consequences of the disparate pieces not fitting together properly. Unit testing toolsThere are many tools for creating tests in Python. Some of these tools, such as pytest, replace the built-in unittest framework. Other tools, such as nose, are extensions that ease test case creation. Note that many of these tools are also used for integration testing by writing the test cases to exercise multiple parts of code at once.
Unit testing resourcesUnit tests are useful in every project regardless of programming language. The following resources provide a good overview of unit testing from several viewpoints and follow up with additional depth in testing Python-specific applications.
What else do you want to learn about testing?
1. Introduction
2. Development Environments
3. Data
4. Web Development
Web Frameworks
Django
Flask
Bottle
Pyramid
TurboGears
Falcon
Morepath
Sanic
Other Web Frameworks
Template Engines
Jinja2
Mako
Django Templates
Web Design
HTML
Cascading Style Sheets (CSS)
Responsive Design
Minification
CSS Frameworks
Bootstrap
Foundation
JavaScript
React
Vue.js
Angular
Task Queues
Celery
Redis Queue (RQ)
Dramatiq
Static Site Generators
Pelican
Lektor
MkDocs
Testing
Unit Testing
Integration Testing
Debugging
Code Metrics
Networking
HTTPS
WebSockets
WebRTC
Web APIs
Microservices
Webhooks
Bots
API Creation
API Frameworks
Django REST Framework
API Integration
Twilio
Stripe
Slack
Okta
Security
SQL Injection
CSRF
5. Deployment
6. DevOps
Changelog
What Full Stack Means
About the Author
Future Directions
Page Statuses
...or view the full table of contents.
Full Stack Python
Full Stack Python
is an open book that explains concepts in plain language and provides
helpful resources for those topics.
Updates via Twitter & Facebook. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |