Class TestBenchRecorderSuperClassCandidateScanner

java.lang.Object
com.vaadin.copilot.testbenchgenerator.TestBenchRecorderSuperClassCandidateScanner

public class TestBenchRecorderSuperClassCandidateScanner extends Object
Finds the custom TestBench base classes used by recorded TestBench tests. Important note: This class does a heavy work, so methods should run in async
  • Constructor Details

    • TestBenchRecorderSuperClassCandidateScanner

      public TestBenchRecorderSuperClassCandidateScanner()
  • Method Details

    • scan

      public Map<String,Integer> scan() throws IOException
      Scans the test source folder for TestBench tests and counts the custom superclasses they use.
      Returns:
      fully qualified superclass names and the number of tests using each one
      Throws:
      IOException - if the test source folder cannot be read
    • getCandidatesInOrder

      public List<String> getCandidatesInOrder() throws IOException
      Gets all candidate superclasses ordered by how often recorded tests use them. Candidates with the same count are ordered by class name. BrowserTestBase is added as the last, fallback superclass.
      Returns:
      fully qualified candidate superclass names, most frequently used first
      Throws:
      IOException - if the test source folder cannot be read