Class AbstractIpsTestRunner

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int countTests​(java.lang.String names)
      Counts all ips test cases in the given packages.
      The format of the input string is:
      protected abstract java.util.List<IRuntimeRepository> createRepositories()
      Creates the repositories.
      static java.util.List<java.lang.String> extractListFromString​(java.lang.String input)  
      protected java.lang.ClassLoader getClassLoader()  
      protected java.util.List<IRuntimeRepository> getRepositories()
      Returns all stored repositories.
      If the repositories currently not exists in memory create the repositories first.
      The repository will be created by the to be implemented method: createRepositories()
      protected java.util.List<java.lang.String> getRepositoryListFromInputString​(java.lang.String repositoryPackages)
      Returns a list of repository names from a given string of repositories.
      The format of the input string is:
      java.lang.String getRepositoryPackages()
      Returns the repository packages names
      java.util.List<IpsTest2> getTests()
      Returns all tests.
      void run​(java.lang.String names)
      Run the all ips test cases in the given packages.
      The format of the input string is:
      protected void setAdditionalRepositoryPackages​(java.lang.String additionalRepositoryPackages)
      Sets additional packages, will be used to create the ClassloaderRuntimeRepository which could be used in the runtime environment to obtain necessary objects.
      void setClassLoader​(java.lang.ClassLoader classLoader)
      Sets the classloader to find the test and instantiate the corresponding classes.
      void setRepositoryPackages​(java.lang.String repositoryPackages)
      Sets the repository packages names
      static java.lang.String toStringFromList​(java.util.List<java.lang.String> input)  
      • Methods inherited from class java.lang.Object

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

      • AbstractIpsTestRunner

        public AbstractIpsTestRunner()
    • Method Detail

      • countTests

        public int countTests​(java.lang.String names)
                       throws java.lang.Exception
        Counts all ips test cases in the given packages.
        The format of the input string is:
         {packageName in repository1}{packageName in repository2}{...}
         
        Throws:
        java.lang.Exception - if an error occurs.
      • getTests

        public java.util.List<IpsTest2> getTests()
        Returns all tests.
      • getRepositories

        protected java.util.List<IRuntimeRepository> getRepositories()
                                                              throws java.lang.Exception
        Returns all stored repositories.
        If the repositories currently not exists in memory create the repositories first.
        The repository will be created by the to be implemented method: createRepositories()
        Throws:
        java.lang.Exception - if an error occurs.
      • getClassLoader

        protected java.lang.ClassLoader getClassLoader()
      • setClassLoader

        public void setClassLoader​(java.lang.ClassLoader classLoader)
        Sets the classloader to find the test and instantiate the corresponding classes.
      • setRepositoryPackages

        public void setRepositoryPackages​(java.lang.String repositoryPackages)
        Sets the repository packages names
      • getRepositoryPackages

        public java.lang.String getRepositoryPackages()
        Returns the repository packages names
      • setAdditionalRepositoryPackages

        protected void setAdditionalRepositoryPackages​(java.lang.String additionalRepositoryPackages)
        Sets additional packages, will be used to create the ClassloaderRuntimeRepository which could be used in the runtime environment to obtain necessary objects. Format: {package1}{package2}{...}{packageN}
      • run

        public void run​(java.lang.String names)
                 throws java.lang.Exception
        Run the all ips test cases in the given packages.
        The format of the input string is:
         {packageName in repository1}{packageName in repository2}{...}
         
        Throws:
        java.lang.Exception - if an error occurs.
      • getRepositoryListFromInputString

        protected java.util.List<java.lang.String> getRepositoryListFromInputString​(java.lang.String repositoryPackages)
        Returns a list of repository names from a given string of repositories.
        The format of the input string is:
         {repositoryName1}{repositoryName2}{...}
         
      • extractListFromString

        public static java.util.List<java.lang.String> extractListFromString​(java.lang.String input)
      • toStringFromList

        public static java.lang.String toStringFromList​(java.util.List<java.lang.String> input)
      • createRepositories

        protected abstract java.util.List<IRuntimeRepository> createRepositories()
                                                                          throws java.lang.Exception
        Creates the repositories. Where the test will be searched.
        Throws:
        java.lang.Exception