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 271130 - Netbeans test runs have one or more Serious Problem(s)
Summary: Netbeans test runs have one or more Serious Problem(s)
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords: PLATFORM, REGRESSION, TEST, USABILITY
Depends on:
Blocks:
 
Reported: 2017-07-20 04:04 UTC by aplatypus
Modified: 2017-07-20 04:22 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (143.02 KB, text/plain)
2017-07-20 04:04 UTC, aplatypus
Details
Netbeans Run Test -- Run at around 14:10 - time shows as 12:05 (9.32 KB, text/plain)
2017-07-20 04:22 UTC, aplatypus
Details
Same test run with Gradle test (single test case) run BEFORE the attached netbeans output HTML (2.13 KB, text/plain)
2017-07-20 04:22 UTC, aplatypus
Details
Output from the above netbeans test run (4.96 KB, text/html)
2017-07-20 04:22 UTC, aplatypus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aplatypus 2017-07-20 04:04:50 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_131
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.131-b11

Reproducibility: Happens every time

STEPS:
  * I have a working Integration test script 
       - written using Spock Groovy BDD framework
  * Run clean from Netbeans
  * Close Netbeans down
  * restart Netbeans
  * When I Run the single test  in Netbeans after a few previous "gradle test" runs, then
  * The "Test Results" window just throws up an Old version of the output and test results.
  * Despite this, I was usually able to look at the Gradle HTML report which showed the correct result
  * The HTML is NOT Always correct.  I have just found that.

ACTUAL:
  * As mentioned at some point after the first 3 or 6 Test-runs the "Test Results" window just redisplays a recent failed result output
      - It is as if a successful  output does not wipe out old reports
  * In addition I have begun checking the time stamp at the bottom of the HTML reports -- These are OLD test reports too but not as frequently

al lthis is despite the Netbeans Clean, a command line Gradle clean task and me removing all the project/build directories

I have no idea where this old report comes from and it seems I'm unable to purge it from my PC as well.  Until I find out where it is kept.

The URL for the test reports is under build/ and I've removed build/

  file:///D:/work/products/FourAbs/FourAbsSrcPlugin/build/reports/tests/test/index.html

when I run just the single test from the command line using plain gradle

  * the test was successful
      - meaning I was wasting a lot of effort trying to toubleshoot a bug that was already fixed!
      - Worse is that something can be broken  by tinkering to correct a non-existant problem (I didn't this time -- Lucky)
  * The HTML report for the command line generated results has the Correct timestamp: 20/07/2017 1:21:42 PM

  * I then ran the Same single individual test from Netbeans after a clean and restart -- FAIL
      - Inspecting the time -- it said: Generated by Gradle 4.0 at 20/07/2017 12:05:01 PM 
     - At least 90 minutes BEFORE the successful test above

  * I do not know if the true results from the Netbeans run exist or not.  I didn't find anything I could say is/is not.

  * In addition the "Debug Test File" command FAIL-s
      - The test result screen is just shown
     - This is the old copy -- It looks like at some point the Netbeans testing just stops and show old output/results
     - Will not may be cannot debug

 * Repeating this happend after clean and restarting Netbeans

 * Also at some point Netbeans "Test Results" shows a blank window

This happens every time after several repeats of the testing.

EXPECTED:

 * Every test run MUST report with fidelity

 * Old reports CANNOT be kept -- That will avoid Netbeans showing WRONG information

 * Netbeans MUST report errors that have resulted from a run-time, run-time debug, test-run or failed debug test-run activities/tasks

 * Netnbeans should log these kind of things with the IDE log


Thse two line are all I got for the Run Test command CTRL/F6

INFO [org.netbeans.gradle.project.tasks.GradleTasks]: Executing: gradle :FourAbsSrcPlugin:cleanTest :FourAbsSrcPlugin:test --tests au.com.fourtel.fourabs.trip.TrainsSummaryReportSpec*, Args = [-c, D:\work\products\FourAbs\settings.gradle], JvmArg = []
INFO [org.netbeans.gradle.project.tasks.GradleTasks]: Applying init-script: TmpFileRef{Z:\$$$\SYSTEM\nb-gradle-plugin-wmason\task-init-script-baafd7b96b031d62cb99589c041343e5.tmp}


The temporary file shown does not exist.  It may be moved once the test run completes?  I don't know

We also need some kind of commands or options to Stop Gradle deamons and clean-up the Gradle and Netbeans cache-es.  I am only running gradle 4 but I can see cache files for much older versions


Final thought -- I can't say for sure -- Sometimes it is like the test run is looking for a file change that it can't see.  I've often changed data files and put things in a database and the test stays "same as before" but the command line can show a different result, even if it wasn't yet successful.  But netbeans is showing an old report.

However when I have made a change to a file that was obviously involved in the test, like the main script, then *sometimes* the testing resumes but the next or subsequent test run just goes back to showing me old results.  It has become so unreliable that I can't trust it.  I need to run tests from the command line.  

This is a BIG production environment problem with real $$  impact on our productivity.  If netbeans can't hack it we will be forced to IDEA or Eclipse
Comment 1 aplatypus 2017-07-20 04:04:57 UTC
Created attachment 164796 [details]
IDE log
Comment 2 aplatypus 2017-07-20 04:22:11 UTC
I have noticed when attaching the files.

Gradle is directing me to reports here:

    file:///D:/work/products/FourAbs/FourAbsSrcPlugin/build/reports/tests/test/packages/

Where as Netbeans is sending a URL for a HTML file under classes

   file:///D:/work/products/FourAbs/FourAbsSrcPlugin/build/reports/tests/test/classes/

I don't what the mechanism is but there is no consistiency
Comment 3 aplatypus 2017-07-20 04:22:15 UTC
Created attachment 164797 [details]
Netbeans Run Test -- Run at around 14:10 - time shows as 12:05
Comment 4 aplatypus 2017-07-20 04:22:17 UTC
Created attachment 164798 [details]
Same test run with Gradle test (single test case) run BEFORE the attached netbeans output HTML
Comment 5 aplatypus 2017-07-20 04:22:19 UTC
Created attachment 164799 [details]
Output from the above netbeans test run