harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nina Rinskaya (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3391) [JDK][EUT] 2 tests fail in org.eclipse.jdt.ui.tests.all suit
Date Fri, 25 May 2007 07:09:16 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498961

Nina Rinskaya commented on HARMONY-3391:

Andrey, if I'm not mistaken this test belongs to jdtuirefactoring suite. 

Please let me also give you the description how to run this test separately from command line
and as JUnit test in Eclipse project, I was able to reproduce the failure in that ways.

The description below is a common description for any EUT test suite, and for this specific
test suite you should use the following plug-in and classnames:

plug-in: org.eclipse.jdt.ui.refactoring
classname (to use when running from command line, see (3)): org.eclipse.jdt.ui.tests.nls.NLSSourceModifierTest
Test class (when running through Eclipse see (4)): org.eclipse.jdt.ui.tests.all.AllAllTests

Example of the command line that I used for reproducing:
C:\work\harmony-hdk-r541143\jdk\bin\java.exe -jar startup.jar -application org.eclipse.test.uitestapplication
-dev bin formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,log.xml
-testpluginname org.eclipse.jdt.ui.tests.refactoring -classname org.eclipse.jdt.ui.tests.nls.NLSSourceModifierTest

(results are written to the currecnt directory to log.xml).

Note: the description below is applicable to Eclipse 3.2 only (checked on Windows version)

1. (you could probably skip this step because you might have these archives downloaded earlier)
 Download Eclipse and Eclipse Unit Tests (3.2) archive from  http://download.eclipse.org/eclipse/downloads/drops/R-3.2-200606291905/index.php,
eclipse-SDK-3.2-win32.zip (eclipse-SDK-3.2-linux-gtk.tar.gz for Linux) and eclipse-Automated-Tests-3.2.zip
  . Direct links are: 


gtk.tar.gz for Linux)


2. Unpack eclipse-Automated-Tests-3.2.zip, this will create a top-level directory  "eclipse-testing"
that contains eclipse-junit-tests-M20060629-1905.zip archive. Unpack this archive, this  will
create "eclipse" directory. Now unpack Eclipse 3.2 archive to eclipse-testing directory (it
will be unpacked to eclipse-testing/eclipse directory that already exists, say  "Yes" to overwrite
whenever it asks).

3. Running the Test Suite from the command line
>From the eclipse-testing/eclipse directory, use the command:
${path.to.jre}/bin/java -jar startup.jar -application ${launcher} -dev bin formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${log}
-testpluginname ${plugin-name} -classname ${test-classname}

where ${launcher} is one of: org.eclipse.test.uitestapplication or org.eclipse.test.coretestapplication
depending on whether or not you need to run your tests within an active Workbench (try both
if there are any doubts).
${plugin-name} is one of: 
org.eclipse.ant.tests.core, org.eclipse.ant.tests.ui, org.eclipse.compare.tests, org.eclipse.core.expressions.tests,
org.eclipse.core.tests.resources, org.eclipse.core.tests.runtime, org.eclipse.core.filebuffers.tests,
org.eclipse.help.tests, org.eclipse.jdt.apt.tests, org.eclipse.jdt.core.tests.builder, org.eclipse.jdt.core.tests.compiler,
org.eclipse.jdt.core.tests.model, org.eclipse.jdt.core.tests.performance, org.eclipse.jdt.debug.tests,
org.eclipse.jdt.text.tests, org.eclipse.jdt.ui.tests, org.eclipse.jdt.ui.tests.refactoring,
org.eclipse.jface.text.tests, org.eclipse.jface.tests.databinding, org.eclipse.ltk.core.refactoring.tests,
org.eclipse.ltk.ui.refactoring.tests, org.eclipse.osgi.tests, org.eclipse.pde.ui.tests, org.eclipse.releng.tests,
org.eclipse.swt.tests, org.eclipse.team.tests.core, org.eclipse.team.tests.cvs.core, org.eclipse.text.tests,
org.eclipse.ua.tests, org.eclipse.ui.tests, org.eclipse.ui.editors.tests, org.eclipse.ui.tests.navigator,
org.eclipse.ui.tests.performance, org.eclipse.ui.tests.rcp, org.eclipse.ui.tests.views.properties.tabbed,
org.eclipse.ui.workbench.texteditor.tests, org.eclipse.update.tests.core 
${test-classname} is a full classname.
${log} is the path to the xml file with test suites results.

4. Running the Test Suite from Eclipse 
Run Eclipse 3.2 installation that was setup during step 2 (eclipse-testing/eclipse), select
new workspace directory. Then select menu "File"->"Import", in  the newly appeared "Import"dialog
expand "Plug-in Development", select "Plug-ins and Fragments", click  "Next" button. In the
next dialog uncheck the checkbox "The target platform (as specified in the  preferences)",
make sure that Plug-in location is set to your Eclipse 3.2 location. Click "Source code  locations"
button. When "Preferences" dialog is opened, go to "Source code locations" tab, click "Add..."
 button, and select the following location:
<patch to Eclipse 3.2>/plugins/org.eclipse.sdk.tests.source_3.2.0.v20060329/src
Click "Ok" to submit your selection, then click "Ok" to close "Preferences" dialog. In the
"Import Plug-ins and Fragments" dialog check "Import As Projects with source folders" checkbox.
Then click "Next"  button in "Import Plug-ins and Fragments" dialog. In the next dialog ("Selection")
select plug-in under test from the list and click "Add -->" button. Then click "Finish"
button to  close the dialog. 

Now the test suite 'ui' is imprted as an Eclipse project. You can expand the project and see
the sources in  "src-uitests" folder. I had to comment several lines in "plugin.xml" file
because some extensions  descriptions prevented the plug-in (test suite) from being correctly

When it shows no errors, select the project in "Package Explorer" view, then go to menu "Run"->"Run...",
 select "JUnit Plug-in Test", click "New" icon (left top corner). In the "Run" dialog, "Test"
tab check "Run  a single test" and specify

Project: ${project-name}
Test class: ${launching-test-classname}

where ${launching-test-classname} might differ from the test class under test, this is usually
the class name that you find in test suite execution log in <testsuite/> line.
Then go to the "Main" tab, select "Run an application" checkbox and select "org.eclipse.ui.ide.workbench"
 from the list. In the same tab click to "Installed JREs" button in order to specify the path
to Harmony JRE, then select it as "Runtime JRE" and click "Run" button. In a minute the suite
will be launched and you will  have "Junit" view opened with test and testcases tree. You
can use this view to re-run one test class (or testcase) if  necessary. 

> [JDK][EUT] 2 tests fail in org.eclipse.jdt.ui.tests.all suit
> ------------------------------------------------------------
>                 Key: HARMONY-3391
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3391
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>            Reporter: Aleksey Ignatenko
> 2 tests fail in org.eclipse.jdt.ui.tests.all suit of EUT.
> <testcase classname="org.eclipse.jdt.ui.tests.nls.NLSSourceModifierTest" name="testBug95708_2"
>       <failure message="expected:&lt;...key_0;  private String str2=Accessor.nls...&gt;
but was:&lt;...nls_0;  private String str2=Accessor.key...&gt;"  type="
> junit.framework.ComparisonFailure">junit.framework.ComparisonFailure: expected:&lt;...key_0;
>         private String str2=Accessor.nls...&gt; but was:&lt;...nls_0;
>         private String str2=Accessor.key...&gt;
>         at org.eclipse.jdt.ui.tests.nls.NLSSourceModifierTest.testBug95708_2(NLSSourceModifierTest.java:858)
>         at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>         at junit.extensions.TestSetup.run(TestSetup.java:16)
>         at junit.extensions.TestDecorator.basicRun(TestDecorator.java)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
>         at junit.extensions.TestSetup.run(TestSetup.java:16)
>         at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:326)
>         at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:203)
>         at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:188)
>         at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>         at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:121)
>         at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java)
>         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
>         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1912)
>         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1875)
>         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:417)
>         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java)
>         at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
>         at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:130)
>         at org.eclipse.test.UITestApplication.run(UITestApplication.java:55)
>         at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:77)
>         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
>         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:66)
>         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:396)
>         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
>         at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>         at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
>         at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
>         at org.eclipse.core.launcher.Main.run(Main.java:975)
>         at org.eclipse.core.launcher.Main.main(Main.java:952)
>         at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>         at org.apache.harmony.vm.JarRunner.main(JarRunner.java:80)
> </failure>

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message