ahmad sayed <[EMAIL PROTECTED]> writes: > when writing a test case we always has setup and teardown, the both these > methods will be different according to the testcase, some testcase will need > to have a gnucash without any data file, others will require this data file, > these operation will be done in the setup, > in general > > the basic testcase will be > -------------------------------- > setup() # do the required setup (e.g start gnucash if not) > testcase() > teardown() # do the required clean up close gnucash, kill gnucash > process, .... ) > > setup will be different from test case to other, in some cases we need to > open gnucash without a file, In other cases will have gnucash open with a > loaded data file, I miss writing the setup for these test cases, it will be > fixed in the next test plan version.
Note that these setups should be shared across multiple tests. I.e., you shouldn't need to write the "create a random data file" multiple times. And we have some C code that does a lot of this already which you might want to leverage. > Testing the register, > Regardless our ability to test the register it is relatively important, but > how it could be done > 1 - Create a custom class that wrap some raw events, this class used to do > some higher level actions > Like > def write_something_on_cell(x ,y, something): > press enter key for x times > press tab key for y times. > raw type (something) > > also use all possible accelerator and hot keys. > > 2 - Modify the widget code to be accessible, I prefer this but not sure how > feasible is it? , That's the big question.. It's written on a GnomeCanvas and.. quite annoying. The new register-rewrite will make it easier to test, obvioualy, but that's not finished yet. > Best regards, > Ahmed Sayed -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH [EMAIL PROTECTED] PGP key available _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel