KTapResultParser

public class KTapResultParser
extends Object

java.lang.Object
com.android.tradefed.testtype.binary.KTapResultParser


Odczytuje dane wyjściowe KTAP wygenerowane przez moduł testowy KUnit i umieszczone w pliku `results` w debugfs.

Ta implementacja jest oparta na oficjalnej dokumentacji, kunit_parser.py i konkretnych zastrzeżeniach znalezionych podczas testowania. Dodatkowa logika:

  • Wcięcie jest ignorowane, ponieważ nie jest spójne w różnych przypadkach użycia.
  • Linia zaczynająca się od „# Subtest:” jest wymagana do prawidłowego zagnieżdżenia w grupach podtestów. To podejście zostało zaczerpnięte z kunit_parser.py.
  • Czasami przed nazwą testu i danymi diagnostycznymi występuje „- ”, gdy nie jest używany znak „#”. Gdy zostanie wykryty, jest usuwany.
  • Nazwa testu może technicznie zawierać dowolny znak oprócz „#”. Może to stanowić problem podczas tłumaczenia na wyniki testów TF. Na razie jedynym przetwarzaniem końcowym jest zastępowanie spacji podkreśleniami.

Podsumowanie

Konstruktory publiczne

KTapResultParser()

Metody publiczne

static void applyKTapResultToListener(ITestInvocationListener listener, String testRunName, List<String> ktapFileContentList, KTapResultParser.ParseResolution resolution, boolean rearrangeClassMethod)
static void applyKTapResultToListener(ITestInvocationListener listener, String testRunName, List<String> ktapFileContentList, KTapResultParser.ParseResolution resolution)

Konstruktory publiczne

KTapResultParser

public KTapResultParser ()

Metody publiczne

applyKTapResultToListener

public static void applyKTapResultToListener (ITestInvocationListener listener, 
                String testRunName, 
                List<String> ktapFileContentList, 
                KTapResultParser.ParseResolution resolution, 
                boolean rearrangeClassMethod)

Parametry
listener ITestInvocationListener

testRunName String

ktapFileContentList List

resolution KTapResultParser.ParseResolution

rearrangeClassMethod boolean

applyKTapResultToListener

public static void applyKTapResultToListener (ITestInvocationListener listener, 
                String testRunName, 
                List<String> ktapFileContentList, 
                KTapResultParser.ParseResolution resolution)

Parametry
listener ITestInvocationListener

testRunName String

ktapFileContentList List

resolution KTapResultParser.ParseResolution