Skip to content

Commit cb442e8

Browse files
committed
updating testing page. starting unit testing page
1 parent ab2a8dd commit cb442e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+427
-18
lines changed

about-author.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
147147
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
148148
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
149149
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
150+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
150151
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
151152
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
152153
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

all.html

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6539,9 +6539,12 @@ <h2>Why is testing important?</h2>
65396539
test the application under test.</p>
65406540
<p>There are many forms of testing and they should all be used together. When
65416541
a single function of a program is isolated for testing, that is called
6542-
<em>unit testing</em>. Testing more than a single function in an application at
6543-
the same time is known as <em>functional testing</em>. <em>User interface testing</em>
6544-
ensures the correctness of how a user would interact with the software.</p>
6542+
<a href="/unit-testing.html">unit testing</a>. Testing more than a single function
6543+
in an application at the same time is known as <em>functional testing</em>.
6544+
<em>User interface testing</em> ensures the correctness of how a user would
6545+
interact with the software. There are even more forms of testing that large
6546+
programs need, such as <em>load testing</em>, <em>database testing</em>, and
6547+
<em>browser testing</em> (for web applications).</p>
65456548
<h2>Testing in Python</h2>
65466549
<p>Python software development culture is heavy on software testing. Because
65476550
Python is a dynamically-typed language as opposed to a statically-typed
@@ -6550,14 +6553,56 @@ <h2>Testing in Python</h2>
65506553
<h2>Testing resources</h2>
65516554
<ul>
65526555
<li>
6553-
<p>Google has a <a href="http://googletesting.blogspot.com/">testing blog</a> where
6554-
they write about various aspects of testing software at scale.</p>
6556+
<p><a href="http://late.am/post/2015/04/20/good-test-bad-test.html">Good test, bad test</a>
6557+
explains the difference between a "good" test case and one that is not
6558+
as useful. Along the way the post breaks down some myths about common
6559+
testing subjects such as code coverage, assertions and mocking.</p>
6560+
</li>
6561+
<li>
6562+
<p><a href="http://pythontesting.net/">Python Testing</a> is a site devoted to testing
6563+
in - you guessed it - the Python programming language.</p>
65556564
</li>
65566565
<li>
65576566
<p><a href="http://michaeldehaan.net/post/120522567217/the-case-for-test-driven-development">The case for test-driven development</a>
65586567
by Michael DeHaan explains how automation is the only way to build software
65596568
at a large scale.</p>
65606569
</li>
6570+
<li>
6571+
<p>Google has a <a href="http://googletesting.blogspot.com/">testing blog</a> where
6572+
they write about various aspects of testing software at scale.</p>
6573+
</li>
6574+
</ul>
6575+
<h1>Unit testing</h1>
6576+
<p>Unit testing is a method of determining the correctness of a single function
6577+
isolated from a larger codebase. The idea is that if all the atomic units
6578+
of an application work as intended in isolation, then integrating them
6579+
together as intended is much easier.</p>
6580+
<h2>Why is unit testing important?</h2>
6581+
<p>Unit testing is just one form of <a href="/testing.html">testing</a> that works in
6582+
combination with other testing approaches to wring out the bugs from a
6583+
piece of software being developed. When several functions and classes are
6584+
put together it's often difficult to determine the source of a problem if
6585+
several bugs are occurring at the same time. Unit testing helps eliminate
6586+
as many of the individual bugs as possible so when the application comes
6587+
together as a whole the separate parts work as correct as possible. Then
6588+
when issues arise they can often be tracked down as unintended consequences
6589+
of the disparate pieces not fitting together properly.</p>
6590+
<h3>Unit testing resources</h3>
6591+
<ul>
6592+
<li>
6593+
<p><a href="https://realpython.com/blog/python/the-minimum-viable-test-suite/">The Minimum Viable Test Suite</a>
6594+
shows how to set unit tests and integration tests for a Flask example
6595+
application.</p>
6596+
</li>
6597+
<li>
6598+
<p><a href="http://www.diveintopython3.net/unit-testing.html">Dive into Python 3's chapter on unit testing</a>
6599+
has a complete example with code and a detailed explanation for creating
6600+
unit testing with the unittest module.</p>
6601+
</li>
6602+
<li>
6603+
<p><a href="https://docs.python.org/3/library/unittest.html">unittest</a> is the
6604+
built-in standard library tool for testing Python code.</p>
6605+
</li>
65616606
</ul>
65626607
<h1>Code Metrics</h1>
65636608
<p>Code metrics can be produced by static code analysis tools to determine
@@ -6653,6 +6698,9 @@ <h1>Change Log</h1>
66536698
<h2>2015</h2>
66546699
<h3>August</h3>
66556700
<ul>
6701+
<li>Created a new page on <a href="/testing.html">testing</a> that will be fleshed out
6702+
over the next few weeks.</li>
6703+
<li>Added new <a href="/django.html">Django</a> resources, especially for migrations.</li>
66566704
<li>Added new <a href="/web-application-security.html">web app security</a> resources on
66576705
HTTPS.</li>
66586706
</ul>

api-creation.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
341341
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
342342
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
343343
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
344+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
344345
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
345346
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
346347
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

api-integration.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
239239
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
240240
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
241241
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
242+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
242243
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
243244
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
244245
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

application-dependencies.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
308308
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
309309
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
310310
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
311+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
311312
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
312313
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
313314
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

application-programming-interfaces.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
211211
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
212212
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
213213
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
214+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
214215
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
215216
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
216217
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

best-python-resources.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
343343
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
344344
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
345345
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
346+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
346347
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
347348
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
348349
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

best-python-videos.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
261261
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
262262
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
263263
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
264+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
264265
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
265266
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
266267
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

bottle.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
200200
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
201201
<a href="/caching.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
202202
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
203+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
203204
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
204205
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
205206
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

caching.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ <h3 class="panel-head"><a href="/table-of-contents.html" style="color: #fff;">Ta
182182
<a href="/docker.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Docker</a>
183183
<a href="/caching.html" class="list-group-item smaller-item active" style='font-family: "Helvetica Neue",sans-serif;'>Caching</a>
184184
<a href="/testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Testing</a>
185+
<a href="/unit-testing.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Unit Testing</a>
185186
<a href="/code-metrics.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Code Metrics</a>
186187
<a href="/what-full-stack-means.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>What "Full Stack" Means</a>
187188
<a href="/change-log.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>Change Log</a>

0 commit comments

Comments
 (0)