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

Similar Messages

  • Servlet Testing (using JUnit??)

    Hi there,
    I have a web application using many different servlets and now i would like to test the methods in these servlets.
    How can i do this using Junit? Is it possible or is there an alternative way of testing?
    Rahul

    junit testing is working perfectly when i am testing
    core java applications.But it gives
    unsupportedClassversion when i am trying to run
    junit on servlets.Maybe your servlet engine does not use the same JRE as the one you use to run your classical java app. e.g. Tomcat on Windows selects its JRE at install time, so if you installed another JRE afterwards...

  • Unit test with JUnit

    Hi all,
    I use Eclipse IDE: Eclipse Java EE IDE for Web Developers. Version: Indigo Release
    I use JUnit 4. For project properties> Java Build Path> Libraries: I have JUnit4 added. Also under the same tab: Maven Dependencies> I have junit-4.8.2.jar
    In pom.xml I have:
    <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.8.2</version>
          <scope>test</scope>
        </dependency>Basically, I’m writing unit tests using JUnit in the past few months! All I needed to do was to create a test class, add a test method like below:
    @Test
    public void testMethod(){
              // Some test code
    }Right click on method, Run As> JUnit Test
    That’s all I needed to do to either run my unit test or do Debug As> Junit Test to debug my unit test.
    All was fine with the world! Starting yesterday, when I add a new test method in a test class, and then do: Right click on method, Run As> JUnit Test
    Nothing happens! I cannot run or debug any test anymore! Meaning I cannot add any new unit test!
    Let me also add that after I add my test method, I do a clean build thru Eclipse and Eclipse sees the newly complied class which contains my new test method.
    Since none of my configurations changed, I have no idea what went wrong!
    Does anybody has any idea? Any help would be greatly appreciated.

    aksarben wrote:
    Yes, I have an idea: Post your code. I for one am not going to my waste my time speculating and guessing.Could also just be IDE crud. I've had similar problems with older versions of Eclipse. Never with current ones though.
    OP: eclipse creates run/debug configurations for each class. If you search around a little you should find the dialog, I don't know the exact name. I think you can reach it from the "run as" menu options. You should try clearing the settings of your test suite to see if that changes anything.

  • How to test the JSP pages and sevlets using JUnit. ?

    How to test the JSP pages using JUnit. How to configure what are all the steps to execute the JUnit test cases.

    Hi xiepei,
    since you are using modbus, a simple error checking is implicit in the protocol and is the comparison between returned checksum and the calculated one on the received message: checksum errors, if any, are an effect of communications errors (you should have at least 2 bits changed and on particular patterns to have the checksum be calculated correctly!). You won't be able to calculate BER on them, but you can calculate PER (Packet Error Rate).
    Another flag for communication errors, on the other direction, is to intercept error messages from the device: if it fully implements modbus protocol, it should return some warning in case of error (I seem to remember that in some cases it returns the reveived message with some error bits added: please check in modbus documentation).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • 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 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

  • 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.

  • Safari won't open pictures on imgur. To test used another browser and it showed them

    Safari won't open pictures on imgur. To test used another browser and it showed them
    Here is the page was trying to surf  http://imgur.com/gallery/n9Bjm

    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.

  • HT201257 hardware test using an external optic device (iMac) on macbook pro 9 years old via firewire. What to do? and how to do it?

    hardware test using an external optical device (iMac) on macbook pro 9 years old via firewire. What to do? and how to do it?
    I thiunk the graphic card is defective and need to run hwt

    You don't.
    Need a internal optical drive and the Hardware Test on disks is old and outdated anyway.
    Your machine has lasted a long time, congratulations, they usually only last about 4-5 years.
    They get clogged up with dust and overheat, kills the video card, there is nothing you can do as it's hardware damage over time.

  • Functionality Testing Using B1 Test Composer Tool

    Hi,
    I would like to use B1 TC for functional testing of our add-ons. Will it be possible for me to do the functional testing(add-on's expected against add-on's actual) of the add-on using B1 TC? Could anyone explain with some examples so that I can start with B1 TC.
    Our add-on has a window that allows the user to filter and display BPs in the matrix. User can select a Payment Term from the drop down and click Refresh button. Then the BPs with matching payment term should be listed in the matrix/gird. Here I want to check whether the BPs listed is correct. How can I use B1 Test Composer to do this?
    Regards,
    Sam

    Hi Johan,
    Thanks for the response. Let me explain the scenario to be tested using B1 TC in detail. The Payment Term combo in our add-on's Payment Term Update Utility form will list the payment terms ZPNET30, NET30, -Cash Basic’ etc. On selecting one of these values (say NET30), the matrix in the form is expected to list only those BPs with matching payment term(NET30). Here I need to ensure that all the BPs listed here are having the same payment term as ‘NET30’.
    While recording this action using B1 TC, let us assume that the BPs listed in the matrix are as in the below image.
    But when I rerun the B1 TC script at some later time, the BPs list might vary because of addition of new BPs to the database or changing of payment term of the existing BPs. In this instance, the Compare Matrix function of B1 TC fails, as the expected matrix values are not the same when we re-run the script. But all the BPs listed will have the matching payment term(NET30). So B1 TC reports a bug even if the functioning of the add-on is correct.
    When I manually do the testing, I apply the filter and then load each of the BP Master Data to check whether the payment term matches the selected one in the form. Then I will change and update the payment term of the existing BP or add new BPs and again performs the filtering to check whether the search result is correct. Is there a mechanism with B1 TC to handle such scenario, like accessing each individual rows/cells of the matrix/grid and check the payment term of the BPs listed?
    Regards,
    Sam

  • KB16037 - Perform a test using the hardware diagnostic tool on the BlackBerry smartphone

    KB16037 - Perform a test using the hardware diagnostic tool on the BlackBerry smartphone
    Just noticed this; SWEET!
    -----ProcedureTo perform a test using the hardware diagnostic tool on the BlackBerry smartphone, complete the following steps:
    On the Home screen on the BlackBerry smartphone, click Options.
    Select Status.
    On the Status screen, type test.Note: On BlackBerry smartphones that support SureType® technology, use the multi-tap input method.
    From the menu on the Device Self Test Application screen, select Start.
    If you've found a solution through a post; please mark it as a solution.
    If someone's was particularly helpful, give them kudo's!.
    Get busy living, or get busy dying.
    http://blog.port3101.org/hdawg/

    This is cool!
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • ACE load balancing and testing using soapUI

    Hey, I am trying to crowd source a solution for this problem.
    A client is testing using soapUI to an application that is being load balanced via ACE. There are two webservers behind the VIP servicing the client request. When client tests, requests are timing out per the soapUI log. A packet capture was taken and it clearly shows that ACE is not forwarding the HTTP data back to the client. When client tests by bypassing the ACE load balancer, it works fine. But, there are other clients from other applications that are making successful connection to the load balanced application via the VIP.
    Question, is there any thing unique with making HTTP/XML based requests using soapUI? LB configuration is shown below:
    class-map match-all EAI_PWS_9083
      2 match virtual-address 10.5.68.29 tcp eq 9083
    serverfarm host EAI_PWS_9083
      description WebSphere Porduction
      failaction purge
      probe tcp9083
      rserver ESSWSPAPP01 9083
        inservice
      rserver ESSWSPAPP02 9083
        inservice
    policy-map type loadbalance first-match L7_POLICY_EAI_PWS_9083
      class class-default
        serverfarm EAI_PWS_9083
    policy-map multi-match L4SLBPOLICY
    class EAI_PWS_9083
        loadbalance vip inservice
        loadbalance policy L7_POLICY_EAI_PWS_9083
        loadbalance vip icmp-reply active
        appl-parameter http advanced-options CASE_PARAM
    parameter-map type http CASE_PARAM
      case-insensitive

    Hi,
    Your configuration looks fine. I am not familiar with soapUI but if it is like a normal TCP connection followed by HTTP requests, i don't see why this shouldn't work.
    Do you know if there is a difference while using soapUI and normal request using browser?
    Regards,
    Kanwal

  • Stress Test using em console in 11g results in lesser number of instances

    Hi All,
    We are doing Stress/Load testing using em console in SOA Suite 11g. The problem we are encountering is, em fails to create as many instances as it should. Under "Additional Test Options", we check the "Enable Stress Test" checkbox and give different values for following parameters:
    Concurrent Threads     50
    Loops per Thread     20
    Delay in Milliseconds     1000
    But instead of creating 1000 instances of this composite, em console create only 998 and fails to create 2 instances without giving any error in console logs or server logs.
    Similarly, with below setting:
    Concurrent Threads     50
    Loops per Thread     40
    Delay in Milliseconds     1000
    Instead of creating 2000 instances it creates only 1991 and 9 instances fail without any error. Is this a known bug or we are missing something here? Any pointers will be helpful.
    Thanks,
    Akash

    In case you have multiple instances running, whereas any instance has an unique value started as correlation, when the engine receives the messages for the intermediate receive operation it will be routed without problems to the right instance. In this case, it is not a problem if the engine creates a new composite instance for the intermediate messages.
    We have this situation in Production without any problem.
    Anyway should be simple to simulate the same situation in your development environment to make sure it works well in your scenario.
    Regards
    Luis Fernando Heckler

  • I want to run automation test in multiple device say iphone and ipad or two iphone device Is it possible.I have done automation testing using UIAutomation and get it running from iphone device

    I want to run automation test in multiple device say iphone and ipad or two iphone device Is it possible.I have done automation testing using UIAutomation and get it running from iphone device

    plzzz reply to this question as soon as possible

  • Hardware test using Disc 1

    Hi,
    I am just wondering if running the hardware test using disc 1 will detect failure of one or both fans. Thank you for all response.
    Bob

    Hi Michael,
    Thank's for your reply. So if say one fan is dead and the other one is working fine, there will be an error message?
    Bob

Maybe you are looking for

  • BW System QBW: Result too large

    Hi Everyone, when i am running webi report its giving error. we are using BO : 4.0 with conncetion. BW System QBW: Result too large (917 070 cells); data collection is limited by configuration (maximum - 500000 cells) (WIS 00000) Pls give me any solu

  • How do I know that a PDF files was manipulated?

    Is it possible to find out if a PDF files was manipulated? Such as if was added o deletede and so on? Thanks. Miguel

  • Need itunes 10 but don't have system requirements

    I have a MacBook Pro v10.4.11 and I just bought an iPhone 4. I need itunes 10 but it requires Mac 10.5. I tried checking for software updates but nothing. Can anyone tell me how to sync my phone?

  • Query on Custom Serialisation using Bottom-up Web Service Deployment

    Hi experts, We have created a Java Service endpoint interface that uses custom Java value type classes. As per the dev. guide, Remote Interface is extended and the method also throws a RemoteException. But we want to handle faults as well. In order t

  • E71 App check certificate error while installing

    I just bought my E71 two days ago and I'm pretty much enjoying it but for one thing, I have been experiencing problems when Installing apps. At first I cant install both themes and apps, then I changed software installation to all and the online cert