cancel
Showing results for 
Search instead for 
Did you mean: 

What is best operation to use in this scenario, If we can't use file checkpoint?

nav
Occasional Contributor

What is best operation to use in this scenario, If we can't use file checkpoint?

In the file comparison operation, IF we have a baseline file in our files which we use as EXPECTED DATA. And if we go to web page and export a new data file(ACTUAL DATA) how can that File pulled in to  store to compare with baseline file?

I am trying to validate data in this sceanario.

6 REPLIES 6
Marsha_R
Community Hero

Re: What is best operation to use in this scenario, If we can't use file checkpoint?

Why can't you use file checkpoint?  What happens when you try?

tristaanogre
Community Hero

Re: What is best operation to use in this scenario, If we can't use file checkpoint?

The new file doesn't need to be "pulled in".  When you create the file checkpoint, in keyword tests, the first file you select will be your "actual data".  Then you indicate to use your stored "expected data" as the file to be used for the comparison. (https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/files/creating.html)

 

If you're using script code, reference the following.

 

https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/stores/file/check.ht...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
nav
Occasional Contributor

Re: What is best operation to use in this scenario, If we can't use file checkpoint?

Yes, "How can i indicate to use your stored "expected data" as the file to be used for the comparison".

This is the sceanrio:

I am working on an Inventory project, So First file i have kept in my local system as Actual Data. But Now My challenge is i will need to automate a scenario where i need go to the inventory UI and export a new report and this exported report will be downloaded in local system automatically. Now how can i compare files, First file which is already in my local system as "extected data" and the second file which is downloaded using export report functionality"(actual data).

Marsha_R
Community Hero

Re: What is best operation to use in this scenario, If we can't use file checkpoint?

It sounds like you haven't tried the File Checkpoint yet.  When you add a File Checkpoint to your test, you are prompted to pick the two files to compare, wherever they are.

 

Try this and if it fails, show us screenshots of what happened.

nav
Occasional Contributor

Re: What is best operation to use in this scenario, If we can't use file checkpoint?

Thank you for replying Marsha, I have tried file check point operation. But the problem is everytime i run this scenario, The export functionality will download a new file. So each time i need to compare the baseline file with newly downloaded file. How can this be done? Thank you

Marsha_R
Community Hero

Re: What is best operation to use in this scenario, If we can't use file checkpoint?

You can rename the new file after it's downloaded and use a specific name every time, so even if it downloads as NewFile1, NewFile2, etc., you can rename it to NewFile and then that's what you pick in the File Comparison.  It will just be an extra step in your test right after the download and before the comparison.

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors