Numerous Pulsating Martians
    Have ideas to improve npm?Join in the discussion! »

    @testwizard/android-smart-tv

    3.3.12 • Public • Published

    Testwizard - Android smart-TV

    Javascript language support for testing Android smart-TV devices using testwizard

    npm (scoped) lerna

    Usage

    • import the @testwizard/test and the @testwizard/android-smart-tv packages
    • get a session and use it to create an Android smart-TV testobject.
    • Use this object to execute commands You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.

    Sample script

    javascript (android-smart-tv.js)

    'use strict';
    
    const Testwizard = require("@testwizard/test");
    const SmartTv = require("@testwizard/android-smart-tv");
    
    async function test() {
        const session = await Testwizard.createSession();
    
        console.log("-- Parameter usage ---");
        console.log("param1 = " + session.parameters.param1);
        console.log("param2 = " + session.parameters.param2);
    
        const tv = await SmartTv.create(session, "SmartTV");
    
        console.log("sendRCKey");
        let result = await tv.sendRCKey("menu");
        console.log(result.message);
        if (!result.success)
            session.addFail(result.message);
    
        if (!(session.hasFails || session.hasErrors))
            session.addPass("Test was successful");
    }
    
    test();

    sidecar file (android-smart-tv.json)

    {
        "tester": "Some tester",
        "parameters": [
            { "name": "param1", "value": "value1"},
            { "name": "param2", "value": "value2"}
        ],
        "resources": [{ "category": "ANDROID_STB_TV", "name": "SmartTV", "id": "SmartTV 1"}
        ],
        "outputFolder": "c:\\temp"
    }

    Compatibility

    The version is compatible with testwizard version 3.3

    License

    Testwizard licensing

    Install

    npm i @testwizard/android-smart-tv

    DownloadsWeekly Downloads

    145

    Version

    3.3.12

    License

    See readme.md

    Unpacked Size

    46.3 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar