Topic "Error Checking sftp results"

Author Message
GiermoIVI

Guest


Hello
I have a script that will download data from a remote server. The script works fine, i just want to run some test cases to ensure that emails are sent when file downloads fail.

What is the easiest way to create this test case? I have try and catch etc in the code already

I ask, as i started downloading a large file , then janked out the network cable to attempt to cause the download to fail.

The program never comes out of the download process(powershell script), it just hangs there and i have to force close the script.

worst comes to worst, i cna search for .filepart showing something happened.

But id rather do this properly, and have a test case prove the code works, and not just blindly trust the try / catch

thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
GiermoIVI wrote:
The program never comes out of the download process(powershell script), it just hangs there and i have to force close the script.

Isn't it running in reconnection loop?
See option reconnecttime:
http://winscp.net/eng/docs/scriptcommand_option

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License