network config

This commit is contained in:
2023-03-27 00:51:28 +01:00
committed by Wookey
parent 5233b0e797
commit cf3b6c23e7
3 changed files with 66 additions and 33 deletions

View File

@@ -10,14 +10,7 @@
<h1>Handbook Troggle - Automated Testing</h1>
<h2>Troggle Automated Testing</h2>
<p>We have a suite of more than 100 <a href="https://en.wikipedia.org/wiki/Smoke_testing_(software)">smoke tests</a>
which are run manually by troggle programmers like this:
<pre><code> troggle$ python3 manage.py test --parallel auto -v 1</code></pre>
or, if someone has made a mistake and the tests interfere with each other:
<pre><code> troggle$ python manage.py test -v 1</code></pre>
<p>Running the tests in parallel works on the server too (without the 'auto' keyword on Django 3.2 though).
<p>We have a suite of more than 100 <a href="https://en.wikipedia.org/wiki/Smoke_testing_(software)">smoke tests</a>.
<p>These are 'end to end' tests which very quickly show whether something is badly broken. The tests are for two purposes only:
<ul>
@@ -29,6 +22,23 @@ which allow us to home in on the precise part of the code which has been broken
<p>We do also have a handful of unit tests which just poke data into the database and check that it can be read out again.
<p>
The test code is all in <a href="http://expo.survex.com/repositories/troggle/.git/tree/core/TESTS/"><var>troggle/core/TESTS/</var></a>.
<h4>Running the tests</h4>
The tests are run manually by troggle programmers like this:
<pre><code> troggle$ python3 manage.py test --parallel auto -v 1</code></pre>
or, if someone has made a mistake and the tests interfere with each other:
<pre><code> troggle$ python manage.py test -v 1</code></pre>
<p>Running the tests in parallel should work on the server too (without the 'auto' keyword on Django 3.2 though)
but they fail with the message
<pre>
(1044, "Access denied for user 'expo'@'localhost' to database 'test_troggle_1'")
</pre>
<p> On the server, running them sequentially (not parallel) is still quite quick:
<pre>
Ran 104 tests in 21.944s
</pre>
<h4>Example test</h4>
<p>The test 'test_page_expofile' checks that a particular PDF is being served correctly by the web server
and that the resulting page is the correct length of 2,299,270 bytes: