Data vs. Logic? Feedback appreciated....
Wanted to solicit some opinions on the best way to represent "data" vs. "logical" elements of automation... I am posting this to QTP because I am want to frame this in terms of the QTP "Action-Keyword" model.
Let me give an example so that this has some real connection to reality:
I have a test need that involves various outcomes of an action:
1. Copy a transaction, update some fields; Save. Ensure the transation is processed.
2. Copy a transaction, update some fields; Cancel. Ensure no change.
3. Copy a transaction, update fields w/some invalid input; Save. Ensure the system throws the approp. error.
The underlying action is to update input information, then "hit some button", then "do some validation."
An idea I have is to use data sheets to drive the pure "data" elements of this process, then to use "parameters" to drive the logical elements of the processing. The reason to do this is to avoid incorporating specific test case logic into an action, rendering it unusable for future neeeds. While the parameters complicate the use of the Action, they provide a means to develop Actions that can readily be reused across the application (or, so is my thinking).
Having been in automation for many years, this seems to be a recurrent theme that must be adequately addresed for successful automation. I spose the logic could be directly incorporated into the data sheets, but this seems awkward to me. For those working within the QTP Action model, how have you resolved this?
Thanks in advance,
Re: Data vs. Logic? Feedback appreciated....
It would be great if you can break this into atleast two actions.
Action1. Update/input information and hit the button
You can put Transactions into DataSheet too. And if it seems awkward then there could be different ways to do. That depends on what kind of environment you have. If you have QC, you can define one parameter for each transaction.