This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 232656 - Changes in JavaScript are not reloaded by jstestdriver/chromium
Summary: Changes in JavaScript are not reloaded by jstestdriver/chromium
Status: RESOLVED INCOMPLETE
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-13 13:19 UTC by everflux
Modified: 2013-07-16 21:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2013-07-13 13:19:59 UTC
Product Version: NetBeans IDE Dev (Build 201307122300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15

I have a HTML5 project with jstestdriver, jasmine and jasmine-jstd-adapter in Netbeans.
When I change unit tests and use ALT-F6 to run all tests after the jstestdriver service is launched, the changes are not applied and the tests are run against the old fixture.

Expected behaviour: Since the Netbeans connector is connected to the chromium instance that is executing the jstestdriver service I would like to just run the tests and get current results.
After reloading in the browser, the changes are applied.
Comment 1 Vladimir Riha 2013-07-13 16:30:09 UTC
If I understand correctly, you run tests first, then modify test file and press Alt+F6 to run them again. And at this moment, "old" (before fixes) unit tests are executed? I tried it and it works for me

Or you want to automatically re-run tests after they are modified?
Comment 2 everflux 2013-07-13 16:45:18 UTC
I had chromium open in two tabs.
One was from HTML project with netbeans connector the other from jstestdriver with netbeans connector v as well.
Changes to unit tests were not applied until I reloaded the jstestdriver tab.
Every run with alt f6 resulted in the same old errors before browser reload.
Could be a jstestdriver problem though later I had to stop and start the service because starting tests did not do anything at all.
Comment 3 David Konecny 2013-07-15 03:13:36 UTC
This reminds me of problem described here: <https://netbeans.org/bugzilla/show_bug.cgi?id=225381#c3>. everflux, is this possibly your issues as well? Thanks.
Comment 4 everflux 2013-07-15 08:36:58 UTC
Thank you for pointing out the other issue.
I don't think it is the same problem,  since hitting F5 / reloading in the browser mitigated the problem I encountered. Especially when the Netbeans-Connector is attached to the browser executing the jstestdriver unit tests I assume that no additional user interaction is required besides executing all unit tests after changes.

I see more and more why the "Karma" testrunner was developed by heavy users of javascript unit tests...
Comment 5 David Konecny 2013-07-15 22:45:53 UTC
Thanks, I will look into this problem more today.

> I see more and more why the "Karma" testrunner was developed by heavy users of
> javascript unit tests...

Yeah, AngularJS team has a lot of say about instability of heavy daily use of js-test-driver and why they created Karma instead.
Comment 6 David Konecny 2013-07-16 02:17:53 UTC
I cannot reproduce this. I tried following:
* hg clone https://bitbucket.org/dkonecny/affable-bean
* open in NB and run project unit tests - all 4 pass
* open test/unit/controllersSpec.js and changed 2 to 4 on line 39 followed by Alt+F6

The result is that tests are re-executed and failure is reported. Undoing it followed by Alt+F6 works too. I wonder whether there is something particular on your setup which triggers this problem? Could you narrow it down please and provide some test case? Thx. I'm running JsTestDriver-1.3.5.jar.
Comment 7 everflux 2013-07-16 08:47:44 UTC
Just for the reference: Used js-testdriver version 1.3.5 as well (latest available at this time) and the jasmine adapter that was part of angular-seed project.
Context was HTML5 project, jstestdriver was running in chromium with netbeans connector attached.
Comment 8 David Konecny 2013-07-16 21:19:58 UTC
Good to know we are testing on the same setup. The affable-bean project I used for testing has HTML5 project too (named "client") and it is also angular-seed based.