Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d56c0f5 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Create common assertions for new tests

Maintain the same assertions for new assertion blocks and legacy. This CL is used while migrating the existing tests from the old to the new DSL format.

Once the tests are migrated the legacy support will be removed.

Bug: 162923992
Test: atest FlickerTests
Change-Id: I9a64a7ab43bf60c67a26f37562ab6c4d7bb0c487
parent 3919f6d2
Loading
Loading
Loading
Loading
+110 −6
Original line number Diff line number Diff line
@@ -18,12 +18,116 @@ package com.android.wm.shell.flicker

import android.graphics.Region
import android.view.Surface
import com.android.server.wm.flicker.dsl.LayersAssertionBuilder
import com.android.server.wm.flicker.dsl.LayersAssertionBuilderLegacy
import com.android.server.wm.flicker.APP_PAIR_SPLIT_DIVIDER
import com.android.server.wm.flicker.DOCKED_STACK_DIVIDER
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.flicker.traces.layers.getVisibleBounds

@JvmOverloads
fun LayersAssertionBuilder.appPairsDividerIsVisible(bugId: Int = 0) {
    end("appPairsDividerIsVisible", bugId) {
        this.isVisible(APP_PAIR_SPLIT_DIVIDER)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.appPairsDividerIsInvisible(bugId: Int = 0) {
    end("appPairsDividerIsInVisible", bugId) {
        this.notExists(APP_PAIR_SPLIT_DIVIDER)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.appPairsDividerBecomesVisible(bugId: Int = 0) {
    all("dividerLayerBecomesVisible", bugId) {
        this.hidesLayer(DOCKED_STACK_DIVIDER)
            .then()
            .showsLayer(DOCKED_STACK_DIVIDER)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.dockedStackDividerIsVisible(bugId: Int = 0) {
    end("dockedStackDividerIsVisible", bugId) {
        this.isVisible(DOCKED_STACK_DIVIDER)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.dockedStackDividerBecomesVisible(bugId: Int = 0) {
    all("dividerLayerBecomesVisible", bugId) {
        this.hidesLayer(DOCKED_STACK_DIVIDER)
            .then()
            .showsLayer(DOCKED_STACK_DIVIDER)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.dockedStackDividerBecomesInvisible(bugId: Int = 0) {
    all("dividerLayerBecomesInvisible", bugId) {
        this.showsLayer(DOCKED_STACK_DIVIDER)
            .then()
            .hidesLayer(DOCKED_STACK_DIVIDER)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.dockedStackDividerIsInvisible(bugId: Int = 0) {
    end("dockedStackDividerIsInvisible", bugId) {
        this.notExists(DOCKED_STACK_DIVIDER)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.appPairsPrimaryBoundsIsVisible(
    rotation: Int,
    primaryLayerName: String,
    bugId: Int = 0
) {
    end("PrimaryAppBounds", bugId) {
        val dividerRegion = entry.getVisibleBounds(APP_PAIR_SPLIT_DIVIDER)
        this.hasVisibleRegion(primaryLayerName, getPrimaryRegion(dividerRegion, rotation))
    }
}

@JvmOverloads
fun LayersAssertionBuilder.appPairsSecondaryBoundsIsVisible(
    rotation: Int,
    secondaryLayerName: String,
    bugId: Int = 0
) {
    end("SecondaryAppBounds", bugId) {
        val dividerRegion = entry.getVisibleBounds(APP_PAIR_SPLIT_DIVIDER)
        this.hasVisibleRegion(secondaryLayerName, getSecondaryRegion(dividerRegion, rotation))
    }
}

@JvmOverloads
fun LayersAssertionBuilder.dockedStackPrimaryBoundsIsVisible(
    rotation: Int,
    primaryLayerName: String,
    bugId: Int = 0
) {
    end("PrimaryAppBounds", bugId) {
        val dividerRegion = entry.getVisibleBounds(DOCKED_STACK_DIVIDER)
        this.hasVisibleRegion(primaryLayerName, getPrimaryRegion(dividerRegion, rotation))
    }
}

@JvmOverloads
fun LayersAssertionBuilder.dockedStackSecondaryBoundsIsVisible(
    rotation: Int,
    secondaryLayerName: String,
    bugId: Int = 0
) {
    end("SecondaryAppBounds", bugId) {
        val dividerRegion = entry.getVisibleBounds(DOCKED_STACK_DIVIDER)
        this.hasVisibleRegion(secondaryLayerName, getSecondaryRegion(dividerRegion, rotation))
    }
}

@JvmOverloads
fun LayersAssertionBuilderLegacy.appPairsDividerIsVisible(
    bugId: Int = 0,
+294 −29
Original line number Diff line number Diff line
@@ -17,8 +17,11 @@
package com.android.server.wm.flicker

import android.platform.helpers.IAppHelper
import com.android.server.wm.flicker.dsl.EventLogAssertionBuilder
import com.android.server.wm.flicker.dsl.EventLogAssertionBuilderLegacy
import com.android.server.wm.flicker.dsl.LayersAssertionBuilder
import com.android.server.wm.flicker.dsl.LayersAssertionBuilderLegacy
import com.android.server.wm.flicker.dsl.WmAssertionBuilder
import com.android.server.wm.flicker.dsl.WmAssertionBuilderLegacy
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper.Companion.NAV_BAR_LAYER_NAME
@@ -31,6 +34,247 @@ const val DOCKED_STACK_DIVIDER = "DockedStackDivider"
const val WALLPAPER_TITLE = "Wallpaper"

@JvmOverloads
fun WmAssertionBuilder.statusBarWindowIsAlwaysVisible(bugId: Int = 0) {
    all("statusBarWindowIsAlwaysVisible", bugId) {
        this.showsAboveAppWindow(NAV_BAR_LAYER_NAME)
    }
}

@JvmOverloads
fun WmAssertionBuilder.navBarWindowIsAlwaysVisible(bugId: Int = 0) {
    all("navBarWindowIsAlwaysVisible", bugId) {
        this.showsAboveAppWindow(NAV_BAR_LAYER_NAME)
    }
}

fun WmAssertionBuilder.visibleWindowsShownMoreThanOneConsecutiveEntry(
    ignoreWindows: List<String> = emptyList(),
    bugId: Int = 0
) {
    all("visibleWindowsShownMoreThanOneConsecutiveEntry", bugId) {
        this.visibleWindowsShownMoreThanOneConsecutiveEntry(ignoreWindows)
    }
}

fun WmAssertionBuilder.launcherReplacesAppWindowAsTopWindow(testApp: IAppHelper, bugId: Int = 0) {
    all("launcherReplacesAppWindowAsTopWindow", bugId) {
        this.showsAppWindowOnTop(testApp.getPackage())
                .then()
                .showsAppWindowOnTop("Launcher")
    }
}

fun WmAssertionBuilder.wallpaperWindowBecomesVisible(bugId: Int = 0) {
    all("wallpaperWindowBecomesVisible", bugId) {
        this.hidesBelowAppWindow(WALLPAPER_TITLE)
                .then()
                .showsBelowAppWindow(WALLPAPER_TITLE)
    }
}

fun WmAssertionBuilder.wallpaperWindowBecomesInvisible(bugId: Int = 0) {
    all("wallpaperWindowBecomesInvisible", bugId) {
        this.showsBelowAppWindow("Wallpaper")
                .then()
                .hidesBelowAppWindow("Wallpaper")
    }
}

fun WmAssertionBuilder.appWindowAlwaysVisibleOnTop(
    packageName: String,
    bugId: Int = 0
) {
    all("appWindowAlwaysVisibleOnTop", bugId) {
        this.showsAppWindowOnTop(packageName)
    }
}

fun WmAssertionBuilder.appWindowBecomesVisible(appName: String, bugId: Int = 0) {
    all("appWindowBecomesVisible", bugId) {
        this.hidesAppWindow(appName)
                .then()
                .showsAppWindow(appName)
    }
}

fun WmAssertionBuilder.appWindowBecomesInVisible(appName: String, bugId: Int = 0) {
    all("appWindowBecomesInVisible", bugId) {
        this.showsAppWindow(appName)
            .then()
            .hidesAppWindow(appName)
    }
}

@JvmOverloads
fun LayersAssertionBuilder.noUncoveredRegions(
    beginRotation: Int,
    endRotation: Int = beginRotation,
    allStates: Boolean = true,
    bugId: Int = 0
) {
    val startingBounds = WindowUtils.getDisplayBounds(beginRotation)
    val endingBounds = WindowUtils.getDisplayBounds(endRotation)
    if (allStates) {
        all("noUncoveredRegions", bugId) {
            if (startingBounds == endingBounds) {
                this.coversAtLeastRegion(startingBounds)
            } else {
                this.coversAtLeastRegion(startingBounds)
                        .then()
                        .coversAtLeastRegion(endingBounds)
            }
        }
    } else {
        start("noUncoveredRegions_StartingPos") {
            this.coversAtLeastRegion(startingBounds)
        }
        end("noUncoveredRegions_EndingPos") {
            this.coversAtLeastRegion(endingBounds)
        }
    }
}

@JvmOverloads
fun LayersAssertionBuilder.navBarLayerIsAlwaysVisible(
    rotatesScreen: Boolean = false,
    bugId: Int = 0
) {
    if (rotatesScreen) {
        all("navBarLayerIsAlwaysVisible", bugId) {
            this.showsLayer(NAV_BAR_LAYER_NAME)
                    .then()
                    .hidesLayer(NAV_BAR_LAYER_NAME)
                    .then()
                    .showsLayer(NAV_BAR_LAYER_NAME)
        }
    } else {
        all("navBarLayerIsAlwaysVisible", bugId) {
            this.showsLayer(NAV_BAR_LAYER_NAME)
        }
    }
}

@JvmOverloads
fun LayersAssertionBuilder.statusBarLayerIsAlwaysVisible(
    rotatesScreen: Boolean = false,
    bugId: Int = 0
) {
    if (rotatesScreen) {
        all("statusBarLayerIsAlwaysVisible", bugId) {
            this.showsLayer(STATUS_BAR_WINDOW_NAME)
                    .then()
                    hidesLayer(STATUS_BAR_WINDOW_NAME)
                    .then()
                    .showsLayer(STATUS_BAR_WINDOW_NAME)
        }
    } else {
        all("statusBarLayerIsAlwaysVisible", bugId) {
            this.showsLayer(STATUS_BAR_WINDOW_NAME)
        }
    }
}

@JvmOverloads
fun LayersAssertionBuilder.navBarLayerRotatesAndScales(
    beginRotation: Int,
    endRotation: Int = beginRotation,
    bugId: Int = 0
) {
    val startingPos = WindowUtils.getNavigationBarPosition(beginRotation)
    val endingPos = WindowUtils.getNavigationBarPosition(endRotation)

    start("navBarLayerRotatesAndScales_StartingPos", bugId) {
        this.hasVisibleRegion(NAV_BAR_LAYER_NAME, startingPos)
    }
    end("navBarLayerRotatesAndScales_EndingPost", bugId) {
        this.hasVisibleRegion(NAV_BAR_LAYER_NAME, endingPos)
    }

    /*if (startingPos == endingPos) {
        all("navBarLayerRotatesAndScales", enabled = false, bugId = 167747321) {
            this.hasVisibleRegion(NAVIGATION_BAR_WINDOW_TITLE, startingPos)
        }
    }*/
}

@JvmOverloads
fun LayersAssertionBuilder.statusBarLayerRotatesScales(
    beginRotation: Int,
    endRotation: Int = beginRotation,
    bugId: Int = 0
) {
    val startingPos = WindowUtils.getStatusBarPosition(beginRotation)
    val endingPos = WindowUtils.getStatusBarPosition(endRotation)

    start("statusBarLayerRotatesScales_StartingPos", bugId) {
        this.hasVisibleRegion(STATUS_BAR_WINDOW_NAME, startingPos)
    }
    end("statusBarLayerRotatesScales_EndingPos", bugId) {
        this.hasVisibleRegion(STATUS_BAR_WINDOW_NAME, endingPos)
    }
}

fun LayersAssertionBuilder.visibleLayersShownMoreThanOneConsecutiveEntry(
    ignoreLayers: List<String> = emptyList(),
    bugId: Int = 0
) {
    all("visibleLayersShownMoreThanOneConsecutiveEntry", bugId) {
        this.visibleLayersShownMoreThanOneConsecutiveEntry(ignoreLayers)
    }
}

fun LayersAssertionBuilder.appLayerReplacesWallpaperLayer(appName: String, bugId: Int = 0) {
    all("appLayerReplacesWallpaperLayer", bugId) {
        this.showsLayer("Wallpaper")
                .then()
                .replaceVisibleLayer("Wallpaper", appName)
    }
}

fun LayersAssertionBuilder.wallpaperLayerReplacesAppLayer(testApp: IAppHelper, bugId: Int = 0) {
    all("appLayerReplacesWallpaperLayer", bugId) {
        this.showsLayer(testApp.getPackage())
                .then()
                .replaceVisibleLayer(testApp.getPackage(), WALLPAPER_TITLE)
    }
}

fun LayersAssertionBuilder.layerAlwaysVisible(packageName: String, bugId: Int = 0) {
    all("layerAlwaysVisible", bugId) {
        this.showsLayer(packageName)
    }
}

fun LayersAssertionBuilder.layerBecomesVisible(packageName: String, bugId: Int = 0) {
    all("layerBecomesVisible", bugId) {
        this.hidesLayer(packageName)
                .then()
                .showsLayer(packageName)
    }
}

fun LayersAssertionBuilder.layerBecomesInvisible(packageName: String, bugId: Int = 0) {
    all("layerBecomesInvisible", bugId) {
        this.showsLayer(packageName)
                .then()
                .hidesLayer(packageName)
    }
}

fun EventLogAssertionBuilder.focusChanges(vararg windows: String, bugId: Int = 0) {
    all("focusChanges", bugId) {
        this.focusChanges(windows)
    }
}

fun EventLogAssertionBuilder.focusDoesNotChange(bugId: Int = 0) {
    all("focusDoesNotChange", bugId) {
        this.focusDoesNotChange()
    }
}

@JvmOverloads
@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.statusBarWindowIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
@@ -41,6 +285,7 @@ fun WmAssertionBuilderLegacy.statusBarWindowIsAlwaysVisible(
}

@JvmOverloads
@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.navBarWindowIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
@@ -50,6 +295,7 @@ fun WmAssertionBuilderLegacy.navBarWindowIsAlwaysVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.visibleWindowsShownMoreThanOneConsecutiveEntry(
    ignoreWindows: List<String> = emptyList(),
    bugId: Int = 0,
@@ -60,6 +306,7 @@ fun WmAssertionBuilderLegacy.visibleWindowsShownMoreThanOneConsecutiveEntry(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.launcherReplacesAppWindowAsTopWindow(
    testApp: IAppHelper,
    bugId: Int = 0,
@@ -72,6 +319,7 @@ fun WmAssertionBuilderLegacy.launcherReplacesAppWindowAsTopWindow(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.wallpaperWindowBecomesVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
@@ -83,6 +331,7 @@ fun WmAssertionBuilderLegacy.wallpaperWindowBecomesVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.wallpaperWindowBecomesInvisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
@@ -94,6 +343,7 @@ fun WmAssertionBuilderLegacy.wallpaperWindowBecomesInvisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.appWindowAlwaysVisibleOnTop(
    packageName: String,
    bugId: Int = 0,
@@ -104,6 +354,7 @@ fun WmAssertionBuilderLegacy.appWindowAlwaysVisibleOnTop(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.appWindowBecomesVisible(
    appName: String,
    bugId: Int = 0,
@@ -116,6 +367,7 @@ fun WmAssertionBuilderLegacy.appWindowBecomesVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun WmAssertionBuilderLegacy.appWindowBecomesInVisible(
    appName: String,
    bugId: Int = 0,
@@ -128,6 +380,7 @@ fun WmAssertionBuilderLegacy.appWindowBecomesInVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
@JvmOverloads
fun LayersAssertionBuilderLegacy.noUncoveredRegions(
    beginRotation: Int,
@@ -158,6 +411,7 @@ fun LayersAssertionBuilderLegacy.noUncoveredRegions(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
@JvmOverloads
fun LayersAssertionBuilderLegacy.navBarLayerIsAlwaysVisible(
    rotatesScreen: Boolean = false,
@@ -179,6 +433,7 @@ fun LayersAssertionBuilderLegacy.navBarLayerIsAlwaysVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
@JvmOverloads
fun LayersAssertionBuilderLegacy.statusBarLayerIsAlwaysVisible(
    rotatesScreen: Boolean = false,
@@ -189,7 +444,7 @@ fun LayersAssertionBuilderLegacy.statusBarLayerIsAlwaysVisible(
        all("statusBarLayerIsAlwaysVisible", bugId, enabled) {
            this.showsLayer(STATUS_BAR_LAYER_NAME)
                .then()
                    hidesLayer(STATUS_BAR_LAYER_NAME)
                .hidesLayer(STATUS_BAR_LAYER_NAME)
                .then()
                .showsLayer(STATUS_BAR_LAYER_NAME)
        }
@@ -200,6 +455,7 @@ fun LayersAssertionBuilderLegacy.statusBarLayerIsAlwaysVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
@JvmOverloads
fun LayersAssertionBuilderLegacy.navBarLayerRotatesAndScales(
    beginRotation: Int,
@@ -224,6 +480,7 @@ fun LayersAssertionBuilderLegacy.navBarLayerRotatesAndScales(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
@JvmOverloads
fun LayersAssertionBuilderLegacy.statusBarLayerRotatesScales(
    beginRotation: Int,
@@ -242,8 +499,9 @@ fun LayersAssertionBuilderLegacy.statusBarLayerRotatesScales(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun LayersAssertionBuilderLegacy.visibleLayersShownMoreThanOneConsecutiveEntry(
    ignoreLayers: List<String> = emptyList(),
    ignoreLayers: List<String> = kotlin.collections.emptyList(),
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
@@ -252,6 +510,7 @@ fun LayersAssertionBuilderLegacy.visibleLayersShownMoreThanOneConsecutiveEntry(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun LayersAssertionBuilderLegacy.appLayerReplacesWallpaperLayer(
    appName: String,
    bugId: Int = 0,
@@ -264,6 +523,7 @@ fun LayersAssertionBuilderLegacy.appLayerReplacesWallpaperLayer(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun LayersAssertionBuilderLegacy.wallpaperLayerReplacesAppLayer(
    testApp: IAppHelper,
    bugId: Int = 0,
@@ -276,6 +536,7 @@ fun LayersAssertionBuilderLegacy.wallpaperLayerReplacesAppLayer(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun LayersAssertionBuilderLegacy.layerAlwaysVisible(
    packageName: String,
    bugId: Int = 0,
@@ -286,6 +547,7 @@ fun LayersAssertionBuilderLegacy.layerAlwaysVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun LayersAssertionBuilderLegacy.layerBecomesVisible(
    packageName: String,
    bugId: Int = 0,
@@ -298,6 +560,7 @@ fun LayersAssertionBuilderLegacy.layerBecomesVisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun LayersAssertionBuilderLegacy.layerBecomesInvisible(
    packageName: String,
    bugId: Int = 0,
@@ -310,6 +573,7 @@ fun LayersAssertionBuilderLegacy.layerBecomesInvisible(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun EventLogAssertionBuilderLegacy.focusChanges(
    vararg windows: String,
    bugId: Int = 0,
@@ -320,6 +584,7 @@ fun EventLogAssertionBuilderLegacy.focusChanges(
    }
}

@Deprecated("Move the assertion into one of the specific blocks (presubmit, postsubmit, flaky)")
fun EventLogAssertionBuilderLegacy.focusDoesNotChange(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
+32 −4
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ fun Flicker.setRotation(rotation: Int) {
        wmHelper.waitForAppTransitionIdle()

        // Ensure WindowManagerService wait until all animations have completed
        instrumentation.getUiAutomation().syncInputTransactions()
        instrumentation.uiAutomation.syncInputTransactions()
    } catch (e: RemoteException) {
        throw RuntimeException(e)
    }
@@ -71,8 +71,8 @@ fun buildTestTag(
/**
 * Build a test tag for the test
 * @param testName Name of the transition(s) being tested
 * @param app App being launcher
 * @param configuration Configuration for the test
 * @param extraInfo Additional information to append to the tag
 *
 * @return test tag with pattern <NAME>__<APP>__<BEGIN_ROTATION>-<END_ROTATION>
</END_ROTATION></BEGIN_ROTATION></APP></NAME> */
@@ -90,11 +90,32 @@ fun buildTestTag(
        extraInfo = extraInfo)
}

/**
 * Build a test tag for the test
 * @param configuration Configuration for the test
 * @param extraInfo Additional information to append to the tag
 *
 * @return test tag with pattern <NAME>__<APP>__<BEGIN_ROTATION>-<END_ROTATION>
</END_ROTATION></BEGIN_ROTATION></APP></NAME> */
@JvmOverloads
fun buildTestTag(
    configuration: Bundle,
    extraInfo: String = ""
): String {
    return buildTestTag(testName = null,
        app = null,
        beginRotation = configuration.startRotation,
        endRotation = configuration.endRotation,
        app2 = null,
        extraInfo = extraInfo)
}

/**
 * Build a test tag for the test
 * @param testName Name of the transition(s) being tested
 * @param app App being launcher
 * @param configuration Configuration for the test
 * @param extraInfo Additional information to append to the tag
 *
 * @return test tag with pattern <NAME>__<APP>__<BEGIN_ROTATION>-<END_ROTATION>
</END_ROTATION></BEGIN_ROTATION></APP></NAME> */
@@ -121,14 +142,17 @@ fun buildTestTag(
 * @return test tag with pattern <NAME>__<APP></APP>(S)>__<ROTATION></ROTATION>(S)>[__<EXTRA>]
</EXTRA></NAME> */
fun buildTestTag(
    testName: String,
    testName: String?,
    app: String?,
    beginRotation: Int,
    endRotation: Int,
    app2: String?,
    extraInfo: String
): String {
    var testTag = testName
    var testTag = ""
    if (testName != null) {
        testTag += testName
    }
    if (app != null) {
        testTag += "__$app"
    }
@@ -142,5 +166,9 @@ fun buildTestTag(
    if (extraInfo.isNotEmpty()) {
        testTag += "__$extraInfo"
    }

    if (testTag.startsWith("__")) {
        testTag = testTag.drop(2)
    }
    return testTag
}