Use JUnit test EJB bean class

I'm using Junit test EJB 3.0 session bean class by initialize :
SessionBeanClass sbc = new SessionBeanClass()
so the object I got is just a normal object, it's not remote or local interface.
however, when I start JUnit within Jdeveloper, looks like the embed OC4J start.
this behivor is strange to me, I thought I 'm not calling EJB in this case,why the OC4J start?
this is different than running JUnit outside of JDeveloper?

Yes, this is the way JDev works -- JDeveloper notices that this class happens to be a Session bean, and when you 'run' it, it assumes you want to 'run' it in the embedded OC4J server -- though clearly it is not what you want in this case.
One way you can override this behavior is by creating a wrapper (POJO) class to be your JUnit test class, and have that class instantiate your Session bean.

Similar Messages

  • How to test servlet using Junit test????

    Hello everybody
    Does anybody know how to test an servlet class using Junit without using Cactus test . Is it possible to test a servlet using Junit without cactus test.Plz tell me the process how to test a servlet using Junit test .
    Regards
    srikant

    1) Do yoiu mean how to "run" your servlet code with sample parameter? This call manual testing with a sample run of you code. You need a web server(eg Tomcat), create a webapp with your servlet then deploy it there in order to run it.
    2) httpunit and junit are framework to write test case code that can be automated and repeatable. Plz read their doc.
    3) Your sample code me a very wrong way to retrieve and convert servlet parameters.
    Get a java toturial and servlet tutorial book and read it over the weekend. You need to get at least the basic.

  • How to use junit for a java class in netbeans

    hi friends,
    im new to java(fresher) and i need step by step creation of junit class for a java class in net beans6.5.so anybody plz explain me in detail.......

    Hi venkatakrishna.chaithanya,
    With NetBeans :
    - hit F1 to get the Help screen;
    - select the Search tab;
    - enter the word junit;
    - in the left pane, select *7 Creating a JUnit Test*;
    - read the intructions displayed in the right pane.

  • Importing Bean Class to JSP

    Hi here's my bean
    import java.util.*;
    public class leaveChange extends Object implements java.io.Serializable
         String Name;
         String Grade;
         String Pattern;
         int numDays;
         Date startDate;
         Date endDate;
    Now to use this bean in my JSP page what do I do ?
    I tried
    <%@ page import="leaveChange"%>
    but got following error
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\Devannualleave\newDev\advancedOptions_jsp.java:8: '.' expected
    [javac] import leaveChange;
    [javac] ^
    [javac] 1 error
    Thanks in advance

    Update
    changed Bean class to
    package test;
    import java.util.*;
    public class leaveChange extends Object implements java.io.Serializable
         String Name;
         String Grade;
         String Pattern;
         int numDays;
         Date startDate;
         Date endDate;
    JSP File
    <%@ page import="test.leaveChange" %>
    and have in my WEB-INF/classes/test
    my Bean Class
    but get the following error
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\Devannualleave\newDev\advancedOptions_jsp.java:8: package test does not exist
    [javac] import test.leaveChange;
    [javac] ^
    [javac] 1 error
    Any help ?

  • Re: junit test for entity beans ... ejb 3.0

    I'm confused. I'm trying to test my entity bean.
    I have:
    - an entity bean
    - a stateless session bean for accessing the entity bean (facade)
    - an interface for accessing the the stateless bean
    And I'm trying to write a JUnit test class to test this bean. However, I am uncertain as to how to test this (I'm new to EJB 3.0, JBoss and Eclipse).
    What would the JUnit test look like? I'm confused as to whether or not I should be injecting the interface/bean/what???
    I've tried several variations. I either get "NameNotFound" - not bound exceptions or Null pointer exceptions.
    What would the @EJB syntax look like or how would I do it through the context?
    For Example:
    @EJB private TestFacade myTest; //interface to stateless bean ?
    OR
    InitialContext ctx = new InitialContext();
    TestResultFacadeBean myTest = (TestResultFacadeBean) ctx.lookup("localTest");
    I'm confused at to which method I should be using and what object I should be accessing. If I could get either one to work, I'd be happy. :)
    How do I ensure my bean is deployed to the container? What do I need to do?
    If anyone has a simple example or explanation as to which method I should use and how to use it, I'd be very grateful.
    Thanks very much,
    LisaD

    OK, you need to have several layers of testing.
    Layer 0. Test the entity beans are deployable (more on this later). Basically, you need to know that all your annotations work. Things to watch out for are multiple @Id fields in one class or @EmbeddedID or @IdClass in conjuction with @ManyToOne, @ManyToMany, @OneToMany, @OneToOne and fun with @JoinTable, @JoinColumn and @JoinColumns. Once you know how these are supposed to work with the spec, it's not too bad to write it correctly each time. But there are some gotchas that will break things later on.
    Layer 1. Do the functions in the classes that don't depend on annotations work as expected. Typically, this is just going to be the getters and setters in your entity classes. Of course JUnit best practice says we don't bother testing functions that look like:
    public T getX() {
    return this.x;
    or
    public void setX(T x) {
    this.x = x;
    as there is nothing that can go wrong with them. So in that case, your level 1 tests will just be initial values specified from constructors and verifying that the non-get/set pairs work, and that the getters you have tagged @Transient work (because you've likely put some logic in them)
    Layer 2. Test the session bean methods that don't require injection to work.
    Layer 3. Test the session bean methods that require injection (Mock Objects). Simulate the injection for yourself, injecting Mock Objects for the entity manager. Then you can confirm that the correct methods are being called in the correct sequences, etc.
    [Note this may require some skill in designing the mock.  I'm working on developing my own entitymanager mock, and if it looks usefull I'll release it to the world.
    Layer 4. Test the session bean methods that require injection (Real entity manager) (See Layer 0)
    For this you will need an out of container persistence implementation.  Currently Hibernate and Glassfish provide beta versions.  You will need a different persistence.xml file that lists all the entities.  You will have to use reflection to inject the entity manager(s) that you create from an entity manager factory unless you provide a constructor that takes an EntityManager as a parameter.  You may need to use reflection to call any @PostConstruct method if you made it private.
    Layer 5. Navigate the relationships in the objects returned from Layer 4 using a database that has been loaded with test data.
    I am currently using Layers 0, 1, 2 & 4 to test my session beans and entity beans.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Best practice for @EJB injection in junit test (out-of-container) ?

    Hi all,
    I'd like to run a JUnit test for a Stateless bean A which has another bean B injected via the @EJB annotation. Both beans are pure EJB 3 POJOs.
    The JUnit test should run out-of-container and is not meant to be an EJB client, either.
    What is the easiest/suggested way of getting this injection happening without explicitely having to instantiate the bean B in my test setup ?

    you can deal with EntityBeans without having the Container managed senario , you can obtain instance of EntityManager using the "EntityManagerFactory" and providing the "persistence.xml" file and provide the "provider" (toplink,hibernate ,...), then you can use entities as plain un managed classes

  • Performance Test resulting in more EJB bean instances

    Hi Guys,
    I am trying to profile my application using OptimizeIT.
    If I conduct a load test using Load Runner , But for the test I am using only
    virtual client continously repeating the same operation for a period of an hour
    or so. I expect only entity bean instance to cater to the needs . What I observe
    from OptimizeIT is the number of instances of entity bean continously increases
    My question is when the same thread is doing the operation the Entity Bean instance
    which catered to the need during the first round should be able to process client
    request second time. Why should the bean instance continously increase?
    Thanks in advance,
    Kumar

    Kumar Raman wrote:
    Hi Rob,
    I am unable to send the .snp file as the file size is coming out to be 6 MB which
    our mail server is not allowing to send thorough (we have a corporate limit of
    3MB). If U have any other way across please let me know.Did you try compressing it? Or, just split it in multiple files and
    send them separately. If none of that works, send me a private email,
    and I can get you a FTP upload.
    >
    As regards to 2 questions
    1) I know as to why two instances are getting created as I can see the code here.
    But I really wanted to know as to when these instances be released from the memory
    ? They'll be kept in the cache at least until the transaction ends. Since
    you're deleting them, they'll be removed from the cache and sent to the
    pool when the tx completes.
    Is this going to be there till the pool size defined is filled? I haven,t defined
    any pool size in our configuration. I feel the default size is 1000.
    Yes, they will be in the pool, and the default pool size is 1000.
    2) As regards to 2nd question , the add/delete are running in different transaction.
    I wanted to know as to whether the instances created during add , be used for
    delete operation as well.
    They can/should be the same instance. What is your concurrency-strategy
    setting for this bean? I know in the past that exclusive concurrency
    was not reusing bean instances as well as some of the other concurrency
    strategies (eg database / optimistic).
    3) Also for each of the bean instance will there be corresponding home instances
    also floating in memory. I feel the home instances should be reusable.
    There's just 1 home instance for the deployment, not 1 per bean.
    In case of simple Entity bean creation in weblogic, how many objects will be
    created vis. a vis , home object , remote object so on...
    You'll need a bean interface (local and/or remote) and a bean
    implementation class.
    As the number of instances which OptimizeIT shows is beyond my understanding.
    I wanted to ensure is there any configuration to help me optimize these creations.
    Ok, let's try to get the snapshot to me so I can help you out.
    -- Rob
    >
    Thanks,
    Kumar
    Rob Woollen <[email protected]> wrote:
    Kumar Raman wrote:
    Hi,
    Actually we are running a scenario using Load Runner tool to add arow onto a
    DB using an Container managed Entity Bean. This Bean is getting instantiated
    using a Session Bean. In the workflow after creation we are deletingthe row in
    the table by using the remove method of the same entity bean.
    If we analyze using the profiler, the number of EJB instances increasesby 2 during
    add and increases by another 2 after delete.Is your session bean only creating one bean?
    There seems to be 2 questions:
    1) Why are you getting 2 beans on add/delete? I'm not sure if you
    expect this or not.
    2) Why are the beans used for the creation not being used again when
    you
    issue the delete?
    For #2, my first question is if the create and remove are both running
    in the same transaction?
    I am sending the OptimizeIT (ver5.5) snapshots to you by mail.
    Haven't received them yet, but they would be very helpful.
    -- Rob
    Please let me know as to why the instances are increasing inspite explicitlycalling
    the remove method in the code.
    Thanks,
    Kumar
    Rob Woollen <[email protected]> wrote:
    We'd need a little more information to diagnose this one.
    First off, if you have an OptimizeIt snapshot file (the .snp extension
    not the HTML output file), I'd be willing to take a look at it and
    give
    you some ideas. If you're interested, send me an email at rwoollenat
    bea dot com.
    If you're using a custom primary key class (ie not something like
    java.lang.String), make sure it's hashCode and equals method are correct.
    Otherwise, it'd be helpful if you gave us some more info about yourtest
    and what you're doing with the entity bean(s).
    -- Rob
    Kumar Raman wrote:
    Hi Guys,
    I am trying to profile my application using OptimizeIT.
    If I conduct a load test using Load Runner , But for the test I amusing only
    virtual client continously repeating the same operation for a periodof an hour
    or so. I expect only entity bean instance to cater to the needs .
    What
    I observe
    from OptimizeIT is the number of instances of entity bean continouslyincreases
    My question is when the same thread is doing the operation the EntityBean instance
    which catered to the need during the first round should be able toprocess client
    request second time. Why should the bean instance continously increase?
    Thanks in advance,
    Kumar

  • Unable to run ADFBC JUNIT Test Classes with JDEV11G 11.1.1.6

    Dear All,
    I upgraded my project to the latest release JDEV 11G 11.1.1.6
    Previously we are on JDEV 11G 11.1.1.5
    I have a JUNIT class that I am running which test my ADFBC components.
    public class MyTestClass {
      @Test
      public void testVOAccess()
        //assertions
    }Unfortunately, I am hitting an error like this from the messages.
    Mar 9, 2012 1:28:07 PM oracle.adf.share.ADFContext getCurrent
    WARNING: Automatically initializing a DefaultContext for getCurrent.
    Caller should ensure that a DefaultContext is proper for this use.
    Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
    This message may be avoided by performing initADFContext before using getCurrent().
    For more information please enable logging for oracle.adf.share.ADFContext at FINEST level.
    Mar 9, 2012 1:28:08 PM oracle.security.jps.internal.config.xml.XmlConfigurationFactory initDefaultConfiguration
    SEVERE: org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
    Mar 9, 2012 1:28:10 PM oracle.mds
    NOTIFICATION: PManager instance is created without multitenancy support as JVM flag "oracle.multitenant.enabled" is not set to enable multitenancy support.
    Mar 9, 2012 1:28:12 PM oracle.security.jps.internal.config.xml.XmlConfigurationFactory initDefaultConfiguration
    SEVERE: org.xml.sax.SAXParseException: Invalid encoding name "Cp1252".
    Mar 9, 2012 1:28:12 PM oracle.adf.share.jndi.ReferenceStoreHelper getReferencesMapEx
    WARNING: Incomplete connection reference object for connection:MYDATASOURCEAt the JUNIT Test Runner, I see this.
    java.lang.ExceptionInInitializerError: null
         java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:171)
         org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:216)
    Caused by: oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:207)
         oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)To validate the issue, I tried to run my same project using the older release which is JDEV 11G 11.1.1.5
    and I see that I am not hitting any error. All my test classes runs fine.
    Has anybody replicated this?
    Thanks

    Didier Laurent wrote:
    I logged the following bug for this issue:
    bug 14030895 - REGR: JDEVELOPER 11.1.1.6.0 JUNIT JBO-26061 ERROR WHILE OPENING JDBC CONNECTION
    Regards,
    Didier.So its really a bug..
    I abandon this already since I cannot find any solution to look up for this.
    On the other hand, I am maintaining two jdeveloper version just to get around this problem.
    When testing ADFBC, I used the 11.1.1.5 while for non-junit test I used the 11.1.1.6
    Hopefully this gets fixed on the next release as I am having a hard time swithcing between two JDev version.
    Thanks
    Edited by: Neliel on May 3, 2012 11:42 PM

  • How am I able to use an injected EJB in a Managed Bean Constructor?

    JSF 1.2
    EJB 3.0
    Glassfish v1
    Summary:
    Managed bean injected EJB is null when referencing EJB var in constructor.
    Details:
    In my managed bean, I have a constructor that tries to reference an injected EJB, such as:
    public class CustomerBean implements Serializable {
    @EJB private CustomerSessionRemote customerSessionRemote;
    public CustomerBean() {
    List<CustomerRow> results = customerSessionRemote.getCustomerList();
    }The call within the constructor to customerSessionRemote is null - I've double checked this in Netbeans 5.5.
    How am I able to use an injected EJB in a Managed Bean Constructor?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    OK, I was reading the article Web Tier to Go With Java EE 5: A Look at Resource Injection and I understand your statement too.
    Is there any way possible to Inject the EJB prior to the bean instance creation at all?
    Maybe, I need to approach it with the old fashion Java EE 1.4 route and using JNDI in the PostConstruct annotated method to reference the EJB in the managed bean.
    This had to been thought out before, I don't understand why a manged bean's life cycle places any injections at the end of the bean creation.
    Also, now that I understand that the @PostConstruct annotated method will be called by the container after the bean has been constructed and before any business methods of the bean are executed.
    I am trying to reference my EJB as part of the creation of the managed bean.
    What happens: the JSF page loads the managed bean and I need to populate a listbox component with data from an EJB.
    When I try to make the call to the EJB in the listbox setter method, the EJB reference is null.
    Now, I'm not for sure if the @PostConstruct annotation is going to work... hmmmm.
    ** Figured it out. ** I just needed to move the EJB logic that was still in the setter of the component I wanted to populate into the annotated PostConstruct method.

  • Creating junit test cases using the reflection API

    In order to use the reflection API to get information about a *.java file's class name and methods, I need to compile the *.java file first, and then get info through the *.class file. Am I right?
    Eclipse, the Java IDE, can create junit test cases for java files the user selects right after the *.java files have been created, and even before the *.java files have been compiled by the user. I guess Eclipse internally compiles the java files before creating JUnit test cases for them. Does anyone know about it? Thanks.

    Let me explain my problem in more details.
    Given any java source tree, my program is supposed to create junit test cases for each class using java reflection. My approach is to scan through the source tree to keep the list of classes available, then compile all the java files in the given source tree, then do Class.forName() to load them to get their methods... Obviously I don't know what classes I will have at compilation time. I create a temp_classes directory as the output directory for the given source tree java files, and I add temp_classes to my classpath when I strart up my own program. However, that won't work..
    D:\eclipse\workspace\cmpe271_hw4\classes>java -classpath ..\classes;..\temp_classes Test
    javac -classpath .\temp_classes; -d .\temp_classes @temp_classes\javalist.txt
    java.lang.ClassNotFoundException: Factory
    java.lang.ClassNotFoundException: InvalidDateFormatException
    java.lang.ClassNotFoundException: MyUtility
    java.lang.ClassNotFoundException: Storage

  • What's s the best automated route from stateless session bean class to EJB?

    Hi,
    I have an application that generates stateless session bean classes.
    For any given stateless session bean class, I would like to build an EJB, moreover, I would like to automate the process as much as possible.
    I'd rather not rely on a full blown third party IDE.
    I reckon could write a set of java classes that could analyse the session bean class and generate the home and remote interface and a basic deployment descriptor.
    That said, I have no doubt that I would be renventing the wheel.
    But I am struggling to find a utility/class of the appropriate granularity in the public domain.
    I am wide open to any feedback on approaches people may have taken and the pros and pitfalls.
    I fully realise my question is quite unspecific, but I really wanted to get some feedback and start a discussion. Since, I am sure there is no 'correct' answer.
    Most kind regards,
    Simon.

    My best advice: surrender to use an IDE.
    You wonder sometimes at how much productivity (read as 'time') could be wasted by doing something that could be done automatically. For a learning experience or a once only exercise is fine but as a routine thing, not worth it.
    Cheers

  • Using TimesTen for JUnit tests

    I want to switch from using HSQL (in memory) to TimesTen in my Unit tests. Is there a simple setup for TimesTen when used for this purpose?
    For example, for HSQL, all I have to do is include the hsql.jar as a dependency in my project, then include the following line in my JUnit test:
    DataSource dataSource = new DriverManagerDataSource("org.hsqldb.jdbcDriver",
    "jdbc:hsqldb:target/test-classes/com/project/path/test/schema", user, pw);
    schema is a reference to the schema.script that includes the DDL for all the tables that I need to create in memory.
    Can anyone help me out? Thanks.

    From what little I know about it TimesTen is not an in-memory database, it is a caching architecture. Therefore I would expect the set-up to be different - the TimesTen stuff should be set up once ever[], like the schema of a regular database, rather than everytime you run your unit tests.
    I think you need to sit down with the TimesTen documentation and figure out how you are going to use the product. If you are just looking for a quick DB to use in unit tests I think you may well want to keep using HSQL.
    Cheers, APC

  • Writing JUnit test app to test a method which uses AppResources

    Recently I was given a requirement to write a JUnit class( with main) to test a method in a Processor class which is running in weblogic. But this method in processor class makes use of AppResources like this: AppResources appResources = new AppResources("ApplicationResources"); String ruleFileName = appResources.getResourceString("rule.file.irlfile"); But when I try to run my JUnit test (stand alone app with main class) I am getting "java.util.MissingResourceException: Can't find bundle for base name ApplicationResources" exception. The appResources is null... Any ideas how to work around this problem?

    It doesn't sound like the Process class was designed for testability outside of its J2EE server container, probably. So writing a unit test for it, under its current design, may be an exercise in futility. You might want to look into "Cactus" tests (search for JUnit Cactus on the web), to test it in its container. Or, redesign the class for testability, separating its business logic better (that's a lot of work to do though) so that it can be instantiated and exercised independently of its environment.

  • How to run test cases in a jar file using junit?

    Hi,
    I want to run test cases in a jar file using junit and the jar file is not in the class path. I wrote the following code, but it does not work.
    import java.net.URL;
    import java.net.URLClassLoader;
    import junit.framework.TestResult;
    import junit.textui.TestRunner;
    public class MyTestRunner {
         public static void main(String[] args) throws Exception{
              URL url = new URL("file:///d:/case.jar");
              URLClassLoader loader = new URLClassLoader(new URL[]{url});
              loader.loadClass("TestCase1");
              TestRunner runner = new TestRunner();
              TestResult result = runner.start(new String[]{"TestCase1"});
              System.out.println(result.toString());
    }Any ideas?
    Thanks a lot.

    Wouldn't it just be easier to put it on the classpath? You're trying to, anyway, with a URLClassLoader, albeit in an entirely unnecessarily complicated way

  • NIST conformance tests using JUnit

    I haven't seen anyone from Oracle on the [email protected] mailing list, so I'm posting this here just to let you guys know.
    I've been working on recasting the NIST DOM test suite for Java to use JUnit and posted an initial release last night.
    The tests can easily be run against the beta XDK's parser (or any other JAXP compliant parser), but there were a substantial number test errors and failures. Some of these may be due to test problems, but I'd guess most of them are legitimate. However, I do not have time or the motivation to investigate them.
    It does seem that you take the position that the XML declaration is treated as a processing instruction (like MSXML does) which will cause 3 tests to fail, but you can adjust the tests to accept this using
    -Dnet.sourceforge.xmlconf.domunit.acceptXMLDeclPI=true
    I've made the source for my JUnit-hosted deriviatives of the NIST test suite available at http://xmlconf.sourceforge.net. You can either download the combined source and binary
    zip file from http://sourceforge.net/project/showfiles.php?group_id=8114&release_id=31676
    or you can access the source through the CVS (http://sourceforge.net/cvs/?group_id=8114)
    The tests run using JUnit 3.5 and can test JAXP 1.0 or JAXP 1.1 compliant DOM parsers.
    Xerces-J 1.3.1 does not report any test failures, crimson.jar and the other parser tested
    had a moderate amount of test failures, but no investigation has been performed to
    determine if those failures were problems with the tests or actual non-conformances
    with the spec.
    A JBuilder 4 .jpx project and an Ant 1.2 build.xml file are provided.
    ------- readme.txt from domunit 0.0.1 ---------
    domunit 0.0.1
    domunit currently contains equivalents of the NIST DOM 1 test written for
    the JUnit test framework (http://www.junit.org) and JAXP 1.1 or 1.0 compatible parsers.
    The tests were written to allow easy migration to JavaScript using JSUnit
    (http://www.jsunit.net) and CPPUnit (http://www.xprogramming.org/software)
    To run the full set of tests, place domunit.jar, junit.jar and one of the following
    combinations of jars in the same directory or on the class path.
    xerces.jar
    xml4j.jar
    jaxp.jar and parser.jar (from Sun's JAXP 1.0 Reference Implementation)
    jaxp.jar and crimson.jar (from Sun's JAXP 1.1 Reference Implementation)
    and run:
    java -jar domunit.jar
    To test Oracle's XML Processor, place jaxp.jar from the JAXP 1.0 (not 1.1) Reference Implementation
    and xmlparserv2.jar in the domunit.jar directory and run:
    java -Djavax.xml.parsers.DocumentBuilderFactory=oracle.xml.jaxp.JXDocumentBuilderFactory
    -jar domunit.jar
    The following options can adjust the tests:
    -Dnet.sourceforge.xmlconf.domunit.isExpandEntityReferences=true
    -Dnet.sourceforge.xmlconf.domunit.isCoalescing=true
    -Dnet.sourceforge.xmlconf.domunit.acceptXMLDeclPI=true
    To build the project, use either the JBuilder 4 .jpx file or
    the Ant 1.2 build.xml file.
    Curt Arnold http://xmlconf.sourceforge.net
    [email protected]
    18 April 2001
    domunit - DOM testing on the xUnit frameworks
    Copyright (C) 2001, Curt Arnold
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    null

    I haven't seen anyone from Oracle on the [email protected] mailing list, so I'm posting this here just to let you guys know.
    I've been working on recasting the NIST DOM test suite for Java to use JUnit and posted an initial release last night.
    The tests can easily be run against the beta XDK's parser (or any other JAXP compliant parser), but there were a substantial number test errors and failures. Some of these may be due to test problems, but I'd guess most of them are legitimate. However, I do not have time or the motivation to investigate them.
    It does seem that you take the position that the XML declaration is treated as a processing instruction (like MSXML does) which will cause 3 tests to fail, but you can adjust the tests to accept this using
    -Dnet.sourceforge.xmlconf.domunit.acceptXMLDeclPI=true
    I've made the source for my JUnit-hosted deriviatives of the NIST test suite available at http://xmlconf.sourceforge.net. You can either download the combined source and binary
    zip file from http://sourceforge.net/project/showfiles.php?group_id=8114&release_id=31676
    or you can access the source through the CVS (http://sourceforge.net/cvs/?group_id=8114)
    The tests run using JUnit 3.5 and can test JAXP 1.0 or JAXP 1.1 compliant DOM parsers.
    Xerces-J 1.3.1 does not report any test failures, crimson.jar and the other parser tested
    had a moderate amount of test failures, but no investigation has been performed to
    determine if those failures were problems with the tests or actual non-conformances
    with the spec.
    A JBuilder 4 .jpx project and an Ant 1.2 build.xml file are provided.
    ------- readme.txt from domunit 0.0.1 ---------
    domunit 0.0.1
    domunit currently contains equivalents of the NIST DOM 1 test written for
    the JUnit test framework (http://www.junit.org) and JAXP 1.1 or 1.0 compatible parsers.
    The tests were written to allow easy migration to JavaScript using JSUnit
    (http://www.jsunit.net) and CPPUnit (http://www.xprogramming.org/software)
    To run the full set of tests, place domunit.jar, junit.jar and one of the following
    combinations of jars in the same directory or on the class path.
    xerces.jar
    xml4j.jar
    jaxp.jar and parser.jar (from Sun's JAXP 1.0 Reference Implementation)
    jaxp.jar and crimson.jar (from Sun's JAXP 1.1 Reference Implementation)
    and run:
    java -jar domunit.jar
    To test Oracle's XML Processor, place jaxp.jar from the JAXP 1.0 (not 1.1) Reference Implementation
    and xmlparserv2.jar in the domunit.jar directory and run:
    java -Djavax.xml.parsers.DocumentBuilderFactory=oracle.xml.jaxp.JXDocumentBuilderFactory
    -jar domunit.jar
    The following options can adjust the tests:
    -Dnet.sourceforge.xmlconf.domunit.isExpandEntityReferences=true
    -Dnet.sourceforge.xmlconf.domunit.isCoalescing=true
    -Dnet.sourceforge.xmlconf.domunit.acceptXMLDeclPI=true
    To build the project, use either the JBuilder 4 .jpx file or
    the Ant 1.2 build.xml file.
    Curt Arnold http://xmlconf.sourceforge.net
    [email protected]
    18 April 2001
    domunit - DOM testing on the xUnit frameworks
    Copyright (C) 2001, Curt Arnold
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    null

Maybe you are looking for

  • Trading Partner identification over Generic Exchange

    Hi - Right now it appears that B2B only use IP address for the Generic Identifier for HTTP/HTTPS connections (non-AS2). The problem we are running into is that the remote trading partner uses a proxy and cannot guarantee a certain IP address each tim

  • How to view/change "default' display format

    Hi all, I have created some dashboards in Oracle Answers and I have this strange "problem". The report A which was created by another developer and has a numeric column shows the data with different format than the numeric columns in report B created

  • How to stop ads?

    For the past few days every 5-20min a new window appears for Firefox with an ad for a game,a website, porn, or other random stuff and i cant figure out whats causing it. I have been trying to block each one by copying there URL's but it does not seem

  • Users loged in

    How to fine out how many users loged in in iFS

  • Alternating Blue Screen

    I have a Satellite P855-S5102 and when I went to turn it on today it began flashing from the Windows 8 screen to a blank blue screen, again and again. I am not able to open any programs other than Task Manager. I decided to 'reset' the computer, pres