Hi Hong, zhang Hong wrote: > Hi Fredrik Haegg, > > Thank you very much! I appreciate your detailed explaination, and I have > understand clearly. > Recently, I am learning the automatic testing method about Resource test. > Therefor, I have > some questions about basic options, such as New and Close document, dialogs > or windows.
No problem. Keep asking. : ) > Besides, How to check if a document close correctly? > I try to count the number of current document. if the number decrease, it > shows that the document > has closed correctly? Or do you have other better method? Yes, that is probably the best method (GetDocumentCount before and after you close the document). Best wishes Fredrik > Best wishes > Zhang > > > > > Zhang Hong > Beijing Redflag Chinese 2000 Software CO.,LTD > Email:[EMAIL PROTECTED] > 2008-04-09 > > > > 发件人: Fredrik Haegg > 发送时间: 2008-04-08 18:38:46 > 收件人: [email protected] > 抄送: > 主题: Re: [qa-dev] [Automation]question about "DialogTest" > > Hi Zhang, > > zhang Hong wrote: >> Hi all, >> I have some questions about automation testing as following: >> >> In Resource test scripts, function "DialogTest" is used often. >> 1. When I read this function, I don't know "gDasNicht=0" stand for what? > > 1. gDasNicht is a very old variable. Translated, it means "gThatNot". > When it was used, gDasNicht = 1 meant that the "In Place Translation > Feature" should _not_ be used. But it's not used anymore. > >> 2. When I call this funtion to test a window, it will create a snapshot for >> this window(gbSnapShot = TRUE). >> what is the reason to save screenshot? And should I check each picture >> manually? > > > 2. Dialogtest is for Resource-testing only. It is simply a good thing to > to be able to see how the office looked like before an error occurred. > > Example: let's say you let the Resource-tests run last night, in the > morning you come to work, sees that something was wrong, and if you > have a snapshot of the office at the time it happened, you can see what > it looked like by just opening the file, instead of trying to run the > test again. > > Could give a clue about caused the problem. And thereby save you time. > > But the "usual" testing can usually tell you exactly what went wrong, > that's why it's only used in the resource-tests. > > >> The other question is about creating a new document. >> 1. How to check the new document is create correctly? > > You have to remember what the Testtool "sees". It can only see the > things which has been declared for the dialog it currently is set to. > > So, if you want to know something really is where you think it is, > you have to compare what you think should be there, with what the > testtool reads out from the office. > > Example: > I make a new Writer Document. But the Testtool doesn't seem to "find" it. > So I want to know it's really there. > Then I set the Kontext to "DocumentWriter", I try to write something > into the new document, then I read out what I just wrote, and compare it > with what I wrote. > > If what I wrote isn't what I get back, something is wrong. > > I know this is a bit "much" to do only to make sure something is there, > but it's the way it works. The testtool cannot "see" if a dialog is > there or not. But it can set it's focus (kontext) to the dialog, and try > to, for instance, push a button in the dialog. If it works, then it's > there. > > >> 2. Is it correct to use the below method to check? How to sure this >> document is the new document? >> Kontext "DocumentCalc" >> '/// check for Calc Document >> Call DialogTest (DocumentCalc) > > Well, if DocumentCalc has been correctly created, it should work. > But, this doesn't tell you if the document is working or not. Only if > it's there. (and then a screendump will be made) > To be _sure_ you have to test it like how I described here above. > But then it's no resource-test. > > > Best wishes > Fredrik Haegg > > -- Sun Microsystems GmbH Fredrik Haegg Nagelsweg 55 Software 20097 Hamburg Phone: +49 (0)40 23646 634 Germany Fax: +49 (0)40 23646 650 http://www.sun.de mailto:[EMAIL PROTECTED] Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
