mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2026-02-24 21:25:19 +00:00
docum updates
This commit is contained in:
@@ -309,42 +309,48 @@ explains what this does and gives extra command line options.
|
||||
<p>Now run the test suite:
|
||||
|
||||
<pre><code>python manage.py test -v 3 --traceback</code></pre>
|
||||
<p>This will run the entire troggle test suite of over 70 tests (it takes only a few seconds).</code></pre>
|
||||
<p>This will run the entire troggle test suite of over 70 tests (it takes only a few seconds).
|
||||
|
||||
<pre>
|
||||
If you get an error, and you probably will, have a look in the test file, e.g. for this error:
|
||||
FAIL: test_page_folk (troggle.core.TESTS.tests.PageTests)
|
||||
look in the file troggle/code/TESTS/tests.py in the class PageTests.
|
||||
<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:
|
||||
|
||||
<pre><code>FAIL: test_page_folk (troggle.core.TESTS.tests.PageTests) </code></pre>
|
||||
look in the file
|
||||
<var>troggle/code/TESTS/tests.py</var> in the class <var>PageTests</var>.
|
||||
It will also say:
|
||||
File "/mnt/c/EXPO/troggle/core/TESTS/tests.py", line 266, in test_page_folk
|
||||
which means that the asssert failure in on line 266 of troggle/code/TESTS/tests.py
|
||||
and that the failure function is test_page_folk()
|
||||
<pre><code> File "/mnt/c/EXPO/troggle/core/TESTS/tests.py", line 266, in test_page_folk</code></pre>
|
||||
which means that the asssert failure in on line 266 of <var>troggle/code/TESTS/tests.py</var>
|
||||
and that the failure function is test_page_folk() .
|
||||
If you look at this you will see that line 264 is:
|
||||
response = self.client.get('/folk/index.htm')
|
||||
<pre><code> response = self.client.get('/folk/index.htm')</code></pre>
|
||||
|
||||
so this file is missing. Duh. Of course it is. We downloaded troggle from git but we didn't run
|
||||
the standalone script to generate the folk list. It is top of the list in
|
||||
http://expo.survex.com/handbook/troggle/scriptscurrent.html#folk
|
||||
the standalone script to generate the folk list.
|
||||
The quickest thing to do when installing troggle is to simply download a copy from the server:
|
||||
<pre><code> wget -O ../expoweb/folk/index.htm expo.survex.com/folk/index.htm</code></pre>
|
||||
and run the tests again:
|
||||
|
||||
<pre><code>python manage.py test -v 2</code></pre>
|
||||
|
||||
<details><summary>Click on the triangle to see how to run the <var>folk</var> script.</summary>
|
||||
<font color="blue">
|
||||
The <var>folk</var> generation script is top of the list in
|
||||
|
||||
<var>
|
||||
http://expo.survex.com/handbook/troggle/scriptscurrent.html#folk</var>
|
||||
<p>
|
||||
So do this:
|
||||
<pre>
|
||||
cd ../expoweb/folk
|
||||
python ../scripts/make-folklist.py <folk.csv >index.htm
|
||||
cd ../../troggle
|
||||
|
||||
Or just sFTP a copy from expo.survex.com
|
||||
|
||||
and run the tests again:
|
||||
|
||||
python manage.py test -v 2
|
||||
|
||||
Yeah if you were paying attention, you will see that this has done a git commit for a test file
|
||||
in the drawings repo locally.
|
||||
Sorry about that. the test harness does not yet undo that. So you will need ot manually reverse that commit: go into your favourite git tool. In VS code the command is Commit: Undo last commit
|
||||
|
||||
If you have run the test suite several times you will need to undo several commits (and delete the files producd by the test suite).
|
||||
|
||||
</pre>
|
||||
<p>The test suite has over 70 tests but does not cover all of what troggle does and does not use any real data. You need to manually test these too, after you have done a full data import:
|
||||
</font>
|
||||
</details>
|
||||
|
||||
<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.
|
||||
|
||||
<p>The test suite has over 70 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/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)
|
||||
|
||||
Reference in New Issue
Block a user