KTapResultParser

public class KTapResultParser
extends Object

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


Czyta dane wyjściowe KTAP, które są generowane przez moduł testowy KUnit i umieszczane w pliku „results” w katalogu debugfs.

Ta implementacja opiera się na oficjalnej dokumentacji, pliku kunit_parser.py i szczegółowych zastrzeżeniach znalezionych podczas testowania. Wymagana jest dodatkowa logika:

  • Wpisywanie tabulacji jest ignorowane, ponieważ nie jest spójne w użyciu.
  • Wiersz zaczynający się od „# Subtest:” jest wymagany, aby prawidłowo zagnieżdżać grupy podtestów. To podejście zostało zaadaptowane z pliku kunit_parser.py.
  • Czasami znak „-” występuje po nazwie testu i danych diagnostycznych, gdy nie jest używany znak „#”. Gdy wystąpi, jest ona odłączona.
  • Nazwa testu może teoretycznie zawierać dowolny znak oprócz „#”. Może to stanowić problem podczas tłumaczenia wyników testu TF. Obecnie przetwarzanie postu polega tylko na zastępowaniu spacji podkreśleniami.

Podsumowanie

Konstruktory publiczne

KTapResultParser()

Metody publiczne

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

Konstruktory publiczne

KTapResultParser

public KTapResultParser ()

Metody publiczne

applyKTapResultToListener

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

Parametry
listener ITestInvocationListener

testRunName String

ktapFileContentList

resolution KTapResultParser.ParseResolution

applyKTapResultToListener

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

Parametry
listener ITestInvocationListener

testRunName String

ktapFileContentList

resolution KTapResultParser.ParseResolution

rearrangeClassMethod boolean