How to pass result parameters to/from separated verification point?
Could anyone please help me?
I use Rational Robot to automate web application (Robot is customer's requirement). There are few pages in our application but a lot entrance points. To verify page is what it should I use standart verification points, created as separate functions (for I user the same VP more than once), and I call them as CallScreept <VP_Name>. The question is - How can I pass result of Verification Point from VP_function to main screept to ananlize my further action? Now I declare variables as global, but they get 0 when passed from VP to main screept
Re: How to pass result parameters to/from separated verification point?
1. Global Variables have the scope of the script they are executed in. So, if you have:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">'$include "Global.h"
callscript "mynameisjonas"</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">and you also include Global.h in mynameisjonas.rec, those will be separate instances. That's why you get 0.
2. Instead of using scripts, to call scripts which are VPs, consider converting your VP scripts into functions. Then, you can create scripts that follow more along the lines of simple test cases, or even full test scenarios.
3. You can create a Verification Point library (a script that only has verification points declared as functions) in any other scripts (NOTE: this must be a .rec file in order to have VPs.) I use this method across test cases and test scenarios for verification points that get used across all tests. The advantage is that the most widely used VPs are in one file, so if there are drastic changes to the AUT, you only have to update one set of baselines.
4. I use several different methods, so the above method is not the only suggestion I have, but it's a start.
There are 3 types of engineers: Those who can count, and those who can't.