Now testing logbook parsing: 90 tests now

This commit is contained in:
Philip Sargent 2023-02-24 22:54:47 +00:00
parent 23424313df
commit d12b862275
3 changed files with 6 additions and 5 deletions

View File

@ -396,7 +396,7 @@ explains what this does and gives extra command line options.
<p>Now run the test suite: <p>Now run the test suite:
<pre><code>python manage.py test -v 3 --traceback</code></pre> <pre><code>python manage.py test -v 3 --traceback</code></pre>
<p>This will run the entire troggle test suite of ~80 tests (it takes only a few seconds). <p>This will run the entire troggle test suite of ~90 tests (it takes only a few seconds).
<p> <p>
If you get an error, and you probably will, have a look in the source code of the test, e.g. for this error: If you get an error, and you probably will, have a look in the source code of the test, e.g. for this error:
@ -438,7 +438,7 @@ cd ../../troggle
<p>The test suite now tidies up after itself, so there should not be any temporary files left behind or local git commits that you <p>The test suite now tidies up after itself, so there should not be any temporary files left behind or local git commits that you
will need to clean up. will need to clean up.
<p>The test suite has ~80 tests but does not cover all of what troggle does and does not use any real data. You need to manually test these too, <em>after</em> you have done a full <a href="trogimport.html">data import</a>: <p>The test suite has ~90 tests but does not cover all of what troggle does and does not use any real data. You need to manually test these too, <em>after</em> you have done a full <a href="trogimport.html">data import</a>:
<br>- <var><a href="http://localhost:8000/pathsreport">http://localhost:8000/pathsreport</a></var> <br>- <var><a href="http://localhost:8000/pathsreport">http://localhost:8000/pathsreport</a></var>
<br>- <var><a href="http://localhost:8000/stats">http://localhost:8000/stats</a></var> <br>- <var><a href="http://localhost:8000/stats">http://localhost:8000/stats</a></var>
<br>- <var><a href="http://localhost:8000/people">http://localhost:8000/people</a></var> (takes a minute or so) <br>- <var><a href="http://localhost:8000/people">http://localhost:8000/people</a></var> (takes a minute or so)

View File

@ -10,7 +10,7 @@
<h1>Handbook Troggle - Automated Testing</h1> <h1>Handbook Troggle - Automated Testing</h1>
<h2>Troggle Automated Testing</h2> <h2>Troggle Automated Testing</h2>
<p>We have a suite of more than 85 <a href="https://en.wikipedia.org/wiki/Smoke_testing_(software)">smoke tests</a> <p>We have a suite of more than 90 <a href="https://en.wikipedia.org/wiki/Smoke_testing_(software)">smoke tests</a>
which are run manually by troggle programmers like this: which are run manually by troggle programmers like this:
<pre><code> troggle$ python manage.py test -v 1</code></pre> <pre><code> troggle$ python manage.py test -v 1</code></pre>
@ -56,7 +56,8 @@ which are JSON files containing dummy data which is read in before a few of the
<h4>How you can help</h4> <h4>How you can help</h4>
<p>We could do with a lot more unit tests which test small, specific things. If we have a lot of these it will make future re-engineering of troggle easier, as we can more confidently tackle big re-writes and still be sure that nothing is broken. <p>We could do with a lot more unit tests which test small, specific things. If we have a lot of these it will make future re-engineering of troggle easier, as we can more confidently tackle big re-writes and still be sure that nothing is broken.
<p>We haven't got any tests which check that the <a href="trogimport.html">input parsers</a> work. None.
<p>We have got only one test which checks that the <a href="trogimport.html">input parsers</a> work. We only have a test for <var>parsers/logbooks</var>.
<p>Have a look at Wikpedia's <a href="https://en.wikipedia.org/wiki/Software_testing">review of types of software testing</a> for ideas. <p>Have a look at Wikpedia's <a href="https://en.wikipedia.org/wiki/Software_testing">review of types of software testing</a> for ideas.
<p>If you want to write some tests and are having trouble finding something which is untested, have a look at the list of <p>If you want to write some tests and are having trouble finding something which is untested, have a look at the list of

View File

@ -31,7 +31,7 @@ Tuesday David &amp; Fred Smartarse rig first section of new pitches. Second wave
<hr /> <hr />
<div class="tripdate" id="1986_xyz">1986-07-27</div> <div class="tripdate" id="1986_xyz">1986-07-27</div>
<div class="trippeople">Mike W., Kurt Keinnamen <u>Phil Tosser</u>, </div> <div class="trippeople">Mike W., Kurt Keinnamen, <u>Phil Tosser</u>, </div>
<div class="triptitle">123 - wave 2</div> <div class="triptitle">123 - wave 2</div>
A good trip for dropping tackle. German caver Kurt (non-expo) along for the trip. A good trip for dropping tackle. German caver Kurt (non-expo) along for the trip.