Class MissingQueryNextCallDetector

java.lang.Object
scriptella.driver.script.MissingQueryNextCallDetector

public class MissingQueryNextCallDetector extends Object
CRQ-12257. Helper class to detect and warn about missing query.next() calls.
Version:
1.1
Author:
Fyodor Kupolov
See Also:
  • Constructor Details

  • Method Details

    • detectMissingQueryNextCall

      public boolean detectMissingQueryNextCall()
      Detects if a query.next() call is missing by using the following rules:
      • query.isNextCalled return false, i.e. it was never called
      • Heuristically checks that the source code of the script contains query.next(), by using the regex QUERY_NEXT_CALL.
      Returns:
      true if missing query.next() was detected