Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javatest
Class LastRunInfo

    java.lang.Object
      com.sun.javatest.LastRunInfo

    public class LastRunInfo

extends java.lang.Object

Information about the last or current test run. This is an interface onto this meta-information stored in a work directory.

Method Summary
`java.lang.String` | `getConfigName()` Get the name of the configuration that was used in the last test run.
`java.util.Date` | `getFinishDate()` When did the last test run end.
`long` | `getFinishTime()` When did the last test run end.
`java.util.Date` | `getStartDate()` When did the last test run start.
`long` | `getStartTime()` When did the last test run start.
`java.util.ArrayList` | `getTestURLs()` Get the URLs of the tests that were executed in the last test run.
`static LastRunInfo` | `readInfo(WorkDirectory wd)` Given a work directory, attempt to create an instance using the information found in it.
`static void` | `writeInfo(WorkDirectory workdir, long start, long stop, java.lang.String config, java.util.ArrayList testURLs)` Given a work directory, write the given run information in it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getStartTime

    public long getStartTime()

  When did the last test run start. Warning - the time information stored in a test result is only accurate to one second, so everything below a 1000ms can't be compared reliably. If you are comparing times to a TestResult, it is suggested that you either remove the ms from the return value or do something other than compare the integers.

  Returns:
    The time (in milliseconds) at which the last test run started.
  See Also:
    `Date`

### getFinishTime

    public long getFinishTime()

  When did the last test run end. Warning - the time information stored in a test result is only accurate to one second, so everything below a 1000ms can't be compared reliably. If you are comparing times to a TestResult, it is suggested that you either remove the ms from the return value or do something other than compare the integers.

  Returns:
    The time (in milliseconds) at which the last test run completed (for any reason).
  See Also:
    `Date`

### getStartDate

    public java.util.Date getStartDate()

  When did the last test run start.

  Returns:
    The time (in milliseconds) at which the last test run started. May be zero if the information is not available.
  See Also:
    `Date`

### getFinishDate

    public java.util.Date getFinishDate()

  When did the last test run end.

  Returns:
    The time (in milliseconds) at which the last test run completed (for any reason). May be zero if the information is not available.
  See Also:
    `Date`

### getConfigName

    public java.lang.String getConfigName()

  Get the name of the configuration that was used in the last test run.

  Returns:
    Configuration name as it appeared in the configuration. May be null or empty string if this information is not available.

### getTestURLs

    public java.util.ArrayList getTestURLs()

  Get the URLs of the tests that were executed in the last test run.

  Returns:
    String array of testURLs executed.

### readInfo

    public static LastRunInfo readInfo(WorkDirectory wd)
                                throws java.io.IOException

  Given a work directory, attempt to create an instance using the information found in it.

  Parameters:
    `wd` - The work directory to create the information from.
  Returns:
    Configuration name as it appeared in the configuration. May be null or empty string if this information is not available.
  Throws:
    `java.io.IOException` - Occurs if the last run info is not available or if the system has a problem while reading the file.

### writeInfo

    public static void writeInfo(WorkDirectory workdir,
                                 long start,
                                 long stop,
                                 java.lang.String config,
                                 java.util.ArrayList testURLs)
                          throws java.io.IOException

  Given a work directory, write the given run information in it.

  Parameters:
    `workdir` - The work directory to modify. Must be able to read-write files inside it.
    `start` - Time in milliseconds at which the last test run started. Must be a non-negative number.
    `stop` - Time in milliseconds at which the last test run terminated. Must be a non-negative number.
    `config` - Configuration name which was used to do the last test run. May be null or empty string if necessary.
  Throws:
    `java.io.IOException` - If for any reason the information file cannot be created, opened, written into or deleted.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.