Package org.ow2.clif.console.lib
Class TestPlanReader
- java.lang.Object
-
- org.ow2.clif.console.lib.TestPlanReader
-
public abstract class TestPlanReader extends java.lang.ObjectCLIF test plan reader. Reads test plan definitions defined as Java properties, from an input stream (typically a CLIF .ctp file).- Author:
- Bruno Dillenseger
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringARGUMENT_PROPstatic java.lang.StringBLADE_PROPstatic java.lang.StringCOMMENT_PROPstatic java.lang.StringFILE_EXTstatic java.lang.StringID_PROPstatic java.lang.StringINJECTOR_PROPstatic java.lang.StringPROBE_PROPstatic java.lang.StringSERVER_PROP
-
Constructor Summary
Constructors Constructor Description TestPlanReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<java.lang.String>getServers(java.io.InputStream in)Reads a test plan definition from the provided input stream, and returns the set of names of CLIF servers involved in this test plan.static java.util.Set<java.lang.String>getServers(java.util.Collection<ClifDeployDefinition> definitions)Get the set of names of CLIF servers involved in the provided collection of deployment definitions.static voidmain(java.lang.String[] args)Simple command that prints the names of all CLIF servers involved in some test plans Names are printed only once whatever the number of occurrences in the test plans.static java.util.Map<java.lang.String,ClifDeployDefinition>readFromProp(java.io.InputStream in)Reads a CLIF test plan definition from the provided input stream, and returns a test plan object, i.e.
-
-
-
Field Detail
-
BLADE_PROP
public static final java.lang.String BLADE_PROP
- See Also:
- Constant Field Values
-
SERVER_PROP
public static final java.lang.String SERVER_PROP
- See Also:
- Constant Field Values
-
INJECTOR_PROP
public static final java.lang.String INJECTOR_PROP
- See Also:
- Constant Field Values
-
PROBE_PROP
public static final java.lang.String PROBE_PROP
- See Also:
- Constant Field Values
-
ARGUMENT_PROP
public static final java.lang.String ARGUMENT_PROP
- See Also:
- Constant Field Values
-
COMMENT_PROP
public static final java.lang.String COMMENT_PROP
- See Also:
- Constant Field Values
-
ID_PROP
public static final java.lang.String ID_PROP
- See Also:
- Constant Field Values
-
FILE_EXT
public static final java.lang.String FILE_EXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOExceptionSimple command that prints the names of all CLIF servers involved in some test plans Names are printed only once whatever the number of occurrences in the test plans. Each printed line contains a single CLIF server name.- Parameters:
args- the names of the test plan files- Throws:
java.io.IOException
-
getServers
public static java.util.Set<java.lang.String> getServers(java.io.InputStream in) throws java.io.IOExceptionReads a test plan definition from the provided input stream, and returns the set of names of CLIF servers involved in this test plan.- Parameters:
in- the input stream to read the test plan from- Returns:
- the set of CLIF server's names
- Throws:
java.io.IOException
-
getServers
public static java.util.Set<java.lang.String> getServers(java.util.Collection<ClifDeployDefinition> definitions)
Get the set of names of CLIF servers involved in the provided collection of deployment definitions.- Parameters:
definitions- the collection of deployment definitions to analyze- Returns:
- the set of CLIF server's names
-
readFromProp
public static java.util.Map<java.lang.String,ClifDeployDefinition> readFromProp(java.io.InputStream in) throws java.io.IOException
Reads a CLIF test plan definition from the provided input stream, and returns a test plan object, i.e. a Map with blade identifiers as keys, and associated deployment definitions as values.- Parameters:
in- the input stream to read the test plan definition from- Returns:
- the test plan Map
- Throws:
java.io.IOException- an error occurred while reading the input stream
-
-