Fetching data from other test case
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fetching data from other test case
Hi
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, what I meant from Test Case was a Keyword Test and I am using KeywordTest and not Scripting. Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Project Variable also not static variables, you can assign/change values whereever you want
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here you go, follow the steps
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
