问题
Is there a way to capture and store (or write to a file) the values returned in the Response? (Checkpoint values)
Using HP UFT 11.52
Thanks,
Lynn
回答1:
I figured it out. In UFT API under Standard Activities, there are File function modules including "Write to File". I added the module to the test, set the path and other properties, passed the variable to the file and it worked! Couldn't be easier.
回答2:
I mentioned this on my other answer , you can also write it programatically if you have dynamic array response please refer below: https://stackoverflow.com/a/28012383/3972994
回答3:
After running a test, in the test folder, you can find a Snapshots/LastIteration directory. In it you can find the return value for each step saved in a txt file. Pay attention that if you data drive the step, only the last iteration will be saved to file. However, in the Test's log (Test dir/Log/vtd_user.log) you can find all the iterations persisted
Thanks, Yossi
回答4:
You do not need to use the standard activities if you do this
var iResponse = this.Activity.responsebody;
System.IO.File.WriteLines(@"directorypath&FileName);
the above will write the response to the file and rewrite it for every run
来源:https://stackoverflow.com/questions/20916128/hp-uft-api-test-saving-response-checkpoint-values