Screen Shot 2017-04-19 at 10.56.58 PM.jpg
There may be some state problem with your Scenario Runner and the browser. Try closing the Running and re-opening it when problems occur.
In your workspace opened in Studio do you have your Application? I notice that the URL for your test seems to be an locally hosted app. If your workspace doesn't include your App then you will have to use "Launch application" since Studio can't make a build with no app sources.
When your test completes the web browser should be taken to a "parked" page with the text "Sencha Test Session" and "This browser window is available for work from Sencha Studio."
Normally for application unit tests the workspace opened by Studio will contain the Application code and Studio can make a special build which does not require the app to load but rather makes available all classes in the app for instantiation in tests for unit testing.
Sorry about the attachment. I'll try again.
I think I fixed up that previous attachment about a "Development Build" dialog. Take a look.
they pass, then the browser page is redirected to parking. Then:
- If I hit run, the app loads for 2 seconds, the load is not finished, tests fail, and then redirect to parking
- If I uncheck and check again, then wait for app to load, and hit run, the tests pass, then redirect to parking.
That's a weird behavior of running.
Ok, I can see your attachment now, thanks.
So how to add the App code in the Studio ? Through the Files Tab ? Also what folders to add (see attachments)
Btw, I've looked through the doc guides but couldn't find anything about how to setup and run Unit Tests, unless I missed something.
Screen Shot 2017-04-19 at 11.46.18 PM.png
Ah. If you wish to test against the app source and do unit testing you should create a workspace that includes the application code. According to your directory listing the workspace (workspace.json) is at the level of the tests directory and so won't include the application source code above it. Do you already have a workspace.json file in the directory above tests? If you do open that with Open Project menu item.
There are some good getting started docs at
which include a section on unit tests:
Some of the docs are a bit out of date but the basic principles remain the same.
Let me know how it goes. Thanks.