Difference between revisions of "Test suite"

From ConTeXt wiki
(fix the links)
(Deleted obsolete material about now-defunct contexttest project. Point to 7zip file on PRAGMA site. Show how to find a usage example within the archive.)
Line 1: Line 1:
 
== What is it? ==
 
== What is it? ==
  
There is a project working on creating a test suite for ConTeXt.
+
The test suite is a set of files that exercise many ConTeXt features and are used by Hans for testing releases.
The homepage is [[https://foundry.supelec.fr/projects/contexttest ConTeXt Test project]].
 
  
The mailing list can be accessed through the [[https://foundry.supelec.fr/mail/?group_id=21 Lists]] section, and in the  [[https://foundry.supelec.fr/scm/?group_id=21 SCM]]
+
== Where is it? ==
section you can find the actual test files.
 
  
=== Who can/should submit new tests? ===
+
They are on the PRAGMA site [http://www.pragma-ade.nl/context/latest/cont-tst.7z here as a 7zip archive].
  
* Anyone.
+
== How can they be useful? ==
* But since Hans and Taco are busy enough, users, even beginners, are the ones expected to submit new tests.
 
  
=== Who REALLY should submit new tests? ===
+
On the mailing list, Hans sometimes points one to minimal examples of a feature being asked about.  You can recursively grep through the (uncompressed) archive to find the example.  For example, I had asked about coupled problems and solutions, for which the relevant mechanism is blocks Hans: "(there are some examples in the test suite under blocks)."  After unpacking the archive (into <code>/tmp/doc/</code>), the following command located the examples:
  
* If a bug that you encountered gets fixed (on the mainling list).
+
<pre>
* If a new feature is implemented on your request.
+
$ grep -r -n  --include='*.tex' '\<block\>' /tmp/doc/
 
+
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:89:\chapter{Normal block use}
=== How to view the existing tests? ===
+
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:91:    % test normal block use
 
+
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:164:    % test nested block
In the [[https://foundry.supelec.fr/scm/?group_id=21 SCM]] you can learn how to connect to the repository through subversion, or you can browse the current repository of tests online.
+
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:171:\startquestion Is this a question in a nested block? \stopquestion
 
+
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:178:Here we call for the nested block:
== How can I join in? ==
+
</pre>
 
 
=== Join the mailing List ===
 
 
 
In the [[https://foundry.supelec.fr/mail/?group_id=21 Lists]] section of the server, you will find the contexttest-commits mailing list. The list is not only for commits, it is also the discussion forum of the people working on tests. If you want to do any kind of work for the test project, please subscribe to this list first.
 
 
 
=== Submit new tests ===
 
 
 
* create an account on https://foundry.supelec.fr/projects/contexttest
 
* click on <code>[Rrequest to join project]</code>
 
* {{todo|write notes about installing/using svn}}
 
 
 
=== Any easier way to do that? ===
 
 
 
* No yet, but it would be nice if a simpler way existed. Perhaps in the future ...
 
 
 
=== How can I see/compare the results and judge if they're OK? ===
 
 
 
At the moment, we are still in the collecting phase. There is no point in setting up the testing infractructure until there are at least some tests to be run. What we need right now are simply test files.
 

Revision as of 14:33, 4 February 2019

What is it?

The test suite is a set of files that exercise many ConTeXt features and are used by Hans for testing releases.

Where is it?

They are on the PRAGMA site here as a 7zip archive.

How can they be useful?

On the mailing list, Hans sometimes points one to minimal examples of a feature being asked about. You can recursively grep through the (uncompressed) archive to find the example. For example, I had asked about coupled problems and solutions, for which the relevant mechanism is blocks Hans: "(there are some examples in the test suite under blocks)." After unpacking the archive (into /tmp/doc/), the following command located the examples:

$ grep -r -n  --include='*.tex' '\<block\>' /tmp/doc/
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:89:\chapter{Normal block use}
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:91:    % test normal block use
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:164:    % test nested block
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:171:\startquestion Is this a question in a nested block? \stopquestion
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:178:Here we call for the nested block: