Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  test_playback.py   Sprache: Python

 
import os
import time

import mozinfo
import mozunit
from mozlog.structuredlog import StructuredLogger, set_default_logger

# need this so raptor imports work both from /raptor and via mach
here = os.path.abspath(os.path.dirname(__file__))

set_default_logger(StructuredLogger("test_playback"))


from mozproxy import get_playback
from mozproxy.backends.mitm.desktop import MitmproxyDesktop

config = {}

run_local = True
if os.environ.get("TOOLTOOLCACHE"is None:
    run_local = False


def test_get_playback(get_binary):
    config["platform"] = mozinfo.os
    if "win" in config["platform"]:
        # this test is not yet supported on windows
        assert True
        return
    config["obj_path"] = os.path.dirname(get_binary("firefox"))
    config["playback_tool"] = "mitmproxy"
    config["playback_version"] = "8.1.1"
    config["playback_files"] = [
        os.path.join(
            os.path.dirname(os.path.abspath(os.path.dirname(__file__))),
            "raptor",
            "tooltool-manifests",
            "playback",
            "mitm8-linux-firefox-amazon.manifest",
        )
    ]
    config["binary"] = get_binary("firefox")
    config["run_local"] = run_local
    config["app"] = "firefox"
    config["host"] = "127.0.0.1"

    playback = get_playback(config)
    assert isinstance(playback, MitmproxyDesktop)
    playback.start()
    time.sleep(1)
    playback.stop()


def test_get_unsupported_playback():
    config["playback_tool"] = "unsupported"
    playback = get_playback(config)
    assert playback is None


def test_get_playback_missing_tool_name():
    playback = get_playback(config)
    assert playback is None


if __name__ == "__main__":
    mozunit.main()

Messung V0.5
C=97 H=100 G=98

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge