@testwizard/smart-tv

3.7.1 • Public • Published

Testwizard - Smart-TV

Javascript language support for testing smart-TV devices using testwizard

npm (scoped) lerna

Usage

  • import the @testwizard/test and the @testwizard/smart-tv packages
  • get a session and use it to create a 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 (smart-tv.js)

'use strict';

const Testwizard = require("@testwizard/test");
const SmartTV = require("@testwizard/smart-tv");

async function test() {
    const session = await Testwizard.createSession();

    const smartTV = await SmartTV.create(session, "SmartTv");

    console.log("sendRCKey");
    let result = await smartTV.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 (smart-tv.json)

{
    "tester": "John Smith",
    "parameters": [
        { "name": "param1", "value": "value1"},
        { "name": "param2", "value": "value2"}
    ],
    "resources": [
        { "category": "SMART_TV", "name": "SmartTv", "id": "TV Model 1"}
    ],
    "outputFolder": "c:\\temp"
}

Compatibility

The version is compatible with testwizard version 3.7

License

Testwizard licensing

Readme

Keywords

Package Sidebar

Install

npm i @testwizard/smart-tv

Weekly Downloads

3

Version

3.7.1

License

See readme.md

Unpacked Size

50.7 kB

Total Files

3

Last publish

Collaborators

  • edtb