pyats.aereport.testscriptinitinfo package

testscriptinitinfo – TestScriptInitInfo

This module implements TestScriptInitInfo section used by TestScript.

class pyats.aereport.testscriptinitinfo.TestScriptInitInfo

Bases: pyats.aereport.toplevel.aereportelement.AEReportElement

Class based on this schema definition

<xs:element name="initinfo">
        <xs:complexType>
                <xs:sequence>
                        <xs:element name="script"></xs:element>
                        <xs:element name="pargs" type="xs:string"></xs:element>
                        <xs:element name="taskid"></xs:element>
                        <xs:element name="description"></xs:element>
                        <xs:element name="logfile" type="LogFileType"></xs:element>
                        <xs:element name="swversion" minOccurs="0"/>
                        <xs:element name="hwversion" minOccurs="0"/>
                        <xs:element name="fwversion" minOccurs="0"/>
                        <xs:element name="tstversion" minOccurs="0"/>
                        <xs:element name="aehandler" minOccurs="0" maxOccurs="unbounded"></xs:element>
                </xs:sequence>
        </xs:complexType>
</xs:element>
tag

Default value = ‘initinfo’

Type

str

script
Type

Script

pargs
Type

str

taskid
Type

str

description
Type

str

logfile
Type

LogFile

version
Type

str

swversion

swversion

Type

str

hwversion

hwversion

Type

str

fwversion

fwversion

Type

str

tstversion

tstversion

Type

str

aehandlers

aehandlers - list of AEHandler

Type

list

set_args(**kwargs)

Set testscript set_args

Parameters
  • Initinfo (#) –

  • script (dict) – CLI paramerters passed to test script

  • pargs (str) – CLI paramerters passed to test script

  • taskid (str) – TaskId is set for easypy runs only; for stand-alone mode, it would be null. This value is internally set by aetest::script_init API

  • description (str) – Description for the testscript

  • logfile (dict) – File in which the test script logs are saved

  • swversion (str) – software version

  • hwversion (str) – hardware version

  • tstversion (str) – testscript version

  • aehandlers (str) – aetest testcase or section handlers

  • runinfo (dict) – Runinfo

Submodules

testscriptaehandler – TestScriptAEHandler

This module implements TestScriptAEHandler element used by TestScript.

class pyats.aereport.testscriptinitinfo.testscriptaehandler.TestScriptAEHandler(**kwargs)

Bases: pyats.aereport.toplevel.aereportelement.AEReportElement

Class based on this schema definition

<xs:element name="aehandler" minOccurs="0" maxOccurs="unbounded">
    <xs:annotation>
        <xs:documentation>aetest testcase or section handlers</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:sequence>
            <xs:element name="name">
                <xs:annotation>
                    <xs:documentation>handler proc name</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="type">
                <xs:annotation>
                    <xs:documentation>type is testcase or section</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="criteria">
                <xs:annotation>
                    <xs:documentation>Regexp condition for which the handler should be
                        invoked such as fail, error, etc</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>
set_args(**kwargs)

Set name, criteria and type of aehandler.

Parameters
  • name (str) – name - handler proc name

  • criteria (str) – criteria - Regexp condition for which the handler should be invoked such as fail, error, etc

  • type (str) – type - type is testcase or section