PDA

View Full Version : [OPEN] Viewing screenshot comparisons in Sencha Test



firefoxSafari
9 Jan 2019, 1:59 PM
I recently downloaded a trial of Sencha Test and have been going through the docs. I've gotten everything to work so far except for one issue. I tried the screenshot comparison functionality. I can see in the archive server where it generated the baseline image, a new image, and a diff image. This looks great. However, when I try to view the archived results in Sencha Test, there is a broken image icon where the comparison image should be. The archives for the tests themselves as far as passing etc are viewable, it's just the image that's missing. The tests succeed or fail properly based on the image changing, it's just viewing the image from the failed test.

Is this a known issue with the current version or is it possible I have some configuration wrong?

daniel.gallo
9 Jan 2019, 4:08 PM
We've seen one other report of this issue, but haven't been able to replicate it.

I'll send you a private message to request some further details from you.

Thanks.

daniel.gallo
10 Jan 2019, 2:13 PM
It looks like you're running in to a file path length limitation on Windows. When Sencha Studio retrieves a resultset from an Archive Server instance, it downloads the zip for the requested run, and extracts its contents (including the screenshot files) locally for subsequent display in Sencha Studio.

In the example you sent me, one of the screenshots would attempt to be loaded via this file URL:


file://C:/Users/ADMINI~1/AppData/Local/Temp/2/Sencha-Studio/session-d5885810-1520-11e9-96ca-576341b3b58d/2019.0.10.13.45.4/775d74e0-14f4-11e9-a0a8-e93e0f778219/Applications/ExtJasmine/New-Scenario-1/MyPanelSpec2.js/When-MyPanel-is-Rendered/chrome71windows-TestPanel-diff.png

The length of this path exceeds the limit on Windows, which is 260 characters.

I have logged this as an issue for us to investigate further.

For now, one way to try and work around the issue is to shorten your scenario names, test suite names, and spec names, as they're incorporated in to the overall folder structure.

You can also tell Sencha Studio to extract the resultset in a location that's not within your user directory, so as to shorten the overall path length slightly.

This can be done as follows:

1. Create a new folder "C:\tmp"
2. In Sencha Studio, go to Preferences (cog/gear icon in top-right corner)
3. Under the "Test" tab, check the option labeled "Save archived test results"
4. Set the path to "C:\tmp"
5. Restart Sencha Studio

Then try viewing the screenshot comparison results again. The earlier screenshot path will now be slightly shorter:


file://C:/tmp/local_tests_area/Applications/ExtJasmine/775d74e0-14f4-11e9-a0a8-e93e0f778219/Applications/ExtJasmine/New-Scenario-1/MyPanelSpec2.js/When-MyPanel-is-Rendered/chrome71windows-TestPanel-diff.png

firefoxSafari
11 Jan 2019, 6:58 AM
Thanks for the fast reply! The workaround with changing the "Save archived test results" path works well for me.