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 203698 - [71cat] malfunction of unit test for web app
Summary: [71cat] malfunction of unit test for web app
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Lukas Jungmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-14 08:57 UTC by muellermi
Modified: 2012-04-12 09:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test project (14.97 KB, application/x-gzip)
2012-04-11 00:57 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2011-10-14 08:57:32 UTC
Product Version = NetBeans IDE Dev (Build 201110120600)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) Client VM 21.0-b17

- create new wab app, using CDI, JSF
- create class:
package beans;

/**
 *
 * @author muellermi
 */
public class NameValue {
    private String _name;
    private String _value;

    public String getName() {
        return _name;
    }

    public void setName(String name) {
        this._name = name;
    }

    public String getValue() {
        return _value;
    }

    public void setValue(String value) {
        this._value = value;
    }
}

- create test:
/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package beans;

import static org.junit.Assert.assertEquals;
import org.junit.Test;

/**
 *
 * @author muellermi
 */
public class NameValueTest {
    
    @Test
    public void testName() {
        System.out.println(" test Name");
        NameValue instance = new NameValue();
        String expResult = "John Doe";
        instance.setName(expResult);
        assertEquals(expResult, instance.getName());
    }


}
- in project tree, on project WebAplication [or ChoosenName], right click, test
--> test passes
- in project tree on test file, right click, test file
--> test fails "unknown caused an Error: Forked Java VM exited abnormally..."

notes: 
- no such strange behavior for Java (non web) application
- single test had been ok with older build (today I only checked with 20111012 and 20101010, older builds are de-installed. Thus I don't know since which build ther is such a malfunction)
Comment 1 David Konecny 2012-04-11 00:55:57 UTC
Lukas do you want to look at this issue? If not pass it to me. I'm attaching test project. The issue seems to be:

Created dir: /home/dev/projs/WebApplication212/build/test/results
WARNING: multiple versions of ant detected in path for junit 
         jar:file:/home/dev/main/nbbuild/netbeans/java/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
     and jar:file:/home/software/glassfish3.1.1/glassfish/modules/ant.jar!/org/apache/tools/ant/Project.class
Exception in thread "main" java.lang.NoClassDefFoundError: ${run/jvmargs/ide}
Caused by: java.lang.ClassNotFoundException: ${run.jvmargs.ide}
Comment 2 David Konecny 2012-04-11 00:57:05 UTC
Created attachment 118092 [details]
test project
Comment 3 Lukas Jungmann 2012-04-11 12:44:29 UTC
main#d6310728400e
Comment 4 Quality Engineering 2012-04-12 09:58:15 UTC
Integrated into 'main-golden', will be available in build *201204120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d6310728400e
User: Lukas Jungmann <jungi@netbeans.org>
Log: Bug #203698 - [71cat] malfunction of unit test for web app