cancel
Showing results for 
Search instead for 
Did you mean: 

Compare an entry in table to a filename

SOLVED
nedbacan
Contributor

Compare an entry in table to a filename

I would like to test that every filename that gets registered in the database (i.e Media table / Media_name ID) and gets uploaded to the Cloud storage.  I have a utility tool that looks like File-explorer that will display the files that were loaded to the cloud.  Here is the use case

1) User imports an Image file using the UI of the image management software under development.

2) The SQL database will update the media name which is also the file name into the Media table and add a timestamp when the file was uploaded (see attachment).

3) Next, the File will get uploaded to the Cloud after the software discovers the image checked into image table is new.

 

My verification test is to compare the media ID (which is the filename as well) in the table, and make sure it was uploaded to the cloud. 

 

Manually I would test  it by opening the Media table and search for the recent update using a SQL query ...and make sure the file registered got upload ....by comparing the media name to the filename that is shown in the cloud by opening File Explorer and opening the drive letter where the Cloud drive is mapped to. 

 

How can I capture the media id name (i.e A7BE7CEA-C36E-4E79-A2A9-A0057617E08B) entered in the SQL table and compare it to the filename (A7BE7CEA-C36E-4E79-A2A9-A0057617E08B.jpg) in File Explorer and make sure the names matches proving evidence the file did get uloaded.

 

How can I this be done with TESTCOMPLETE?

 

Thank you for your help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Compare an entry in table to a filename

Hi,

 

Yes, this should be possible.

TestComplete can get data from external databases: https://support.smartbear.com/testcomplete/docs/testing-with/advanced/working-with-external-data-sou... and https://support.smartbear.com/viewarticle/9013/.

 

As for comparison... You may try to work with the File Explorer via UI. However, I think that the cloud you are using should provide some web API and you should be able to use this API to query cloud data from TestComplete (via, for example aqHTTP object) which should be faster and more reliable.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

1 REPLY 1
AlexKaras
Community Hero

Re: Compare an entry in table to a filename

Hi,

 

Yes, this should be possible.

TestComplete can get data from external databases: https://support.smartbear.com/testcomplete/docs/testing-with/advanced/working-with-external-data-sou... and https://support.smartbear.com/viewarticle/9013/.

 

As for comparison... You may try to work with the File Explorer via UI. However, I think that the cloud you are using should provide some web API and you should be able to use this API to query cloud data from TestComplete (via, for example aqHTTP object) which should be faster and more reliable.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

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