Forum Discussion
Hi,
Then, considering that TC 12.4 and up supports external project files (https://support.smartbear.com/testcomplete/docs/general-info/version-history/features-added-to-ver-12-4.html#smarter-crossbrowsertesting-integration), I would stick to Helen's suggestion: add curl files to some subfolder of your test project so that they are deployed to CBT and use it (curl) to send the screenshot.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/picture/savetofile.html describes how to save the screenshot to the file.
Hi Alex,
> Then, considering that TC 12.4 and up supports external project files (https://support.smartbear.com/testcomplete/docs/general-info/version-history/features-added-to-ver-12-4.html#smarter-crossbrowsertesting-integration), I would stick to Helen's suggestion: add curl files to some subfolder of your test project so that they are deployed to CBT and use it (curl) to send the screenshot.
That almost sounds too good to be true. In this respect, I would understand the Release Notes to mean that it is possible to use your stored test data in this way, for example. Don't you think SMARTBEAR would have made it even clearer if Windows applications could suddenly be run on cloud machines? Which keyword operation or scripting method would I use to verify this approach? Is there a way to do this that works without the TestComplete Desktop module, i. e. only with the Web module?
Edit 1: As I just saw, Helen recommended in her post above to call curl with the WshShell.run method. Should this work without a Desktop module?
Edit 2: And once again in order to double-check: Is there no way to extract these original, unaltered, i. e. not encoded, non-human readable control characters that make up my screenshot graphics file, so that I can concatenate the data myself in the required multipart/form-data format? The rest of the Javascript needed for this task I have finished long ago, and of course it works - only this darned binary data is missing.
Thanks + best regards
- TestKeks8 years agoOccasional Contributor
Wow, it works with curl, even on CrossBrowserTesting, brilliant! So at least with our TestComplete ProBundle license (i. e. including desktop module). :manvery-happy:
For now, thank you both for your expert advice!! I had already encountered curl during my research on multipart/form-data content type, but I didn't think it was possible that this could work so easily on CBT and therefore discarded it too quickly. Really great!
Thanks + best regards!
- AlexKaras8 years ago
Champion Level 1
Hi,
> if Windows applications could suddenly be run on cloud machines?
Considering that your tests are running under TestExecute on the cloud machines, it is my expectation that some Windows environment is provided for TestExecute and thus, processes that are spawned from the test must be able to run in this environment.
The simplest check, probably, would be to copy some file into some subfolder of the test project and add a test (code or keyword) that will check if the file exists in this subfolder. Deploy and run this test into CBT and check if the file was found.
> the WshShell.run method. Should this work without a Desktop module?
Not sure, you should check. But in the worst case, WshShell is just a wrapper and you always should be able to use native JScript's
var objShell = new ActiveXObject("Wscript.Shell"); objShell.exec("curl ...");
> Is there no way to extract these original, unaltered, i. e. not encoded, non-human readable control characters that make up my screenshot graphics file
Try ADODB.Stream:
http://www.motobit.com/tips/detpg_post-binary-data-url/