Difference between revisions of "Wiki regression testing"

From Apertium
Jump to navigation Jump to search
Line 1: Line 1:
'''Regression testing''' ([http://en.wikipedia.org/wiki/Regression_testing wikipedia]) is the way of testing (translating) a lot of "test phrases" and compare the result to the expected output.
'''Regression testing'''<ref>See the Wikipedia article [http://en.wikipedia.org/wiki/Regression_testing Regression testing] is the way of testing (translating) a lot of "test phrases" and compare the result to the expected output. This is very useful if you want to change a rule or word and want to get an overview of the consequences.
This is very usefull if you wants to change a rule or word and wants to get an overview of the consequences.


The regressions tests work by downloading a wiki page with the phrases and the expected output like the page [[English_and_Esperanto/Regression_tests]] and then running the translator.
The regressions tests work by downloading a wiki page with the phrases and the expected output like the page [[English_and_Esperanto/Regression_tests]] and then running the translator.


===Installation and invocation===
==Installation and invocation==
You could simply copy the script <code>regression-tests.sh</code> from an existing language pair and change the names in it.
You could simply copy the script <code>regression-tests.sh</code> from an existing language pair and change the names in it.


Line 11: Line 10:
'''Note:''' If you get output like ''<code><nowiki>regression-tests.sh: 28: [[: not found</nowiki></code>'' then try <code>bash regression-tests.sh</code> or make the script executable (<code>chmod a+x regression-tests.sh</code>) and execute it by <code>./regression-tests.sh</code>
'''Note:''' If you get output like ''<code><nowiki>regression-tests.sh: 28: [[: not found</nowiki></code>'' then try <code>bash regression-tests.sh</code> or make the script executable (<code>chmod a+x regression-tests.sh</code>) and execute it by <code>./regression-tests.sh</code>


===Output===
==Output==


For each test, the scipt prints 1) source language 2) expected (correct) output 3) actual output from Apertium.
For each test, the scipt prints 1) source language 2) expected (correct) output 3) actual output from Apertium. In some test scripts it will only print out the "failed" test (where the expected and actual output is diverging), and in other test scripts it will print out all of the tests, and a summary.

It will only print out the "failed" test (where the expected and actual output is diverging).
==All printing style==

==No-printing style==


Example:
Example:
Line 36: Line 38:


==See also==
==See also==

See [[Special:Search/Regression]] for some examples of regression tests.
* [[Special:Search/Regression]] for some examples of regression tests.





Revision as of 07:50, 30 April 2009

Regression testing<ref>See the Wikipedia article Regression testing is the way of testing (translating) a lot of "test phrases" and compare the result to the expected output. This is very useful if you want to change a rule or word and want to get an overview of the consequences.

The regressions tests work by downloading a wiki page with the phrases and the expected output like the page English_and_Esperanto/Regression_tests and then running the translator.

Installation and invocation

You could simply copy the script regression-tests.sh from an existing language pair and change the names in it.

To start, type sh regression-tests.sh on a Unix box.

Note: If you get output like regression-tests.sh: 28: [[: not found then try bash regression-tests.sh or make the script executable (chmod a+x regression-tests.sh) and execute it by ./regression-tests.sh

Output

For each test, the scipt prints 1) source language 2) expected (correct) output 3) actual output from Apertium. In some test scripts it will only print out the "failed" test (where the expected and actual output is diverging), and in other test scripts it will print out all of the tests, and a summary.

All printing style

No-printing style

Example:

en-eo	  In the 'Boards' section you can change the list of activities. 
	- En la sekcio 'Tabuloj' vi povas ŝanĝi la liston de aktivecoj. 
	+ En la 'Tabuloj' sekcio vi povas ŝanĝi la listo de aktivecoj.

en-eo	  Just untoggle them in the treeview. 
	- Simple malelektu ilin en la arbaspekto. 
	+ Nur *untoggle ilin en la *treeview.

en-eo	  You can save multiple configurations, and switch between them easily. 
	- Vi povas sekurigi multajn agordojn, kaj ŝalti inter ili facile. 
	+ Vi povas savi *multiple *configurations, kaj ŝanĝo inter ilin facile.

en-eo	  You can add multiple profiles, with different lists of boards, and different languages. 
	- Vi povas aldoni plurajn profilojn, kun diversaj listoj de tabuloj, kaj diversaj lingvoj. 
	+ Vi povas aldoni *multiple profiloj, kun diferencaj listoj de tabuloj, kaj diferencaj langoj.

See also