PDA

View Full Version : Sample test does not run on Windows 10



Anyfin
3 Apr 2017, 5:34 AM
Hi folks!

I'm new to Sencha and so for Sencha Test. On my Windows 10 machine I installed the latest Sencha Studio and imported a sample project for ours. Following tutorials I created a test suite with the sample "it should pass 1 = 1" test. But I cannot run this test, neither via IDE nor CLI.

On the scenario I selected my local Chrome browser and the sample test. When I click on RUN, the browser selection on the right gets updated with gray bullets or void but nothing else happens. Changing the scenario's test type to "Webdriver" or "In-browser" does not change anything in regard for the outcome.

I also tried to execute the test via CLI but no success either. I always end up with this message: "Sencha Test v2.0.2Error: Sencha Cmd install directory not found : C:\Users\[MY_PROFILE]\bin\Sencha\Cmd." That's right, my Sencha Cmd installation is located in C:\dev\Sencha\Cmd. Where's the configuration to change that stc can find Sencha Cmd?

Any hints how to get the tests run? Is an archive server mandatory to run the tests? Is there anything that I might have missed? Using Google was no help so far.

Thanks
Anyfin

EDIT:
After some try-and-error runs I ended up with this message:
System error: TypeError: Cannot read property 'prototype' of undefined at constructor.applyMainView (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:96086:21) at constructor.setter [as setMainView] (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:10545:57) at constructor.<anonymous> (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:10524:24) at constructor.initMainView (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:95871:16) at constructor.onBeforeLaunch (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:95827:12) at constructor.callParent (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:12493:32) at constructor.onBeforeLaunch (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:96125:14) at constructor.callParent (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:12493:32) at constructor.onBeforeLaunch (http://192.168.2.45:8700/app/Application.js?_dc=20170403171600:50:14) at constructor.onProfilesReady (http://192.168.2.45:8700/ext/build/ext-all-rtl-debug.js?_dc=20170403171600:95761:12)

joel.watson
4 Apr 2017, 6:36 AM
Hi--

Have you created a dev/testing/prod build for the app prior to executing the tests? I ask because the errors you're reporting are coming from the framework itself, which might suggest you need to build/run app watch prior to running the test.

Anyfin
5 Apr 2017, 2:04 AM
Yes, prior I executed "sencha app watch" and the application is accessible. The path variables are also correct if Sencha Cmd is executed manually. Maybe a look at Sencha Studio screenshot is helpful here: 56132

Anyfin
5 Apr 2017, 4:18 AM
I checked that but still no success. I noticed that there was no installation dir setting for Sencha Cmd in my Studio so I applied the correct dir. But still no success in running any test.

Anyfin
5 Apr 2017, 8:20 AM
So I think the main error here was to NOT install Sencha Cmd and Sencha Test into the installer's recommended folders. After reinstalling the tests seem to run. It is also NOT SUFFICIENT to just checkout the project and write tests. The project must be compiled successfully before tests are executed.