Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Possible to Pass Parameters To AGR Verification Hooks?
Possible to Pass Parameters To AGR Verification Hooks? [message #58840] Thu, 16 March 2006 11:18 Go to next message
Eclipse User
Originally posted by: jhouston.bea.com

My use case is: I record a test case that creates a new file and I want
to be able to use the new file test case like a "method" in another test
suite's test behavior. I'd like to be able to add a verification hook
that can execute a file diff on the new file against a baseline, but the
baseline file will be different depending on the givn user input. Is
there any way to pass in parameters to the verification methods?

If not, is there a way to call into a verification hook without
requiring UI input? For example, in my test behavior I want to be able
to insert a callback to the underlying JUnit file without having to
launch the recorder. If this is possible (and there is a way to get the
test cases in a test suite's behavior to run in sequence) then it would
be possible to add specifica callbacks where "parameters" can be static
constants in the JUnit file.

Any help?
Re: Possible to Pass Parameters To AGR Verification Hooks? [message #61168 is a reply to message #58840] Tue, 28 March 2006 10:31 Go to previous message
No real name is currently offline No real name
Messages: 404
Registered: July 2009
Senior Member
You can't pass in an arbitrary parameter to a verification hook.
You can insert a verification hook after the creation of your file and
assume certain properties before doing the verification. For example, you
can assume a certain value for the user input and do the verification based
on that assumption. This will of course require you to create x test cases
for x user inputs. A smarter approach would be to separate the actual
creation of the file from the verification.
For example:

- Create one test case that will create the file (let's call this test case
A)
- Create multiple test cases that will only contain a verification hook to
do your verification. (let's call these test cases B1, B2, ...Bn). The
verification hooks will ignore the target parameter and only perform the
file diff to do the verification.

Under your behavior page, you can have something like

Test case A (linked to user input 1)
Test case B1 (assumes user input 1 before doing the verification)
Test case A (linked to user input 2)
Test case B2 (assumes user input 2 before doing the verification)
..
..
..
Test case A (linked to user input n)
Test case Bn (assumes user input n before doing the verification)

"John Houston" <jhouston@bea.com> wrote in message
news:dvc39k$pt4$1@utils.eclipse.org...
> My use case is: I record a test case that creates a new file and I want
> to be able to use the new file test case like a "method" in another test
> suite's test behavior. I'd like to be able to add a verification hook
> that can execute a file diff on the new file against a baseline, but the
> baseline file will be different depending on the givn user input. Is
> there any way to pass in parameters to the verification methods?
>
> If not, is there a way to call into a verification hook without
> requiring UI input? For example, in my test behavior I want to be able
> to insert a callback to the underlying JUnit file without having to
> launch the recorder. If this is possible (and there is a way to get the
> test cases in a test suite's behavior to run in sequence) then it would
> be possible to add specifica callbacks where "parameters" can be static
> constants in the JUnit file.
>
> Any help?
Previous Topic:Running Automated GUI Recorder Tests In Sequence
Next Topic:ARG and RCP
Goto Forum:
  


Current Time: Wed Aug 20 04:51:02 EDT 2014

Powered by FUDForum. Page generated in 0.02016 seconds