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.
Created attachment 151052 [details] IDE log Please check the attached project and: - invoke npm install on the project, after that set Mocha in project properties->Selenium testing - open Selenium Tests | browser.js - set "preferredBrowser" on line 51 to either Chrome or Firefox - set path to ChromeDriver/Firefox binary on line 46 and 50 (of course set just the path for "preferredBrowser") - right click on project and select Run Selenium Tests - Output window is opened, everything works fine - press the Re-run button in output window => tests are running, but the output window contains only "C:\Program Files\nodejs\node.exe" "C:\Users\vlriha\Downloads\MessagesMocha\node_modules\mocha/bin/mocha" "-t" "10000" "-R" "C:\Users\vlriha\Downloads\netbeans-trunk-nightly-201412111033-php\netbeans\webcommon\mocha\netbeans-reporter.js" "browser_tests/**/*.js" Done. and it is no longer bold right after the last line. So it looks like tests are finished but in reality tests are still running and there is not output in output window and there is no bubble notification about finished tests Product Version: NetBeans IDE Dev (Build 201412111033) Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
(In reply to Vladimir Riha from comment #0) > Created attachment 151052 [details] > IDE log > > Please check the attached project and: Lada, please attach also the project :) Thanks
Created attachment 151055 [details] sample project Sorry, I didn't notice this :-)
I get the following whenever I invoke run selenium tests action or the rerun action from output or test results windows. "/usr/local/bin/node" "/Users/fanis/selenium2_work/MessagesMocha/node_modules/mocha/bin/mocha" "-t" "10000" "-R" "/Users/fanis/repositories/web-main/nbbuild/netbeans/webcommon/mocha/netbeans-reporter.js" "browser_tests/**/*.js" 1..2 ok 1 Download page test should find correct title ok 2 Homepage tests should find correct title Done. and I do not see any of the other symptoms you are describing. Can you reproduce still in todays latest build (Build 20141215-2b6decbf2756)? Thanks
I can still reproduce it on Windows, I'll try Linux as well Product Version: NetBeans IDE Dev (Build 201412160001) Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
After offline attempts, the steps are: - invoke Run Selenium Tests on project - in output window, don't wait for tests to finish and press Stop button - try to re-run tests from output window using the >> button => does not work correctly - to "recover", one must invoke the Run Selenium Tests on the project again
This happens only if the started process is not let to finish normally and stop button is clicked in output window. It seems to me that the problem is in extexecution api. I see a comment like: //uncomment this if state after cancel should be the same as when completed normally in org.netbeans.api.extexecution.ExecutionService.java line 266. Probably IO stream is not closed/initialized properly or something like that happens. I am not sure how to handle it from selenium support. Petr can you please have a look and comment on this? Thank you
I'm having the same problem with Protractor even if I let the Protractor finish without stopping it. Steps are: - right click on project and run selenium tests - let tests finish - in Output window, press >> to Re-run => output window contains "/usr/local/bin/node" "/usr/local/bin/protractor" "/home/vriha/Downloads/netbeans/webcommon/protractor/netbeans-configuration.js" WARNING - chromeOnly is deprecated. Use directConnect WARNING - chromeOnly is deprecated. Use directConnect Using ChromeDriver directly... [launcher] Running 1 instances of WebDriver Done. And again, no bubble notification about finished tests, Test Results window shows "Running...". Fanis, should I report it as a new issue? Thank you Product Version: NetBeans IDE Dev (Build 201501060001) Java: 1.7.0_71; Java HotSpot(TM) Client VM 24.71-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_71-b14 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
(In reply to Vladimir Riha from comment #7) > I'm having the same problem with Protractor even if I let the Protractor > finish without stopping it. Steps are: > - right click on project and run selenium tests > - let tests finish > - in Output window, press >> to Re-run > > => output window contains > > "/usr/local/bin/node" "/usr/local/bin/protractor" > "/home/vriha/Downloads/netbeans/webcommon/protractor/netbeans-configuration. > js" > WARNING - chromeOnly is deprecated. Use directConnect > WARNING - chromeOnly is deprecated. Use directConnect > Using ChromeDriver directly... > [launcher] Running 1 instances of WebDriver > Done. > > > And again, no bubble notification about finished tests, Test Results window > shows "Running...". > > > Fanis, should I report it as a new issue? I think this is not related to this bug but to bug 249654 and should be fixed. At least I saw identical behavior while trying to fix it.
(In reply to Theofanis Oikonomou from comment #6) > This happens only if the started process is not let to finish normally and > stop button is clicked in output window. It seems to me that the problem is > in extexecution api. I see a comment like: > > //uncomment this if state after cancel should be the same as when completed > normally > > in org.netbeans.api.extexecution.ExecutionService.java line 266. Probably IO > stream is not closed/initialized properly or something like that happens. I > am not sure how to handle it from selenium support. > > Petr can you please have a look and comment on this? Thank you while debugging the above mentioned code is invoked, so it seems there is a problem with extexecution or I am not using the api the correct way, in which case I would appreciate some hints on what I am doing wrong. re-assigning for evaluation. thank you
(In reply to Theofanis Oikonomou from comment #8) > > I think this is not related to this bug but to bug 249654 and should be > fixed. At least I saw identical behavior while trying to fix it. You are right, it works fine now. Thank you
Looks like there are assertions being thrown at TestRunnerReporter:269 in case of rerun. Change org.netbeans.api.extexecution.base.input.InputReaderTask:225 to catch and report throwable and see for yourself. Looks like some state invariants Of TestRunnerReporter are being corrupted when stopped. Doeas not seem to be extexecution problem.
Making assertions better visible - web-main 6bb00f54d866.
Integrated into 'main-silver', will be available in build *201505020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6bb00f54d866 User: Petr Hejl <phejl@netbeans.org> Log: #249302 - Mocha: Rerun action does not work properly
Changeset: 688496315298 Author: Theofanis Oikonomou <theofanis@netbeans.org> Date: 2015-08-26 16:08 Message:
Thank you Petr for the more readable logging. Re-run from output window should work now as expected.
Integrated into 'main-silver', will be available in build *201508270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/688496315298 User: Theofanis Oikonomou <theofanis@netbeans.org> Log: Task #249302 - Mocha: Rerun action does not work properly