We have created business components for testing for eg: One compnent each for Login, Search and LogOut.
These are individual components (3 scripts and three actions).We are trying to put them together into a another test called test4 (and action )and action .Such that we can execute all the actions.
i.e. Action4 will have something like
Just my opinion but I'd create a function for login, search and logout. Then you can pass into the function whatever you need and can be associated with any test. I am not a fan of the re-usable action concept. Please let me know if need help in creating a function library for this. There are several approaches and spending some time searching the forum on this is definitely worth it.
Supplies a string value of MyValue for the input parameter and stores the resulting value of the output parameter in a variable called MyVariable.
Sequence of events:
1. Create two Actions:
New Test -> Go to Insert -> Call to New Action -> Select "After the current step". Press OK.
2. Define Input Test Parameter:
Go to Test -> Settings -> Parameters tab -> ADD Input Parameter -> Enter the values, Press Apply and OK
For Action 1:
3. Define an input parameter for Action1:
Right-clicking on Action1 and select Action Properties -> Parameters tab -> ADD Input Parameter -> Enter the values, Press Apply and OK
Again Right-click on Action1 and select Action Call Properties -> Parameters tab -> Click on the cell under the Value column for [Parameter 1 of Action 1].
You will see a button on the right of the cell, click it. Select "Parameter" and "Test Parameter".
In the Name drop-down list, select "TestParam", which matches the input parameter created in the test settings.
Repeat Sequence 3 (Step 3) for Action 2 also. The name of input parameter for Action 2 will be “Param2”. Select [Parameter 1 of Action 1] in the Name dropdown.
4. Go to the Expert View of Action 2 and write the following code:
The above steps can be repeated if you wish to pass more Parameters