PDA

View Full Version : Sencha Test just hangs on "Loading Tests" state



samdelagarza
12 Aug 2016, 6:10 AM
Using Sencha Test 1.0.3.76 in Windows 8.1

I've created the following simple code based on MitchellSimmons suggestion.


describe("test2.js", function() {
it("should pass", function() {
foo();
expect(1).toBe(1);
});
});


Though it launches Google Chrome and sends it to the location I want (in this case translate.google.com) it doesn't run the unit test, it doesn't throw an error it doesn't pass or fail the expectation.

I see no logs or any other details that would help me understand what's happening. The only thing I notice is that the "Loading content" text is displayed but remains in the gray state and never changes to a different color. (i know it does this when running because I've seen it once, but it hasn't worked since then.) It was interesting that the only time this worked for me was the first time right after a restart. So I wonder if one of the underlying processes is hanging and preventing things from moving forward.

I'm willing to jump on a chat or phone call debugging session if needed.

I'm very excited about the product and really wanna see it succeed. I've setup similar items via the same open-source projects, but it's always been a bit of work to get started and maintain. Please help.

I've attached the "hung" screen and here's a link to a video of the problem.

video of problem ---->

http://www.screencast.com/t/uu3eWu2X4un
<---- video of problem

54945

samdelagarza
12 Aug 2016, 7:58 AM
So I think I found the issue, when selecting tests and I have a [+] sign next to the tests so that I can expand into the individual specs then the tests run...flawlessly. However, there are times...which is most of the time where I don't have the [+] sign next to the test cases and I cannot expand them. It is in these instances where I check the checkbox next to the test suite...but the browsers open and just hang.

Not sure why this happens or how to get it to work each time. On my windows vm, I can reselect my browsers which sort of resets this and I get the collapsible indicators. On my mac, I'm unable to get it working...ever.

Here is a picture of the expanded specs in the suite which works every time: 54947

samdelagarza
12 Aug 2016, 8:36 AM
Here is a screenshot of the same tests on my mac that are unable to run, you'll notice don't have the [+] expanded icons...

54948

mitchellsimoens
12 Aug 2016, 9:30 AM
The issue here is the redirection. You can see in Chrome it first loads at http://127.0.0.1.... which is good as it's pointing to Sencha Test's proxy but then redirects to https://translate.google.com. Redirection is not currently supported.

In your test project, do you have https or http for the url?

samdelagarza
12 Aug 2016, 11:15 AM
Thanks for your reply Mitchellsimoens,

At first look I'd agree, but that doesn't explain how on reply #2 I can see the expand icon, select the actual spec to run and it works...each and every time.

It's pointing to https://translate.google.com

mitchellsimoens
12 Aug 2016, 12:00 PM
With the Location set to https://translate.google.com, I'm able to run this test:


describe("test2.js", function() {
it("should pass", function() {
foo();
expect(1).toBe(1);
});
});

54949

samdelagarza
12 Aug 2016, 12:07 PM
Yes, I can see, but have you taken a look at the video that I posted in the original post? Does Sencha Test push out error logs somewhere I can look at? what's the exact version that you're using to repro? I can't get it working with 1.0.3.76, what's your version? I'd love to try a nightly that works for you...I'm evaluating this and really would like to use it...but haven't gotten it to work...consistently yet.

samdelagarza
17 Aug 2016, 8:50 AM
A current limitation with Sencha Test is redirecting...if the site redirects from one domain to another (not just pages within the same domain) then it fails silently. In fact, if you just configure a domain incorrectly and try to load the tests it's unable to parse your jasmine tests. So when you click run...nothing happens. I was trying their sample code...the simplest of examples. Location: http://translate.google.comTurns out this url redirects to https://translate.google.com; however, correcting the location property in the sencha studio tool doesn't really update anything underneath...so once I discovered this and made the correction it continued to fail. You actually have to restart the app before it'll take effect. Once you do enter a good url that doesn't redirect, your tests are parsed and it works.Weird that having a bad url has any bearing on test parsing...and that THERE ARE NO EXCEPTIONS OR LOGS pointing this out is disappointing. They are currently working on a fix, no date for when we can expect it out.

mitchellsimoens
17 Aug 2016, 10:06 AM
As I have said on this forum a couple times lately is that Test does not support redirection but is something that is actively being worked on as I speak.

Sencha Test isn't finicky about what URL you give it, it's that it simply does not support redirection. So if you have https://translate.google.com and it redirects you to https://translate.google.com/ (adding the trailing slash) that is a redirection from the server, Test doesn't know the redirection was because of the missing slash, the server redirected the page. If you go to https://gmail.com/ it'll completely redirect you to accounts.google.com and now the page is outside of Test whereas the proxy beneath Test (what is loaded when Test opens 127.0.0.1) needs to detect this redirection but when you get into it, it's more work than simply detecting the redirection.