Getting Started with JavaStar: Setting up JavaStar


Preparation for this lesson involves:

Making a Copy of the Test Database

In this tutorial, you'll be using a database (.db) file that stores names and addresses. Each test run will change the contents of the database. Because each test will require that the database be in its original state, you'll need to preserve a "clean" (unedited) copy at all times. Before each test run, you can copy the original database over the edited version.

  1. Copy the sesame.db file from the JavaStar\examples\namedb1 directory to the JavaStar\tutorial directory.

  2. In the JavaStar\tutorial directory, copy sesame.db to test.db.
    Now you have two databases in the tutorial directory--the sesame.db master database, which you'll keep clean and unedited, and the test.db test that you'll replace each time you run a test.

If you prefer to always copy the sesame.db file from the JavaStar\examples\namedb1 directory, you just need to be sure that no other users have access to that directory. If they do, they might inadvertently load and use this database, corrupting the integrity of your tests.

Launching JavaStar

Before you launch JavaStar, make sure you are in your working directory.

Note - Your JavaStar work directory defaults to the directory where you launch JavaStar. You can reset this default within JavaStar, however, this doesn't effect the default directory that appears when you open a file dialog window. This becomes an issue when you are opening file dialogs from within your application. But because JavaStar stores the file you open as a path relative to your working directory, this is only an issue if you change your working directory in a later test run.

Launching JavaStar from a UNIX Environment

  1. If you are not already in the JavaStar tutorial directory, change to that directory.

  2. From the command line, type:
    For example, if you already have java defined in your system path, you type:

    Note - If you get an error message stating that namedb cannot be accessed, click OK to dismiss the window. You'll define the proper path to namedb in the upcoming section Creating a Project File.

Launching JavaStar from Windows 95 or Windows NT

Main Menu

If your launch is successful, you should see the JavaStar opening screen, with the main menu displayed to the left:

JavaStar main screen

If you get the message Can't find class javastar, check your CLASSPATH setting to make sure the path to JavaStar is correct.

Creating a Project File

For the next several lessons, you'll be working with the same working directory and the same test application. To set your test environment defaults, you'll create a project file that stores information about the application under test, your Java settings, and other information.

You can find the Project Settings panel on the main screen, to the right of the main menu.

To create a project file for the tutorial:

  1. Set the application settings for the project.

    1. In the main screen, click on the Project Settings App tab.
      The panel for application settings moves to the forefront. By default, the application option should already be selected.

    2. Set the Class field using the Browse... button.
      Click the Browse button to bring up the file dialog. Navigate to the \javastar\examples\namedb1 directory and double-click on the file namedb.class.
      The CLASSPATH field is automatically filled in with the path to the application you selected.

  2. Set the project test settings.

    1. In the main screen, click on the Project Settings Test tab.
      The panel for test settings moves to the forefront.
      The default settings for the work directory and the results directory (where JavaStar writes .log and other result files) appear in italics beneath their respective text fields.

    2. If your default work directory, results directory, and JST path settings do not point to the tutorial subdirectory, change them accordingly.
      You can use the Browse... button to navigate to the directory you want, or type the path in directly. For example, if you are running JavaStar in a Windows environment and used the default installation, type:
        C:\SunTest\JavaStar\tutorial
        

      for each path.

  3. From the buttons along the bottom of the screen, choose Save As....
    The window closes and your changes are written to the JavaStar properties file.

  4. Enter namedb.prj as the file name and save.



Send feedback to JavaStar-feedback@suntest.com
Copyright © 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303. All rights reserved.