Class DynamicTestExecutor

java.lang.Object
caseine.extra.utils.mutations.DynamicTestExecutor
Direct Known Subclasses:
DynamicTestExecutorImpl4, DynamicTestExecutorImpl5

public abstract class DynamicTestExecutor extends Object
This class is introduced to run dynamically classes of tests. It is specifically used in the problems of tests by mutation (cf. Lab on mutants).
Author:
Christophe Saint-Marcel <christophe.saint-marcel@univ-grenoble-alpes.fr>
  • Constructor Details

  • Method Details

    • readCodes

      protected String[] readCodes(String... classNames) throws FileNotFoundException
      Read sources.
      Parameters:
      classNames -
      Returns:
      Throws:
      FileNotFoundException
    • saveSources

      protected Path[] saveSources(String[] sources, String[] classNames) throws IOException
      Save the source files.
      Parameters:
      sources - codes
      classNames -
      Returns:
      Throws:
      IOException
    • compileSources

      protected Path[] compileSources(Path[] javaFiles)
      Compile sources.
      Parameters:
      javaFiles -
      Returns:
    • doTest

      public abstract boolean doTest() throws Exception
      Play now a single test.
      Returns:
      number of failures
      Throws:
      Exception
    • replacePackaging

      protected String replacePackaging(String testName, String src)
      Change the package to reference the mutant.
      Parameters:
      testName - name of the class with its packages
      src - the source to modify
      Returns:
      the modified source
    • cleanClassPath

      protected void cleanClassPath()
      Remove tmp directory.