ConTeXt unit testing
Hi! Are there any automatic unit test for ConTeXt distribution? At least the bug with referenceformat can be catched using something like context test pdftotext test.pdf test.txt diff test.txt test.txt-good And the bug with broken footnote can be catched using just "context test". If there are unit test, where can I find them (I'd like to add more)? If there are no, any objections against adding them, and testing before releasing new beta?
Hi Yuri and Mojca, As far as I am concerned, I have a little file named « basic-test.tex » containing the lines below: eveytime I update the minimals (well… almost everytime), before doing so, I proceed as follows: 1) I make a backup copy of my existing and working context-minimals 2) I run first-setup.sh to update to the latest context-minimals 3) I typeset the file « basic-test.tex »: if everything works I keep a zipped archive of the old installation and I delete the backup copy. If the new installation doesn't work I delete the updated context-minimals and go back to my old installation (and I complain to Mojca, Hans, Taco, and the list…). Here is this little file: %% file basic-test.tex \starttext \chapter{Testing a chapter\footnote{Actually for testing footnotes in a chapter header\dots}} This file has been typeset on \currentdate{} at \currenttime, with \doifmodeelse{mkiv} {mkiv, LuaTeX version \the\luatexversion, LuaTeX revision \luatexrevision, (LuaTeX date stamp \luatexdatestamp), using the command: \crlf \type{context basic-test.tex}\crlf} {mkii, using the command: \crlf \type{texexec basic-test.tex} \crlf} ConTeXt version \contextversion. \section{Testing a section\footnote{Actually for testing footnotes in a section header\dots}} An elementary identity: $(a + b)^2 = a^2 + 2ab + b^2$. And a well-known identity due to Leonhard Euler in which the five most important numbers appear: \placeformula \startformula {\rm e}^{{\rm i}\pi} + 1 = 0. \stopformula By the way, $\int_{0}^{2\pi} \sin(x)dx = 0$, while \startformula \int_{0}^{2\pi} \sin^2(x)dx = \pi. \stopformula \startitemize[r] \item Testing items and footnotes\footnote{This is a silly remark\dots} \item\footnote{This is a silly remark, inside an item\dots} testing items and footnotes \stopitemize And a final test\footnote{This is another silly remark but outside items\dots} of a footnote. \stoptext %% end file basic-test.tex Best regards: OK On 5 juin 2010, at 17:43, Mojca Miklavec wrote:
On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
If there are no, any objections against adding them, and testing before releasing new beta?
No, just go on. Any volunteer with some ideas to start a project is welcome.
Mojca ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
%%%%%%%%%%%%%%%%%% Otared Kavian Département de Mathématiques Université de Versailles Saint-Quentin Bâtiment Fermat 45 aveue des Etats Unis 78035 Versailles cedex Téléphone: +33 1 39 25 46 42 Secrétariat: +33 1 39 25 46 44 Secrétariat: +33 1 39 25 46 46 e-mail: Otared.Kavian@math.uvsq.fr
yes we have. At next ctx meeting i will show something.(post from mobile sorry)
On 6/5/10, Yury G. Kudryashov
Hi!
Are there any automatic unit test for ConTeXt distribution? At least the bug with referenceformat can be catched using something like
context test pdftotext test.pdf test.txt diff test.txt test.txt-good
And the bug with broken footnote can be catched using just "context test".
If there are unit test, where can I find them (I'd like to add more)? If there are no, any objections against adding them, and testing before releasing new beta?
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- luigi
On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
Hi!
Are there any automatic unit test for ConTeXt distribution?
I'm thinking that we might want to set up one on a server. My idea is as follows: - set up one complete repository that's regularly updated - install ConTeXt from there and try if everything works fine - only if all tests are passed, sync to another public/default repository, else send an email to Hans, me & co. notifying about the failure Any ideas welcome. Mojca
Mojca Miklavec wrote:
On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
Hi!
Are there any automatic unit test for ConTeXt distribution?
I'm thinking that we might want to set up one on a server.
We already have a server for tests: http://foundry.supelec.fr/gf/project/contexttest/ Best wishes, Taco
On Sun, Jun 6, 2010 at 11:05, Taco Hoekwater wrote wrote:
Mojca Miklavec wrote:
On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
Are there any automatic unit test for ConTeXt distribution?
I'm thinking that we might want to set up one on a server.
We already have a server for tests:
Yes, but some metadata is missing and some architecture to actually run those tests (some tests only make sense in MKII and some only in MKIV etc.). I would definitely prefer if some function "run_the_unit_tests" existed, but we probably need to write one first. Mojca
Mojca Miklavec wrote:
On Sun, Jun 6, 2010 at 11:05, Taco Hoekwater wrote wrote:
Mojca Miklavec wrote:
On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
Are there any automatic unit test for ConTeXt distribution? I'm thinking that we might want to set up one on a server. We already have a server for tests:
Yes, but some metadata is missing and some architecture to actually run those tests (some tests only make sense in MKII and some only in MKIV etc.).
I would definitely prefer if some function "run_the_unit_tests" existed, but we probably need to write one first.
Just saying there is no need for yet another server (you cannot run tests server-side anyway). Best wishes, Taco
Taco Hoekwater wrote:
Mojca Miklavec wrote:
On Sun, Jun 6, 2010 at 11:05, Taco Hoekwater wrote wrote:
Mojca Miklavec wrote:
On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
Are there any automatic unit test for ConTeXt distribution? I'm thinking that we might want to set up one on a server. We already have a server for tests:
Yes, but some metadata is missing and some architecture to actually run those tests (some tests only make sense in MKII and some only in MKIV etc.).
I would definitely prefer if some function "run_the_unit_tests" existed, but we probably need to write one first.
Just saying there is no need for yet another server (you cannot run tests server-side anyway).
Why? I was talking about fully automatic tests, not tests like "compile and open result in the viewer". I understand that there is not too much functionality that can be tested automatically (hence, server-side), but at least some basic things can be tested. Probably, more features can be tested server-side analyzing the result pdf file using some library (though I don't know the pdf-parsing libraries sufficiently good to implement it).
Yury G. Kudryashov wrote:
Why? I was talking about fully automatic tests, not tests like "compile and open result in the viewer". I understand that there is not too much functionality that can be tested automatically (hence, server-side), but at least some basic things can be tested.
But if it fails you will most likely end up with a stuck server. Best wishes, Taco
On Sun, Jun 06 2010, Taco Hoekwater wrote:
But if it fails you will most likely end up with a stuck server.
There is --nonstopmode and "kill" ... ;) I would do the test in a post-commit hook, that sends email when there is a problem. Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
Peter Münster wrote:
On Sun, Jun 06 2010, Taco Hoekwater wrote:
But if it fails you will most likely end up with a stuck server.
There is --nonstopmode and "kill" ... ;)
I would do the test in a post-commit hook, that sends email when there is a problem.
Well, I would not object to such a service *existing*, but: - not on one of my machines - I don't want to be the maintainer either Best wishes, Taco
On Sun, Jun 06 2010, Yury G. Kudryashov wrote:
Probably, more features can be tested server-side analyzing the result pdf file using some library (though I don't know the pdf-parsing libraries sufficiently good to implement it).
Perhaps it's just sufficient to convert the pdf to an image, and compare it pixel by pixel. Then you can test nearly all automatically (hyperlinks will be difficult though). Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/
Peter Münster wrote:
On Sun, Jun 06 2010, Yury G. Kudryashov wrote:
Probably, more features can be tested server-side analyzing the result pdf file using some library (though I don't know the pdf-parsing libraries sufficiently good to implement it).
Perhaps it's just sufficient to convert the pdf to an image, and compare it pixel by pixel. Then you can test nearly all automatically (hyperlinks will be difficult though).
This is already done by a) the contexttest project at supelec (although this is incomplete, iirc) b) the fontspec v2 package (but I don't know where the tests live) Best wishes, Taco
participants (6)
-
luigi scarso
-
Mojca Miklavec
-
Otared Kavian
-
Peter Münster
-
Taco Hoekwater
-
Yury G. Kudryashov