Forum Discussion
Hi Flora,
What do you mean by member? Can you tell a little bit more about what you're trying to do?
Hi Lucian ,
Thank you for your reply!
Sure! For example, I have a method to generate a memberID and password so that I can login using them to check some functionalities.
I have a test suite which includes a few test cases and all of those cases have the same step: generate a new memebrID, pwd and login.
My question is that is there a better way to generate the memberID in the test suite level so that all the cases under that test suite can use the memberID?
- jkrolczy6 years agoRegular Contributor
You could create a test case in your TestSuitte that would generate a memberID and password.
This would be the first testcase to run in your suite.
Not sure how you are creating these new memberID and Pwd ??
TestSuite level : Custom Properties: create variables i.e. memberID and Pwd
Using Groovy script in this test cases you can extract these from a Response
or however you know these values
Then store them into a TestSuite: Custom Properties variables i.e. memberID and Pwd
testRunner.testCase.testSuite.project.setPropertyValue( "memberID ", <your value>);
testRunner.testCase.testSuite.project.setPropertyValue( "Pwd", <your value>);Then in the following test cases where you need these values, refernce your TestSuite level
using this in the appropiate spot for your memberID or Pwd
${#TestSuite#memberID}
${#TestSuite#Pwd}
Related Content
Recent Discussions
- 15 years ago