Solved
Forum Discussion
richie
5 years agoCommunity Hero
Hey Behdad,
Can you clarify? I didnt understand where you state "In this case i try to use data transfer between this 2 step , and receive new token but can manage to use it as access token in target !"
The way i have setup token property transfer before is i have a disabled setup suite that contains the api that generates the auth token. I have a property transfer step in this setup suite that moves the auth token value to a Project level property.
I have my functional test case (containing the REST step that USES the token) within a enabled test suite. The first test step in my functional testsuite is a RunTestCase step that executes the generate auth token testcase/step that is in the disabled setup suite (which when executed updates the Project level property with the new auth token value).
My next step is my functional REST step that sources the auth token value from the Project level property.
The above approach means if you run the project, the disabled test suite doesnt execute unless its called by a functional test suite. Another advantage to this approach is that you dont have to worry about the token expiring, cos the first step in each functional test suite is the RunTestcase test step which re-executes the teststep that generates the auth token.
Does that help? As i said above, i didnt really understand what you meant, so ive kindof guessed as to what you asked.
Ta
Rich
Can you clarify? I didnt understand where you state "In this case i try to use data transfer between this 2 step , and receive new token but can manage to use it as access token in target !"
The way i have setup token property transfer before is i have a disabled setup suite that contains the api that generates the auth token. I have a property transfer step in this setup suite that moves the auth token value to a Project level property.
I have my functional test case (containing the REST step that USES the token) within a enabled test suite. The first test step in my functional testsuite is a RunTestCase step that executes the generate auth token testcase/step that is in the disabled setup suite (which when executed updates the Project level property with the new auth token value).
My next step is my functional REST step that sources the auth token value from the Project level property.
The above approach means if you run the project, the disabled test suite doesnt execute unless its called by a functional test suite. Another advantage to this approach is that you dont have to worry about the token expiring, cos the first step in each functional test suite is the RunTestcase test step which re-executes the teststep that generates the auth token.
Does that help? As i said above, i didnt really understand what you meant, so ive kindof guessed as to what you asked.
Ta
Rich