[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qftestJUI] how to compare two files in qftestjui?
Hello Huawei, the easiest way to do this is to use an "Execute shell command" node to run a diff command on the standard and generated versions of the file. Follow this with a "Wait for process to terminate" node and wait for exit code 0. Wrap the whole thing in try catch to convert the "UnexpectedExitCodeException" exception to an error: + Try + Execute shell command: diff ... + Wait for process to terminate: expected exit code 0, timeout ~5000 + Catch UnexpectedExitCodeException: Set max error level to error As a bonus, you'll automatically get the differences between the files logged as output from the diff command next to the UnexpectedExitCodeException. Of course you can also use jython to read the files line by line and compare these. It's not too difficult. Best regards, Greg Huawei Luo <hluo@?.com> writes: > my application will generate a xslt document, which is stored > somewhere in disk, I need to compare this file with a standard > version, is there any way I can create a procedure using scripting > with qftestjui to do this? > > Thanks a lot > huawei -- Gregor Schmid Gregor.Schmid@?.de Quality First Software GmbH http://www.qfs.de Tulpenstr. 41 Tel: +49 8171 919870 DE-82538 Geretsried Fax: +49 8171 919876