Misleading Error Message in Eclipse
Summary
To perform Scenario Testing on Eclipse we are going to imagine a situation where the user changes the behavior of the application by adding command line arguments. If the user specifies the location of the JRE directory using the vm argument, Eclipse v2.1.2 (Windows version) will issue an error message saying that it searched the directory and couldnt find JRE, when in fact it didnt search. (Source: bugs.eclipse.org)
Application Description
The Eclipse Platform is designed for building integrated development environments (IDEs) that can be used to create applications as diverse as web sites, Java programs, C++ programs, and Enterprise JavaBeans. (Source: www.eclipse.org)
Eclipse accepts many different command line arguments, which can be supplied either by starting the application from command prompt and adding the arguments, or by using a shortcut. For our test we will use shortcut to eclipse.exe We will add the command line argument -vm in the target area of the shortcut. Setting the java VM using -vm |
Test Design
This example demonstrates the use of Scenario Testing. To perform this type of testing we have to imagine a real world situation, which involves a complex use of Eclipse. Lets imagine that a user of Eclipse is developing a Java application and wants to test it with different versions of Java Run Time Environment (JRE).
One way to do that is to have the different versions in different directories and just specify which one Eclipse should use by adding the vm argument, followed by the desired directory.
The goal is to make sure that changes of the command line argument result in the application using the correct Java Run Time Environment.
Performing the Test
Results/Relevance
Surprisingly Eclipse will complain that it searched the directory and couldnt find JRE or JDK. But in the same time the user is looking at the directory and it is obvious that JRE is right there.
More experienced users will not have problems finding the workaround (see below) because they will know that error messages can be misleading. Unfortunately, there will be many users who will read the error message and think that if it says that Eclipse searched the directory and couldnt find the needed file, it must be true. This will confuse the users and decrease the credibility of the application.
Additional Notes
It turns out that if the user adds the filename (javaw.exe) at the end of the path so that Eclipse doesn't have to search for it, everything will work fine.
Configuration Notes
Testing Eclipse Foundation's Eclipse v2.1.2: