[liblouis-liblouisxml] Re: [liblouis] r642 committed - Added version2 of runHarness, based on nose tests....

  • From: Mesar Hameed <mesar.hameed@xxxxxxxxx>
  • To: Christian Egli <christian.egli@xxxxxx>
  • Date: Wed, 23 May 2012 20:03:22 +0100

On Wed 23/05/12,15:06, Christian Egli wrote:
> Mesar Hameed <mesar.hameed@xxxxxxxxx> writes:
> > Nose is more flexible than unittests, and the major advantage over
> > unittests is that it allows for test generators
> 
> In what way would test generators helps?

unittests mean that each test has to be written in python, much like doctests 
but more closely integrated with the actual project code, i.e. 
each test is a function.

nose allows for test generators, which mean that these tests can be created 
programmatically instead of human written, i.e. data driven, 
which is suitable for our situation.
Each test can then be submitted to the infrastructure and delt with as normal, 
with minimal overhead.

> > Both with v1 and v2, json is being used to provide the data, but with
> > v2 we dont have to do any counting, and it takes care of reporting.
> 
> That sounds very good. I generally like the direction in which the
> harness is going (use json as input format, base on existing test
> framework, etc).

Yes, I had your consern about frameworks in mind when investigating 
alternatives to runHarness v1.
Moving to json will also remove much of the p2/p3 issues regarding unicode, 
since the json parser will give us the write type depending on version.

> We probably need to consider the general use case. Most
> of the time you just want to compare the translation of liblouis with a
> known good translation, i.e. string comparison.

Agreed, this was and continues to be easy, its driven by the data defined for 
each test in the json file.

> There are some other more obscure scenarios where you want to test cursor 
> positions, inpos
> arrays or back translations. Maybe the test framework should make the
> main use case easy and concise and make the others possible, i.e. make
> it easy to add just translation tests and have a (less concise)
> possibility to test the other stuff.

Yes, I will work on this, v2 makes this very straightforward, with minimal 
amount of new code.

Thanks.
Mesar
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: