Fetching data from other test case
Say I have Test 1 which creates a client record using first name, last name, dob etc using a parameter.
Then, Test 2 is to about editing client records which were created in Test 1.
Now, the first step of Test 2 is to find a client using first & last name. Is there a way the first & last name can be captured from what has been used in Test 1 parameter ? If yes, can someone please advise how do I do it ? Thanks
Solved! Go to Solution.
What you mean by TestCase here?
- Is it one TestItem
- Is it a one KeywordTests
- Is it a one function
Are you using KeywordTests or Scripting?
- If it is scripting you can use global variable in-order to access those values across all functions and units
- TestComplete have the best bet for this kind of scenarios which is Project Variables, this can be used in KeywordTests as well as Scripting. For more details: https://support.smartbear.com/testcomplete/docs/testing-with/variables/collections/project-and-proje...
Then your best option would be using Project Variable,
- Store your values into Project Variables in 1st KeywordTest
- Make use of that Project Variable in upcoming KeywordTests
This link will help you in work with Project Variable
I was also wondering how would a checkpoint work in that case.
So for Keyword Test1 I validated that client X was created using property checkpoint.
But since Keyword Test 2 edited the values of Test 1 from X to Y, how can I use checkpoint to validate that Y exist ? Specially if 'Y' is not a static value and it can be S, T or Q as well ? Thanks
Yes, but how do I do it ?
So if I use Property Checkpoint it does not give me an option to choose a variable, instead it says choose an object whose property will be compared.
Its a perfect solution. However, my application under test is written in Delphi and its WndClass in question is TomGridSite which appraently seems to be a closed application, therefore I am pretty restricted in terms of using this solution but thanks for your inputs though