Class TestPlanReader


  • public abstract class TestPlanReader
    extends java.lang.Object
    CLIF test plan reader. Reads test plan definitions defined as Java properties, from an input stream (typically a CLIF .ctp file).
    Author:
    Bruno Dillenseger
    • 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 void main​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestPlanReader

        public TestPlanReader()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        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. 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.IOException
        Reads 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