HomeUser GuideMiscellaneousAutomatic Screenshot Upload Feature

13.1. Automatic Screenshot Upload Feature

While testing a software you often need to capture screenshots and make the same available as part of your testing record. Generally you would take a screenshot save it in a file and then upload the same as an attachment, this seems straight forward but in the routine when you have to do this for virtually every case you are testing, then this becomes tedious. At Test Collab we have come up with an easier solution that requires you to just use Print Screen key on your keyboard when you want the screen currently being viewed to be captured and the same to be attached automatically with the test case you are executing on your Test Collab instance.

A tool called Shrex is required to push the captured screenshots to Test Collab. It is an open source tool available at https://getsharex.com , download the tool and install it on the PC that you use for testing. To configure Sharex you need a custom uploader script like the one given below:

{
"Name": "Test Collab",
"DestinationType": "ImageUploader",
"RequestType": "POST",
"RequestURL": "https://mytestdomain.app.testcollab.com/v2/screenshots/upload?api_key=TestCollabAPIKey",
"FileFormName": "file",
"ResponseType": "Headers"
}

Please note that in the script above you need to replace https://mytestdomain.app.testcollab.com with your Test Collab instance URL and TestCollabAPIKey with the Test Collab user's API key. Here is how you can get your API key:  

Being logged into Test Collab, navigate to your profile. On profile page, you will find your API key, that can be used to access Test Collab.

 

Once you have changed the text, you can save the script in a file with the name tc.sxcu please note that you need .sxcu as extension so that it can be recognized by Sharex.

Double click the saved file, Sharex will ask for a confirmation before adding the script as custom uploader. 

Click Yes

We now need to set Test Collab (the name given in the script) as default destinations for the screenshots captured via Sharex. For this in Sharex click on Destinations and select Image Uploader Custom Image Uploader > Custom Image Uploader.

 

Another setting that is needed is for After Capture Tasks.

Make sure that Copy image to clipboard, Save image to file and Upload image to host are all selected. 

After these settings have been done for Sharex, you are now all set to get screenshots automatically uploaded while running a test case. 

When a test case execution run window is opened in Test Collab and you press Print Screen key on keyboard the screenshot will be automatically taken, saved into a file and would be uploaded with the test case being run. 

You should see the thumbnail under Screenshots section on test case run screen. 

These screenshots are available every time you view the executed case details. 

If you want you can also annotate the screenshots for this you need to add another task of Annotate Image under After capture tasks.

With this task added whenever you would execute a test you can first annotate the image being captured.

 

We have also prepared a video to demonstrate the use of automatic screenshot upload utility and it is available at https://www.youtube.com/watch?v=lR0TM10dMOs 

This page was: Helpful | Not Helpful
Test Case Management
Test Collab Support
Product Tour