def testApps(cfg):
    m = "testApps:"
    sop(m,"Entry.")

    sop(m,"Before testing: appList=" + repr(listApplications()))

    # Delete all apps before starting.
    deleteAllApplications()

    # Verify no apps are installed.
    appList = listApplications()
    if 0 != len(appList):
        errbrk(m,"Application list is not empty after deleting all apps. appList=" + repr(appList))
    sop(m,"Deleted all apps. appList=" + repr(appList))

    # Define the test app and where it will be installed.
    appName = "hitcount0"
    appFileName = appName + ".ear"
    serverDict = { "nodename": cfg["nodeName"], "servername": cfg["serverName"] }
    serverList = [ serverDict ]
    clusterList = []
    options = [ '-MapWebModToVH', [ ['hitcount0_web', 'hitcount0.war,WEB-INF/web.xml', 'default_host']]]

    # Verify the test app exists.
    if not os.path.exists(appFileName):
        errbrk(m,"Test application " + appFileName + " does not exist.")
    
    # Install the test app.
    installApplication(appFileName, serverList, clusterList, options)

    # Verify 1 app is installed.
    appList = listApplications()
    if 1 != len(appList):
        errbrk(m,"Application list does not have 1 app after installing test app. appList=" + repr(appList))
    sop(m,"One app is installed. appList=" + repr(appList))
    if appName != appList[0]:
        errbrk(m,"Application " + appName + " was not installed.")

    sop(m,"Exit success.")

#-----------------------------------------------------------------------
# SIP
#-----------------------------------------------------------------------
Deletes all apps, installs one test app.
dataset/ETHPy150Open wsadminlib/wsadminlib/tests/wsadminlib.test.py/testApps