Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Launching JUNIT ... Variable references empty selection(Variable references empty on "rerun Test" or "rerun Test - Failures First")
icon4.gif  Launching JUNIT ... Variable references empty selection [message #551051] Wed, 04 August 2010 22:52 Go to next message
Eclipse UserFriend
Hi All,

I may have posted this in the wrong spot and if so apologise first.

I am currently using Eclipse 3.2 with a Java 1.4.2 application. The project is a couple of million lines of code and we are migrating it to Java6. We currently have around 22,000 JUnit tests that are executed both in standalone JUnit infrastructure via our cruise control build servers and individually via Eclipse.

Currently a developer opens the class file of the individual tests he/she wants to run and their run configuration passes on the following arguements:

-Xmx512M
 -Duser.client=true
 -Djava.security.policy=${project_loc}\deploy\client\resources\java.policy
 -DtestClass=${java_type_name} 
 -Djava.security.auth.login.config=${project_loc}\deploy\client\resources\login.config
 -Duser.dir=${project_loc}\deploy\client


The first time a test is run in eclipse the JUnit plugin fires and runs the correct test perfectly. If the developer wants to rerun that test and uses the plugins "Rerun Tests" or "Rerun Tests - Failed Tests first" I get the error where the dynamic variables are empty.

The closest thing in bugzilla i could find was https://bugs.eclipse.org/bugs/show_bug.cgi?id=292732 I have changed the {project_loc} references to {project_loc:/ProjectName} however I cannot seem to get the plugin to remember what the value of ${java_type_name} was from its previous execution.

The exact error text is:

Quote:

'Launching JUNIT LaunchableTestCase' has encountered a problem.

Variable references empty selection:
${java_type_name}



Anyone had or seen anything similar? This works for us in 3.2 but is showing the above problems in 3.3, 3.4, 3.5 and 3.6.
Re: Launching JUNIT ... Variable references empty selection [message #552542 is a reply to message #551051] Thu, 12 August 2010 11:10 Go to previous messageGo to next message
Eclipse UserFriend
I had a very similar problem.

Sometimes I got

Variable references empty selection:
${project_path}

other times I got
java.lang.NoClassDefFoundError: JUnit

I was trying to run JUnit from a Run Configuration.

The solution was to rename the project so that there were no spaces in the project name.
Re: Launching JUNIT ... Variable references empty selection [message #1746275 is a reply to message #552542] Wed, 26 October 2016 07:04 Go to previous message
Eclipse UserFriend
I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=506550 for this issue, because I think from the JUnit view there is always a project/workspace bound to a selected test. Therefore it should be feasible to correctly replace those variables even from this view.
Previous Topic:Inherit null annotations not working for external annotations?
Next Topic:How to enable link-recognition in console window?
Goto Forum:
  


Current Time: Fri May 16 08:17:35 EDT 2025

Powered by FUDForum. Page generated in 0.07648 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top