Java DTV API 1.3
18-Nov-2009

com.sun.dtv.test
Interface TestCase


public interface TestCase

Defines the necessary methods that must be implemented by tests to be able to run in the provided test framework.

It mainly consists in a entry point and some helper methods. The design of the test framework is such that it is platform independent and allows different configuration of the test harness.

The test harness provides a means to forward command line arguments to a given test case. It is then the responsibility of every test case to read out the arguments that are supported by that particular test case. However, the following arguments are pre-defined by this application and should always be supported by every test cases:

-testid id
used to give the testcase its ID. If that argument is present in args, it must be the value returned by getTestId().
-testtitle title
used to give the testcase its title. If that argument is present in args, it must be the value returned by getTestTitle().
-select case1,case2,case3...
this argument is reserved to indicate the test case that only a specific (sub) case are to be handled. The value is a comma separated list of names that must corresponds to given methods in the TestCase class. This feature is not yet supported by this specification and this argument is reserved for future use.
-exclude case1,case2,case3...
similar to the previous select argument but does list those methods that are to be excluded. If both select and exclude are used and list the same test, then that test is considered to be excluded. This feature is not yet supported by this specification and this argument is reserved for future use.

This list is subject to be extended in future version of this specification.

Individual test cases may add support for new arguments, however these arguments must be preceded by "-x-" to indicate that these arguments are not standardized: for example a given test case may wanting to control a timeout through the -x-timeout argument.


Method Summary
 int getTestId()
          Returns the id of that test case.
 String getTestTitle()
          Returns a short description of the test.
 Report run(String[] args)
          Runs the test embodied by the implementation.
 

Method Detail

run

Report run(String[] args)
Runs the test embodied by the implementation. If the format of any value of any given arguments is incorrect, the value of should be ignored.

Parameters:
args - These are supplied in the description of this class and allow a script to provide configuration information to a test, or to reuse a test with different test values.
Returns:
A Report object representing the outcome of the test.

getTestId

int getTestId()
Returns the id of that test case. Every test case has an id which semantic, order, etc... is defined within the context of the test harness.

It must be equal to the value id passed in -testid if that argument was passed to run(String[]).

Returns:
An integer corresponding to the id of that test case.

getTestTitle

String getTestTitle()
Returns a short description of the test. The description should not contain new lines (e.g. carriage returns) and its length be typically be less than 80 characters.

It must be equal to the value title passed in -testtitle if that argument was passed to run(String[]).

Returns:
A short text description of the test.

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.